heroiclabs / nakama-godot

Godot client for Nakama server written in GDScript.
Apache License 2.0
609 stars 72 forks source link

docker-compose up ERROR: Couldn't connect to Docker daemon #62

Closed Shadowblitz16 closed 3 years ago

Shadowblitz16 commented 3 years ago

After following gdquest's tutorial here I ran into this issue when running docker-compose up..

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I checked my system manager and no godot instances are running there is no part in the video where he starts the docker

jonbonazza commented 3 years ago

This is not a nakama-godot issue.

This is an issue with your docker configuration. What OS are you on?

Shadowblitz16 commented 3 years ago

Zorin OS 15.3 which is a ubuntu based distro which gdquest was using

EDIT: here is my config..

version: '3'
services:
  cockroachdb:
    container_name: cockroachdb
    image: cockroachdb/cockroach:v19.2.5
    command: start --insecure --store=attrs=ssd,path=/var/lib/cockroach/
    restart: always
    volumes:
      - data:/var/lib/cockroach
    expose:
      - "8080"
      - "26257"
    ports:
      - "26257:26257"
      - "8080:8080"
  nakama:
    container_name: nakama
    image: heroiclabs/nakama:2.12.0
    entrypoint:
      - "/bin/sh"
      - "-ecx"
      - >
          /nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
          exec /nakama/nakama --name nakama1 --database.address root@cockroachdb:26257 --socket.server_key "nakama_godot_test"
    restart: always
    links:
      - "cockroachdb:db"
    depends_on:
      - cockroachdb
    volumes:
      - ./:/nakama/data
    expose:
      - "7349"
      - "7350"
      - "7351"
    ports:
      - "7349:7349"
      - "7350:7350"
      - "7351:7351"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:7350/"]
      interval: 10s
      timeout: 5s
      retries: 5
volumes:
  data:
jonbonazza commented 3 years ago

Is the docker daemon started?

Run docker start (may need to sudo

You can test if it's started by running docker ps but your previous error messages suggests it's not.

Shadowblitz16 commented 3 years ago

https://youtu.be/r3T_ED281vU?t=394 in the video he says docker-compose up starts it so obliviously there is misinfomation

there is no part in the video where he starts the docker using that command

also

sudo docker start
[sudo] password for shadowblitz16:
"docker start" requires at least 1 argument.
See 'docker start --help'.
jonbonazza commented 3 years ago

Sorry that was my fault. It should be started using whatever servicine manager your os uses, such as

sudo service docker start Or sudo systemctl start docker

Etc...

Afaik docker-compose will not start the docker daemon itself.

Shadowblitz16 commented 3 years ago

I don't know what service manager is. I was using zorin os 15.3

jonbonazza commented 3 years ago

I dont know anything about zorin. You can try both of fhe commands above and see if one of them works. If docket is running you should be able to run sudo docker ps and it should show nothing running

Shadowblitz16 commented 3 years ago

ok well I will try this some time in the future when I get back into godot. right now I am trying out the beef language. for now I will close this.