Nitrokey/nextbox

empty opts.json files hindering docker service to start

rschardt opened this issue · 0 comments

1 or 2 weeks ago my nextbox started to behave weirdly.
The green led was blinking for several hours and I decided to inspect the issue further.
The docker.service wasn't able to start anymore:

systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2022-06-29 13:42:18 BST; 1min 9s ago
     Docs: https://docs.docker.com
  Process: 13516 ExecStart=/usr/sbin/dockerd -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
 Main PID: 13516 (code=exited, status=1/FAILURE)

Jun 29 13:42:17 nextbox dockerd[13516]: time="2022-06-29T13:42:17.772659084+01:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
Jun 29 13:42:17 nextbox dockerd[13516]: time="2022-06-29T13:42:17.773837751+01:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0x40000a9020, TRANSIENT_FAILURE" module=grpc
Jun 29 13:42:17 nextbox dockerd[13516]: time="2022-06-29T13:42:17.774039122+01:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0x40000a9020, CONNECTING" module=grpc
Jun 29 13:42:18 nextbox dockerd[13516]: Error starting daemon: error setting up default driver: error while unmarshaling volume options for volume: nextbox-compose_apache-conf: unexpected end of JSON input
Jun 29 13:42:18 nextbox systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 13:42:18 nextbox systemd[1]: docker.service: Failed with result 'exit-code'.
Jun 29 13:42:18 nextbox systemd[1]: Failed to start Docker Application Container Engine.
Jun 29 13:42:18 nextbox systemd[1]: docker.service: Start request repeated too quickly.
Jun 29 13:42:18 nextbox systemd[1]: docker.service: Failed with result 'exit-code'.
Jun 29 13:42:18 nextbox systemd[1]: Failed to start Docker Application Container Engine.

Error starting daemon: error setting up default driver: error while unmarshaling volume options for volume: nextbox-compose_apache-conf: unexpected end of JSON input
It seemed something was off with the volumes in '/srv/docker/volumes/'.

After iterating through all the volume-directories(nextbox-compose_apache-conf, nextbox-compose_db, nextbox-compose_letsencrypt, nextbox-compose_nextbox-app ,nextbox-compose_nextcloud) and deleting every occurrence of the 'opts.json' file and also restarting the docker.service afterwards, the nextbox ran smoothly again.

Until this point I never interacted with the system outside the nextbox-UI, so I don't know what procedure created those files and I can only suggest that it may be related to the automatic updates of the system.

Hope it helps.