Prisma1: Docker-compose up printing some error messages on a ubuntu wsl machine

Created on 12 Sep 2020  ·  15Comments  ·  Source: prisma/prisma1

Bug description


Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "docker/transport/unixconn.py", line 43, in connect
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "requests/adapters.py", line 449, in send
File "urllib3/connectionpool.py", line 727, in urlopen
File "urllib3/util/retry.py", line 403, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "docker/api/client.py", line 205, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 228, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bin/docker-compose", line 3, in
File "compose/cli/main.py", line 67, in main
File "compose/cli/main.py", line 123, in perform_command
File "compose/cli/command.py", line 69, in project_from_options
File "compose/cli/command.py", line 132, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 188, in __init__
File "docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

How to reproduce


Just running docker-compose up -d causes the issue

Expected behavior


create a database and start the proxy server

Prisma information


Haven't made one yet

Environment & setup

  • OS: WSL Ubuntu 18.04-->
  • Database: MySQL
  • Node.js version: v10.22.0 -->
  • Prisma version: prisma/1.34.10 (linux-x64)

Most helpful comment

I resolved myself.
no docker command was installed lol

how did you install docker?

Like below.
curl https://get.docker.com | sh
sudo usermod -aG docker $USER
sudo reboot
sudo systemctl start docker
sudo systemctl enable docker
Thanks to here<- Written in Japanese.

I installed docker environment once.
But the environment conflicted with centos. That is for debian.
So, I retried install, but my brain conflicted this turn.

All 15 comments

Do you have the privileges configured correctly for docker?
Try running the same command with sudo:
$ sudo docker-compose up -d

If that works, try with these steps in order to get docker working without sudo.

I am having the same problem. Just recently installed Ubuntu 20

I have same issue on debian.

Do you have the privileges configured correctly for docker?
Try running the same command with sudo:
$ sudo docker-compose up -d

If that works, try with these steps in order to get docker working without sudo.

nope. same error.

I resolved myself.
no docker command was installed lol

I resolved myself.
no docker command was installed lol

how did you install docker?

I resolved myself.
no docker command was installed lol

how did you install docker?

Like below.
curl https://get.docker.com | sh
sudo usermod -aG docker $USER
sudo reboot
sudo systemctl start docker
sudo systemctl enable docker
Thanks to here<- Written in Japanese.

I installed docker environment once.
But the environment conflicted with centos. That is for debian.
So, I retried install, but my brain conflicted this turn.

Same problem on centos 8

Yeah, i was having the same problem.. turns out i had uninstalled docker and didn't know..
Please, make sure you guys have docker command installed
Link to docker install

Alright guys, thank you all, you're answers we're really helpful, I solved the issue.

first I had to upgrade WSL 1 to 2 so docker-compose can run (there's a workaround for WSL 1 as well if you wish to use it). Second thing is installing the docker engine probably (Yeah, I didn't install it correctly somehow).
I also installed docker desktop for windows and activated the wsl 2 thingy.
that's it for the most part. I'm closing the issue, thank you all.

I belive the information above might lead to mistake.
When Docker Desktop is installed and the WSL 2 based engine is selected, that can be integrated into WSL without the need to install docker engine in WSL. Docker best practices actually recommend against it.

Instead, integration needs to be explicitely enabled:
image

See Docker Desktop WSL 2 backend for details.

Minor addition for further desperades: It is also possible you have docker installed and just not running, sudo systemctl start docker.service helped me in that case.

just ensure that docker daemon is running!
how?

$ docker info

if output is like this following:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.5.0)

Server:
ERROR: Error response from daemon: dial unix docker.raw.sock: connect: connection refused
errors pretty printing info

It means docker daemon in not running, then just start it, it depends of how do you installed and of your OS.

when docker daemon is running the docker info command will be like this:

➜  docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.5.0)

Server:
 Containers: 49
  Running: 1
  Paused: 0
  Stopped: 48
 Images: 23
 Server Version: 20.10.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.121-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 1.941GiB
 Name: docker-desktop
 ID: HG3C:BBZ7:KQGC:PLLR:3EJW:LELZ:EERS:G6L7:YCLU:PQQP:HLMU:Y3NJ
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Regards.

@gilabrantes
I had same problem today and I noticed that enabling Ubuntsu option had turned off after updating docker. 😢
ice_screenshot_20210417-142026

just ensure that docker daemon is running!
how?

$ docker info

if output is like this following:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.5.0)

Server:
ERROR: Error response from daemon: dial unix docker.raw.sock: connect: connection refused
errors pretty printing info

It means docker daemon in not running, then just start it, it depends of how do you installed and of your OS.

when docker daemon is running the docker info command will be like this:

➜  docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.5.0)

Server:
 Containers: 49
  Running: 1
  Paused: 0
  Stopped: 48
 Images: 23
 Server Version: 20.10.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.121-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 1.941GiB
 Name: docker-desktop
 ID: HG3C:BBZ7:KQGC:PLLR:3EJW:LELZ:EERS:G6L7:YCLU:PQQP:HLMU:Y3NJ
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Regards.

Works for me! Thanks!!!! :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marktani picture marktani  ·  62Comments

sorenbs picture sorenbs  ·  52Comments

marktani picture marktani  ·  34Comments

blocka picture blocka  ·  74Comments

sorenbs picture sorenbs  ·  43Comments