How did you get the earlier posted log with the dqlite error? Are you seeing a similar error now?
It was being sudo journalctl -o cat -b -u snap.lxd.daemon.service
but at now I see that its old logs ā¦
Because on all logs contains time
time="2024-04-16T19:23:43Z
How I can show actually logs ?
What does sudo ps aux | grep lxd
show?
Also have you done sudo snap start lxd
?
wow, Iām even ashamedā¦ after I ran sudo snap start lxd, everything workedā¦
but why is not started automatically ?
Iām not sure, LXD restarts if it stops and the snap service is enabled (by snap start lxd), but perhaps in all of the refreshing of channels snapd stopped the LXD snap service.
Glad its working though. Stick on the 5.21/stable channel.
@colemiller and I are looking into anything can be improved with LXD and dqlite to try and avoid these DB corruptions when LXD is being restarted during a snap refresh.
Thank you for help)
I am sure that there was no damage today, I mistakenly attached old logs where the database was actually damaged. In this case, there was only a minor problem with the fact that the lxd service was disabled and did not start automatically for some reason.
Note:
After refreshing to latest/stable lxd service not autostart again.
I still working on 20.04: actually my hardening process did not work as expected, so Iām still investigating.
thx for your help.
I will post my findings.
Actually:
- generic kernel
- zfs from Ubuntu
- lxd: 5.21/stable
- snap 2.62.2
Last week
- Ubuntu 20.04:
with lxd 5.21/stable only build on HP Gen8 but not on my HP gen7 but this morning it seems to work ?! - ubuntu 22.04:
with lxd 5.21/stable unable to build but with lxd 5.20/stable is building !?
Please can you provide your build errors?
For 22.04: lxd.daemon.log
lxd.daemon[25590]: time="2024-04-26T13:35:33-04:00" level=warning msg=" - Couldn't find the CGroup network priority controller, per-instance network priority will be ignored. Please use per-device limits.priority instead"
Apr 26 13:37:07 gueryta344119 lxd.daemon[25590]: time="2024-04-26T13:37:07-04:00" level=error msg="Unable to run feature checks during QEMU initialization: QEMU monitor connect error: dial unix /tmp/3693263421: connect: connection refused"
Apr 26 13:37:07 gueryta344119 lxd.daemon[25590]: time="2024-04-26T13:37:07-04:00" level=warning msg="Instance type not operational" driver=qemu err="QEMU failed to run feature checks" type=virtual-machine
Apr 26 13:38:22 gueryta344119 lxd.daemon[25590]: time="2024-04-26T13:38:22-04:00" level=warning msg="Dqlite: attempt 1: server 1: write handshake: write unix @->@00003: i/o timeout"
The script is doing ālxc check connectivityā and run this command:
lst list
Bur never get answer/ouput from lxc
20.04: since last monday (2024-05-06) everything work as expected (!?)
Regards
Regards
Are you building LXD or installing it?
I tried to install it, but Magic Wednesday: 20.04 itās working as expected and 22.04 work with 5.21/stable and latest/stable
Thx for your help and time.
Excellent. latest/stable
works with ZFS on Ubuntu 22.04 because it has ZFS 2.1 support (and ZFS 2.2 with HWE kernel).
However keep in mind that right now because 5.21/stable and latest/stable are equivalent, you can switch from latest/stable to 5.21/stable (which is an LTS track).
So if you are looking for a non-rolling track, then this is a good opportunity to switch to 5.21/stable channel.
Iām not quite clear under which conditions lxd init
would require root
rather than being in the lxd
group. I just tested the āfirst stepsā tutorial and you just need to be member of the lxd
group for lxd init --minimal
to succeed.
Since @ayomideyissa was apparently not a member of the lxd
group, I clarified the āfirst stepsā to ensure the user logs out and back in for the group membership to take effect.
I believe the last requirement we have for lxd init
being run as root
user is when joining a cluster as it needs to read the certificate off of the disk:
Thanks for the clarification Tom. It seems our cluster doc already mentions sudo
is needed when joining an existing cluster so I donāt think we/I need to clarify the doc.
sorry, I know this might be better in a new Topic, but I just signed up here and could not find the quote in related Topic-button, or even any sort of way to create a new one here.
As my house is on fire right now I hope so,ebody might pick up on this despite that bad placement.
==================================================
I have the same forefront symptom as described here.
sysop@ubn2004LXD:~$ lxc list
Error: LXD unix socket not accessible: Get "http://unix.socket/1.0": EOF
I am not using ZFS
but btrfs
though.
On top I see the below which seem to indicate the repressantation of my containers on the hosts filesystem does not exist any longer. This is worrying me a bit
sysop@ubn2004LXD:~$ sudo ls -l /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers/erpnext4
total 0
or
sysop@ubn2004LXD:~$ sudo du -h -d 1 /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers
4.0K /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers/ubn2204
4.0K /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers/erpnext4
12K /var/snap/lxd/common/lxd/storage-pools/pool-52G/containers
pool-52G
being the btrfs backed storage pool.
Would you still recommend the same solution @tomp ?
I think this is duplicate of LXD unix socket not accessible - zfs missing even though I am using btrfs, so letās keep the discussion there.
After upgrading, seems my lxc and lxd are not functioning well anymore
No Command seem to be working outside checking thier versions
When i checked the status of lxd service i see this
ā snap.lxd.daemon.service - Service for snap application lxd.daemon
Loaded: loaded (/etc/systemd/system/snap.lxd.daemon.service; static; vendor preset: enabled)
Active: active (running) since Sun 2024-07-07 00:21:58 UTC; 1s ago
TriggeredBy: ā snap.lxd.daemon.unix.socket
Main PID: 54401 (daemon.start)
Tasks: 0 (limit: 38287)
Memory: 4.0M
CGroup: /system.slice/snap.lxd.daemon.service
ā£ 54401 /bin/sh /snap/lxd/28460/commands/daemon.start
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - proc_slabinfo
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - shared_pidns
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - cpuview_daemon
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - loadavg_daemon
Jul 07 00:21:58 ns3081171 lxd.daemon[54546]: - pidfds
Jul 07 00:21:59 ns3081171 lxd.daemon[54401]: => Starting LXD
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: time=ā2024-07-07T00:22:00Zā level=warning msg=" - Couldnāt find the CGroup blkio.weight, disk priority will be ignored"
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: time=ā2024-07-07T00:22:00Zā level=warning msg=" - Couldnāt find the CGroup memory swap accounting, swap limits will be ignored"
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: time=ā2024-07-07T00:22:00Zā level=error msg=āFailed to start the daemonā err=āFailed to start dqlite server: raft_start(): io: closed segment 0000000000833011-0000000000833040 is past last snapshot snapshot-1-832512-36057521ā
Jul 07 00:22:00 ns3081171 lxd.daemon[54557]: Error: Failed to start dqlite server: raft_start(): io: closed segment 0000000000833011-0000000000833040 is past last snapshot snapshot-1-832512-36057521
Jul 07 00:22:00 ns3081171 lxd.daemon[54401]: Killed
Jul 07 00:22:00 ns3081171 lxd.daemon[54401]: => LXD failed to start
Jul 07 00:22:00 ns3081171 systemd[1]: snap.lxd.daemon.service: Main process exited, code=exited, status=1/FAILURE
Jul 07 00:22:00 ns3081171 systemd[1]: snap.lxd.daemon.service: Failed with result āexit-codeā.
Please can you share the contents of /var/snap/lxd/common/lxd/database/
as a tarball via a private message to me. Thanks