11

Overflow! I tried to transfer my docker-compose script from my ubuntu-workstation to my fedora laptop. when hitting

docker-compose up

I get following exception;

[polito@localhost dev]$ docker-compose up
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
[...]

What I tried: After googleing I found: deleting and reinstalling - did not work either.

Any idea how to fix?

Greetings!

R. Polito
  • 544
  • 6
  • 21
  • how did you install docker-compose? – Stefano Oct 05 '20 at 10:24
  • Maybe this will help [Link](https://stackoverflow.com/a/61339850/8214791) and what says `docker-compose status`? – Gregor Wedlich Oct 05 '20 at 10:25
  • @Stefano yes, i installed it: docker-compose version 1.27.4, build 40524192 – R. Polito Oct 05 '20 at 10:30
  • @GregorWedlich [polito@localhost ~]$ docker-compose status No such command: status Commands: build Build or rebuild services I am just spinning up a Keycloak in my docker-compose, no python needed there.. – R. Polito Oct 05 '20 at 10:31
  • Then you should install docker-compose correctly. Something seems to be wrong. – Gregor Wedlich Oct 05 '20 at 10:34
  • @GregorWedlich: but there's no status command in docker-compose. why should it work? I think some python3 library is missing instead. That's why I was asking how the docker-compose was installed – Stefano Oct 05 '20 at 10:57
  • @R.Polito: try to install docker-compose using `pip install docker-compose` (on some distros you might need `pip3`) as specified in https://docs.docker.com/compose/install/#install-using-pip – Stefano Oct 05 '20 at 11:03
  • Yes Ignore that please. I also meant docker-compose version. And that works for you. – Gregor Wedlich Oct 05 '20 at 11:03
  • @GregorWedlich reinstalled, still not working. – R. Polito Oct 05 '20 at 12:21

5 Answers5

13

Had the same issue on my side. The docker daemon simply wasn't up.

sudo systemctl start docker

fixed it for me

iamkirill
  • 310
  • 1
  • 6
  • 12
Axl Jones
  • 130
  • 2
  • 5
  • Handled specifically for macOS at [apple.stackexchange.com/questions/373888](//apple.stackexchange.com/questions/373888). – cachius Aug 16 '22 at 10:04
6

Please, follow these steps: https://docs.docker.com/engine/install/linux-postinstall/. It helped me.

0

Please re-install docker-compose

Example:

$ 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

$ sudo chmod +x /usr/local/bin/docker-compose

$ docker-compose --version

Gregor Wedlich
  • 654
  • 6
  • 14
  • docker-compose version 1.27.4, build 40524192, same exception – R. Polito Oct 05 '20 at 12:19
  • Have you tested the installation with pip? Maybe it is a Fedora specific problem. – Gregor Wedlich Oct 05 '20 at 12:31
  • I don't think we can help you. Would have to see what is in your compose file and how your environment is structured. – Gregor Wedlich Oct 05 '20 at 16:20
  • sure, sorry version: "3" services: # KEYCLOAK STUFF keycloak: container_name: keycloak image: jboss/keycloak ports: - 8081:8080 environment: DB_VENDOR: mariadb DB_ADDR: authenticationDB DB_DATABASE: keycloak DB_USER: keycloak DB_PASSWORD: password KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: admin JGROUPS_DISCOVERY_PROTOCOL: JDBC_PING JGROUPS_DISCOVERY_PROPERTIES: datasource_jndi_name=java:jboss/datasources/KeycloakDS,info_writer_sleep_time=500 depends_on: - authenticationDB – R. Polito Oct 05 '20 at 17:11
  • authenticationDB: container_name: authenticationDB image: mariadb volumes: - ./keycloakDB:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: keycloak MYSQL_USER: keycloak MYSQL_PASSWORD: password healthcheck: test: ["CMD", "mysqladmin", "ping", "--silent"] – R. Polito Oct 05 '20 at 17:11
  • @GregorWed'll just reroll to ubuntu - I know it's working there.. – R. Polito Oct 05 '20 at 17:21
  • Yes i think is better. I also work with docker only on Debian or Ubuntu. – Gregor Wedlich Oct 05 '20 at 18:18
0

Meight not be an answer but: I rerolled back to Ubuntu and updated the kernel to work with "Ryzen 5 4500U"

Working fine now, still not knowing why it's not working on fedora :s

R. Polito
  • 544
  • 6
  • 21
-1

I had a silly issue. I restarted the machine and forgot to check if the docker desktop is running or not. Make sure your docker instance is running. Hope it helps someone like me.

Sundeep
  • 2,035
  • 2
  • 23
  • 38