Issue: Unity Accelerator lockup on startup when installed onto home NAS using SnapRAID and MergerFS.
What happened?:
When you install Unity Accelerator onto a mount point created/managed by MergerFS, Unity Accelerator silently fails to start. According to the log files this is because it is unable to access the bbolt database at the configured file location. After encountering this issue, the Unity Accelerator service appears to be running, however neither the webui nor command line tools are able to access it. When encountering this error the unity-accelerator.log file will contain the following:
{"level":"info","ts":"2021-01-18T19:00:34Z","msg":"tool wrun start","cmd":"/mnt/storage/UnityAccelerator/unity-accelerator tool wrun --persist /mnt/storage/UnityAccelerator/cache","pid":9066}
{"level":"info","ts":"2021-01-18T19:00:35.046Z","msg":"DASHBOARD AVAILABLE AT http://192.168.1.5/dashboard/","agent_id":"hoderi_id","agent_name":"hoderi"}
{"level":"error","ts":"2021-01-18T19:00:35Z","msg":"tool wrun exited","error":"wrun execute returned errors: [cannot open bbolt database: no such device]","errs":"[cannot open bbolt database: no such device]"}
{"level":"info","ts":"2021-01-18T19:02:17Z","msg":"tool wrun start","cmd":"/mnt/storage/UnityAccelerator/unity-accelerator tool wrun --persist /mnt/storage/UnityAccelerator/cache","pid":9209}
{"level":"info","ts":"2021-01-18T19:02:17.282Z","msg":"DASHBOARD AVAILABLE AT http://192.168.1.5/dashboard/","agent_id":"hoderi_id","agent_name":"hoderi"}
{"level":"error","ts":"2021-01-18T19:02:17Z","msg":"tool wrun exited","error":"wrun execute returned errors: [cannot open bbolt database: no such device]","errs":"[cannot open bbolt database: no such device]"}
{"level":"info","ts":"2021-01-18T19:03:17Z","msg":"tool wrun start","cmd":"/mnt/storage/UnityAccelerator/unity-accelerator tool wrun --persist /mnt/storage/UnityAccelerator/cache","pid":9434}
{"level":"info","ts":"2021-01-18T19:03:18.152Z","msg":"DASHBOARD AVAILABLE AT http://192.168.1.5/dashboard/","agent_id":"hoderi_id","agent_name":"hoderi"}
{"level":"error","ts":"2021-01-18T19:03:18Z","msg":"tool wrun exited","error":"wrun execute returned errors: [cannot open bbolt database: no such device]","errs":"[cannot open bbolt database: no such device]"}
{"level":"info","ts":"2021-01-18T19:04:17Z","msg":"tool wrun start","cmd":"/mnt/storage/UnityAccelerator/unity-accelerator tool wrun --persist /mnt/storage/UnityAccelerator/cache","pid":9535}
{"level":"info","ts":"2021-01-18T19:04:17.312Z","msg":"DASHBOARD AVAILABLE AT http://192.168.1.5:10070/dashboard/","agent_id":"hoderi_id","agent_name":"hoderi"}
Whenever I’m encountering this error the following files are stored at the following locations:
- bbolt.db - /mnt/storage/UnityAccelerator/cache/cachedb/bbolt.db
- unity-accelerator.cfg - /mnt/storage/UnityAccelerator/cache/unity-accelerator.cfg
- unity-accelerator.log - /mnt/storage/UnityAccelerator/cache/log/unity-accelerator.log
- unity-accelerator (executable) - /mnt/storage/UnityAccelerator
While the unity-accelerator executable is able to execute, and write to both its configuration and log files, it seems unable to open/write to the bbolt.db database. This issue exists on multiple versions of Unity Accelerator, I have tested 1.0.909, 1.0.524, and 1.0.144.
Moving Unity Accelerator off the SnapRAID/MergerFS mountpoint, eg to /home/user/UnityAccelerator and editing the configuration and start scripts to the new install location allows Unity Accelerator to start as expected.
Steps to reproduce:
Detailed configuration options for SnapRAID and MergerFS at, my setup follows mostly the defaults here except for more drives: Setting up media server using Ubuntu and SnapRaid - Software - serverbuilds.net Forums
Install Ubuntu 18.04 or 20.04
Install SnapRAID, and configure with at least two data drives and one parity drive (eg /mnt/data1 /mnt/data2 /mnt/parity1).
Install MergerFS, and configure it to merge the data drives into a single mount point (eg /mnt/storage)
Enable the MergerFS mount point either through fstab or sudo mount -a
Install UnityAccelerator to a directory on the MergerFS mount point (eg /mnt/storage/UnityAccelerator)
Attempt to start Unity Accelerator
Attempt to access Unity Accelerator through web UI or command line
Unity Accelerator will silently fail, though the service is still reported as alive by systemd
Unity Accelerator logs will state that it is unable to open the bbolt database at the configured location.
I’ve just filed a case number with this, 1307279. I’m posting this here encase anyone else is encountering the issue. I will happily unearth any other logs needed to debug this