self-hosted-cookbook/docker/troubleshooting.md

60 lines
1.7 KiB
Markdown
Raw Normal View History

2020-12-14 15:25:07 +00:00
# Docker Troubleshooting
2020-12-15 16:03:52 +00:00
Same as **Get Started** section - these instructions are for Ubuntu Linux.
2020-12-14 15:25:07 +00:00
### ERROR: Version in "./docker-compose.yml" is unsupported.
2020-12-15 16:03:52 +00:00
You need to update your `docker-compose` version:
2020-12-14 15:25:07 +00:00
```sh
sudo apt-get remove docker-compose
2020-12-14 15:32:10 +00:00
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2020-12-14 15:25:07 +00:00
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```
### ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
```sh
sudo reboot
```
### ERROR: Permission denied while trying to connect to the Docker daemon
```sh
sudo usermod -a -G docker $USER
```
### ERROR: mountpoint for devices not found
e.g.
```
OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:297: applying cgroup configuration for process caused \"mountpoint for devices not found\"": unknown
```
#### Follow These Steps:
2020-12-15 16:03:52 +00:00
1. Edit grub
2020-12-14 15:25:07 +00:00
```sh
sudo nano /etc/default/grub
```
2020-12-15 16:03:52 +00:00
2. Change `GRUB_CMDLINE_LINUX` value as below:
2020-12-14 15:25:07 +00:00
```
GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"
```
2020-12-15 16:03:52 +00:00
3. Reconfigure grub:
2020-12-14 15:25:07 +00:00
```sh
grub2-mkconfig
```
2020-12-15 16:03:52 +00:00
4. Finally reboot the system:
2020-12-14 15:25:07 +00:00
```sh
sudo reboot
```
2020-12-18 15:52:05 +00:00
### INTERNAL ERROR: cannot create temporary directory
2020-12-18 16:09:11 +00:00
From: [stackoverflow](https://stackoverflow.com/questions/40755494/docker-compose-internal-error-cannot-create-temporary-directory)
2020-12-18 15:52:05 +00:00
Looks like the docker host run out of free space.
Free up some space on your hard disk and reboot.
2020-12-18 16:09:11 +00:00
Sometimes that may happen due to a crazy docker service running wild.
You can try this to prune everything docker:
```sh
docker system prune -a --volumes
```