# Docker daemon fails to start on voxl

Source: https://forum.modalai.com/topic/86/docker-daemon-fails-to-start-on-voxl
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Posted: 2021-01-09 13:38:21 UTC by Alex123
Replies: 38 · Views: 25464

## Alex123 · 2021-01-09 13:38:21 UTC

RE: https://forum.modalai.com/topic/37/docker-daemon-fails-to-start-voxl
I'm also facing the same issue.

yocto:/# voxl-docker -i roskinetic-xenial:opencv
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
yocto:/#
yocto:/#
yocto:/# docker images
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
yocto:/#
yocto:/#
yocto:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.8G 2.2G 581M 79% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 1.9G 4.0K 1.9G 1% /var/volatile
/dev/mmcblk0p1 7.4G 204M 7.2G 3% /mnt/sdcard
/dev/sda2 2.2M 80K 2.0M 4% /persist
/dev/sde12 12M 4.1M 7.4M 36% /dsp
/dev/sde11 95M 33M 63M 35% /firmware
/dev/sda3 58M 40K 57M 1% /cache
/dev/sda9 15G 13G 2.4G 85% /data
yocto:/#

As you can see, /data partition has all the data and docker images.

What can be a solution for this?

## Reply by modaltb (ModalAI staff) · 2021-01-09 14:34:27 UTC

What do you see after running `voxl-configure-docker.sh` ?

Should be something like:

```
yocto:/# voxl-configure-docker-support.sh
Stopping original docker service
Enabling our own services docker-start & docker-prepare
starting docker-start.service
loading hello-world docker image
successfully loaded hello-world
starting docker-prepare service

done configuring voxl-docker-support
```

## Reply by Alex123 · 2021-01-11 05:30:07 UTC

yocto:/# voxl-configure-docker-support.sh
Stopping original docker service
Enabling our own services docker-start & docker-prepare
starting docker-start.service
loading hello-world docker image
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
yocto:/#

## Reply by Alex123 · 2021-01-11 06:35:11 UTC

yocto:/# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
   **Active: failed (Result: exit-code) since Mon 2021-01-11 06:31:53 UTC; 1min 53s ago**
     Docs: http://docs.docker.com
 Main PID: 4675 (code=exited, status=2)

Jan 11 06:31:53 apq8096 systemd[1]: Started Docker Application Container Engine.
Jan 11 06:31:53 apq8096 docker[4675]: flag provided but not defined: --raw-logs
Jan 11 06:31:53 apq8096 docker[4675]: See '/usr/bin/docker daemon --help'.
Jan 11 06:31:53 apq8096 systemd[1]: docker.service: Main process exited, co...NT
Jan 11 06:31:53 apq8096 systemd[1]: docker.service: Unit entered failed state.
Jan 11 06:31:53 apq8096 systemd[1]: docker.service: Failed with result 'exi...'.
Jan 11 06:31:57 apq8096 systemd[1]: Stopped Docker Application Container Engine.
Jan 11 06:33:06 apq8096 systemd[1]: Stopped Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.

## Reply by Alex123 · 2021-01-11 10:52:45 UTC

As I'm working on this issue, I noticed the following.

yocto:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2224 (2.1 KiB) TX bytes:2224 (2.1 KiB)

wlan0 Link encap:Ethernet HWaddr **:**:**:**:**:**
inet addr:192.168.*.** Bcast:192.168.*.*** Mask:***.***.***.*
inet6 addr: ::****:****:****:****/** Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:467 errors:0 dropped:0 overruns:0 frame:0
TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3000
RX bytes:40293 (39.3 KiB) TX bytes:10317 (10.0 KiB)

https://stackoverflow.com/questions/64028448/error-during-connect-get-http-2fvar2frun2fdocker-sock-v1-40-containers-jso

**It's not showing any IP address for docker0.
How to configure the IP address that will listen to docker daemon on voxl-core board?**

## Reply by kiprock · 2021-05-13 15:42:45 UTC

Hey @Alex123 were you able to resolve this? I'm having the same issue.

## Reply by Chad Sweet (ModalAI staff) · 2021-05-13 15:49:24 UTC

Are you following the docs [here](https://docs.modalai.com/docker-on-voxl/)?

The voxl-docker command is for developing in a Docker on a PC, it should not be run on VOXL.

The tutorial steps to run on target are:
```
yocto:/# voxl-configure-docker-support.sh
yocto:/# docker images
yocto:/# docker run hello-world
```

If you have run the PC scripts on VOXL, not really sure what would happen

## Reply by kiprock · 2021-05-13 15:54:16 UTC (in reply to Chad Sweet)

@Chad-Sweet Thanks for the fast response!

```
yocto:~# voxl-configure-docker-support.sh
Stopping original docker service
Enabling our own services docker-start & docker-prepare
starting docker-start.service
loading hello-world docker image
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
yocto:~#  systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: http://docs.docker.com
May 13 15:46:33 apq8096 systemd[1]: Stopped Docker Application Container Engine.

yocto:~#

yocto:~#  systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: http://docs.docker.com

May 13 15:46:33 apq8096 systemd[1]: Stopped Docker Application Container Engine.
yocto:~#  systemctl start docker
yocto:~#  systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-05-13 15:48:03 UTC; 2s ago
     Docs: http://docs.docker.com
  Process: 3678 ExecStart=/usr/bin/docker daemon -H fd:// --raw-logs (code=exited, status=2)
 Main PID: 3678 (code=exited, status=2)

May 13 15:48:03 apq8096 systemd[1]: Started Docker Application Container Engine.
May 13 15:48:03 apq8096 docker[3678]: flag provided but not defined: --raw-logs
May 13 15:48:03 apq8096 docker[3678]: See '/usr/bin/docker daemon --help'.
May 13 15:48:03 apq8096 systemd[1]: docker.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 13 15:48:03 apq8096 systemd[1]: docker.service: Unit entered failed state.
May 13 15:48:03 apq8096 systemd[1]: docker.service: Failed with result 'exit-code'.
yocto:~# docker images
An error occurred trying to connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.21/images/json: read unix @->/var/run/docker.sock: read: connection reset by peer
```

## Reply by Chad Sweet (ModalAI staff) · 2021-05-13 15:59:31 UTC

Not really sure what state your system is in. This github issue shows it could be related to disk space or needs a reboot. Did you install other Dockers on the image? They are very large and maybe all of the space is consumed
https://github.com/docker/for-linux/issues/435

## Reply by kiprock · 2021-05-13 16:04:00 UTC

Just looking at your script, I realized that modal has it's own docker services.. so perhaps this provides a little more info: I have created a few images from the kinetic image

```
yocto:~# systemctl disable docker.service
yocto:~# systemctl enable docker-start.service
yocto:~# systemctl enable docker-prepare.service
yocto:~# systemctl status docker-prepare.service
● docker-prepare.service
   Loaded: loaded (/etc/systemd/system/docker-prepare.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 1970-01-01 00:00:24 UTC; 51 years 4 months ago
 Main PID: 2352 (code=exited, status=1/FAILURE)

Jan 01 00:00:20 apq8096 docker-prepare.sh[2352]: /usr/bin/docker-prepare.sh: line 17: /sys/fs/cgroup/cpuset/syst...ctory
Jan 01 00:00:21 apq8096 docker-prepare.sh[2352]: /usr/bin/docker-prepare.sh: line 17: /sys/fs/cgroup/cpuset/syst...ctory
Jan 01 00:00:22 apq8096 docker-prepare.sh[2352]: /usr/bin/docker-prepare.sh: line 17: /sys/fs/cgroup/cpuset/syst...ctory
Jan 01 00:00:23 apq8096 docker-prepare.sh[2352]: /usr/bin/docker-prepare.sh: line 17: /sys/fs/cgroup/cpuset/syst...ctory
Jan 01 00:00:24 apq8096 docker-prepare.sh[2352]: /usr/bin/docker-prepare.sh: line 17: /sys/fs/cgroup/cpuset/syst...ctory
Jan 01 00:00:24 apq8096 docker-prepare.sh[2352]: failed to see cpuset appear after 15 seconds
Jan 01 00:00:24 apq8096 systemd[1]: docker-prepare.service: Main process exited, code=exited, status=1/FAILURE
Jan 01 00:00:24 apq8096 systemd[1]: Failed to start docker-prepare.service.
Jan 01 00:00:24 apq8096 systemd[1]: docker-prepare.service: Unit entered failed state.
Jan 01 00:00:24 apq8096 systemd[1]: docker-prepare.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
yocto:~#
yocto:~#
yocto:~# systemctl status docker-start.service
● docker-start.service
   Loaded: loaded (/etc/systemd/system/docker-start.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-05-13 15:57:11 UTC; 3min 11s ago
 Main PID: 3873 (code=exited, status=1/FAILURE)

May 13 15:57:11 apq8096 systemd[1]: Started docker-start.service.
May 13 15:57:11 apq8096 docker[3873]: time="2021-05-13T15:57:11.453820000Z" level=info msg="API listen on /var/....sock"
May 13 15:57:11 apq8096 docker[3873]: time="2021-05-13T15:57:11.477567000Z" level=info msg="[graphdriver] using...lay\""
May 13 15:57:11 apq8096 docker[3873]: time="2021-05-13T15:57:11.527540000Z" level=info msg="Firewalld running: false"
May 13 15:57:11 apq8096 docker[3873]: time="2021-05-13T15:57:11.595538000Z" level=fatal msg="Error starting dae...oints"
May 13 15:57:11 apq8096 systemd[1]: docker-start.service: Main process exited, code=exited, status=1/FAILURE
May 13 15:57:11 apq8096 systemd[1]: docker-start.service: Unit entered failed state.
May 13 15:57:11 apq8096 systemd[1]: docker-start.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
yocto:~#
yocto:~# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root        2837860 1890496    930980  68% /
devtmpfs         1861956       0   1861956   0% /dev
tmpfs            1930660       0   1930660   0% /dev/shm
tmpfs            1930660   17136   1913524   1% /run
tmpfs            1930660       0   1930660   0% /sys/fs/cgroup
tmpfs            1930660       4   1930656   1% /var/volatile
/dev/sda2           2168      80      1964   4% /persist
/dev/sde12         12016    4184      7508  36% /dsp
/dev/sda3          58888      40     57568   1% /cache
/dev/sde11         97232   33616     63616  35% /firmware
/dev/sda9       15248568 7060916   8171268  47% /data
tmpfs             386132       0    386132   0% /run/user/0
```

## Reply by kiprock · 2021-05-13 16:06:58 UTC

I had a battery go pretty low and the system crashed while running mavros in docker last night, after reboot, docker deamon is not responding and I cannot see any images.

## Reply by Eric Katzfey (ModalAI staff) · 2021-05-13 16:39:53 UTC

@kiprock I would reflash the system, setup your IP connection, configure Docker and just verify that it works as expected.

## Reply by kiprock · 2021-05-13 16:48:26 UTC

just looking at the logs, the docker deamon fails here:

```
level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints"
```

Most forums suggest removing the docker network folder: rm -r /var/lib/docker/network

I did this but still having issues. Just curious if the modalAI setup stores docker files somewhere else?

## Reply by Eric Katzfey (ModalAI staff) · 2021-05-13 16:51:48 UTC

@kiprock Everything is stored on /data. But again, I would reflash and start over just to verify Docker operation.

## Reply by kiprock · 2021-05-13 16:56:40 UTC

```
rm /data/network/files/local-kv.db
``` 

did the trick. Thanks for providing that missing piece of data!

## Reply by shlee853 · 2021-06-10 20:49:14 UTC (in reply to kiprock)

@kiprock Hi I have a exactly same issue.

I flashed image and reset factory configuration on my VOXL, but, It has still issue.

Did you resolve this problem?

Thanks,

## Reply by kiprock · 2021-06-11 16:44:44 UTC

@Eric-Katzfey if you cannot start docker images, you can try the command above to clear them. Good luck.

## Reply by Eric Katzfey (ModalAI staff) · 2021-06-11 20:16:21 UTC (in reply to kiprock)

Thanks, but I think you meant to ping @shlee853

## Reply by shlee853 · 2021-06-12 00:12:58 UTC (in reply to kiprock)

@kiprock thank you for your reply
I’ll try it

## Reply by shlee853 · 2021-06-12 05:17:04 UTC (in reply to shlee853)

@shlee853 

Great!

I resolved this problem as you mentioned.

    yocto:/$ rm /data/network/files/local-kv.db
    yocto:/$ voxl-configure-docker-support.sh 
    Stopping original docker service
    Enabling our own services docker-start & docker-prepare
    starting docker-start.service
    loading hello-world docker image
    successfully loaded hello-world
    starting docker-prepare service
    Created symlink from /etc/systemd/system/default.target.wants/docker-autorun.service to /etc/systemd/system/docker-autorun.service.
    
    done configuring voxl-docker-support

## Reply by LucasW · 2022-06-16 14:22:42 UTC (in reply to kiprock)

@kiprock Thank you for this, that also solved the issue in my case. 

To be a little more cautious, I simply renamed the existing file, which forced the generation of a new one when running the configuration script `voxl-configure-docker-support.sh`:
```bash
voxl:/data/network/files$ mv local-kv.db local-kv_DISABLED.db
```

## Reply by José Quintanilla · 2023-02-24 19:29:22 UTC (in reply to modaltb)

@modaltb I have a problem, after I write that line, the drone display a message that says: voxl:/$ voxl-configure-docker-suport.sh
bash: voxl-configure-docker-suport.sh: command not found
voxl:/$

## Reply by tom (ModalAI staff) · 2023-02-24 19:42:35 UTC

@José-Quintanilla Looks like you spelled it wrong

## Reply by tom (ModalAI staff) · 2023-02-24 19:42:59 UTC

@José-Quintanilla You can use [TAB] after you start writing a command to auto-fill

## Reply by José Quintanilla · 2023-02-24 19:55:50 UTC (in reply to tom)

@tom I think it worked, thanks

## Reply by José Quintanilla · 2023-02-27 17:30:13 UTC (in reply to tom)

@tom It wasn't that, because I need that especific line on my VOXL to work, so I can use properly the sdk

## Reply by tom (ModalAI staff) · 2023-02-27 17:33:53 UTC

@José-Quintanilla What is not working? Did you run `voxl-configure-docker-support.sh`?

## Reply by José Quintanilla · 2023-02-27 18:20:08 UTC (in reply to tom)

@tom That's the line that doesnt let me run, my done say:  voxl-configure-docker-support.sh:  command not found

## Reply by tom (ModalAI staff) · 2023-02-27 18:50:34 UTC

@José-Quintanilla What release do you  have installed, what does `voxl-version` say?

## Reply by José Quintanilla · 2023-02-27 19:03:24 UTC (in reply to tom)

@tom If I recall is the 0.9 version

## Reply by tom (ModalAI staff) · 2023-02-27 20:12:44 UTC

@José-Quintanilla When you get a chance post the output of `voxl-version`. Also what hardware are you on?

## Reply by José Quintanilla · 2023-02-27 20:40:31 UTC (in reply to tom)

@tom I confirm that is the voxl 0.9 version on a m500 hardware im using a voxl flight

## Reply by tom (ModalAI staff) · 2023-02-27 21:52:59 UTC

@José-Quintanilla I was asking because that command also lists installed packages, try without the .sh: `voxl-configure-docker-support`

## Reply by José Quintanilla · 2023-02-27 22:37:23 UTC (in reply to tom)

@tom  voxl:/$ voxl-version
--------------------------------------------------------------------------------
system-image: 4.0.0
kernel:       #1 SMP PREEMPT Thu Oct 13 17:57:05 UTC 2022 3.18.71-perf
--------------------------------------------------------------------------------
hw version:   VOXL
--------------------------------------------------------------------------------
voxl-suite:   0.9.4
--------------------------------------------------------------------------------
Packages:
Repo: http://voxl-packages.modalai.com/dists/apq8096/sdk-0.9/binary-arm64/
Last Updated: stat: cannot stat '/var/lib/opkg/lists/modalai': No such file or directory
stat: cannot stat '/var/lib/opkg/lists/modalai': No such file or directory
WARNING: repo file has changed since last update,
	packages may have originated from a different repo
List:
	apq8096-dfs-server       0.3.1
	apq8096-imu-server       1.0.3
	apq8096-libpng           1.6.38-1
	apq8096-system-tweaks    0.1.3
	apq8096-tflite           2.8.3-1
	libapq8096-io            0.6.0
	libmodal-cv              0.2.3
	libmodal-exposure        0.0.7
	libmodal-journal         0.2.1
	libmodal-json            0.4.3
	libmodal-pipe            2.6.0
	libvoxl-cci-direct       0.1.5
	libvoxl-cutils           0.1.1
	voxl-camera-calibration  0.2.3
	voxl-camera-server       1.3.5
	voxl-cpu-monitor         0.3.0
	voxl-docker-support      1.2.4
	voxl-gphoto2-server      0.0.10
	voxl-jpeg-turbo          2.1.3-4
	voxl-libgphoto2          0.0.4
	voxl-libuvc              1.0.7
	voxl-logger              0.3.4
	voxl-mavlink             0.1.0
	voxl-mavlink-server      0.2.0
	voxl-modem               0.16.1
	voxl-mongoose            7.7.0-1
	voxl-mpa-to-ros          0.3.6
	voxl-mpa-tools           0.7.6
	voxl-opencv              4.5.5-1
	voxl-portal              0.4.2
	voxl-qvio-server         0.8.2
	voxl-streamer            0.4.1
	voxl-suite               0.9.4
	voxl-system-image        4.0-r0
	voxl-tag-detector        0.0.4
	voxl-tflite-server       0.3.1
	voxl-utils               1.2.2
	voxl-uvc-server          0.1.3
	voxl-vision-px4          1.4.0
	voxl-vpn                 0.0.6
--------------------------------------------------------------------------------
voxl:/$

## Reply by José Quintanilla · 2023-02-27 22:40:23 UTC (in reply to tom)

@tom I think I need to use the command with the .sh, I'm following this guide https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk-python

and the command you want me to do is referring to this guide: https://docs.modalai.com/docker-on-voxl/

## Reply by tom (ModalAI staff) · 2023-02-27 23:06:26 UTC

@José-Quintanilla Its the exact same command, the name was just slightly changed since that page was written.

## Reply by José Quintanilla · 2023-02-28 14:34:01 UTC (in reply to tom)

@tom Ohh, well thanks, I didn't knew that, thank you

## Reply by amitga · 2023-03-08 12:37:45 UTC

Just to add to this post: I had similar problems with platform image 3.8 (clean install + wipe).
Deleting the `/data/network/files` didn't help.

I noticed in the `systemctl status docker-daemon` that there is were various network related errors, probably in the absense of a valid internet connection (VOXL was configured as AP).
For example: `Error getting v2 registry: Get https://registry-1.docker.io/v2/: x509: certificate has expired or is not yet valid"` and `"HTTP Error" err="No such image: hello-world:latest" statusCode=404`.

After connecting the VOXL to a Wifi router with internet access and rebooting, it seems like the daemon is able to run on boot without issues.

Is this how its supposed to work? Can't a new VOXL install be successful without internet connection ?

Thanks

## Reply by Yonim · 2023-03-30 18:42:36 UTC

switch to wifi station mode - https://docs.modalai.com/wifi-setup/
It fixed for me
