rtCamp / Frappe-Manager

A CLI tool based on Docker Compose to easily manage Frappe based projects.
MIT License
109 stars 23 forks source link

Docker deamon not running error #83

Closed washaqq closed 8 months ago

washaqq commented 8 months ago

i installed fm right after installing python3.11 and Docker and i run the the code below to create ERPNext ;

# create example.localhost site with frappe, erpnext and hrms, version -> version-15
fm create example --apps erpnext:version-15 --apps hrms:version-15    

but i get this error;

❌ Docker daemon not running. Please start docker service.

and i checked if Docker is active by sudo systemctl is-active docker , i see it is active

i could not find the problem, fm installed on a freshly installed ubuntu 22.04 all updates, upgrades and restarts are done before.

System information:

docker-compose version 1.29.2, build unknown
docker-py version: 5.0.3
CPython version: 3.10.12
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022

Log ~/frappe/logs/fm.log : fm.log

Xieyt commented 8 months ago

As I can see in the logs

[2023-12-21 15:34:04,820] INFO: RUNNING COMMAND: create erpfast --apps erpnext:version-15 --apps hrms:version-15
[2023-12-21 15:34:04,820] INFO: --------------------
[2023-12-21 15:34:09,940] DEBUG: - -- -- -- -- -- -- -- -- -- -
[2023-12-21 15:34:09,940] DEBUG: DOCKER COMMAND: docker version --format json
[2023-12-21 15:34:09,967] DEBUG: {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"24.0.7","ApiVersion":"1.43","DefaultAPIVersion":"1.43","GitCommit":"afdd53b","GoVersion":"go1.20.10","Os":"linux","Arch":"amd64","BuildTime":"Thu Oct 26 09:07:41 2023","Context":"default"},"Server":null}
[2023-12-21 15:34:09,968] DEBUG: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied
[2023-12-21 15:34:09,972] DEBUG: RETURN CODE: 1
[2023-12-21 15:34:09,972] DEBUG: - -- -- -- -- -- -- -- -- -- -

Seems like your user doesn't have permission to run docker commands. To fix this issue you can add your current user to docker group using usermod -aG docker <youruser>

washaqq commented 8 months ago

As I can see in the logs

[2023-12-21 15:34:04,820] INFO: RUNNING COMMAND: create erpfast --apps erpnext:version-15 --apps hrms:version-15
[2023-12-21 15:34:04,820] INFO: --------------------
[2023-12-21 15:34:09,940] DEBUG: - -- -- -- -- -- -- -- -- -- -
[2023-12-21 15:34:09,940] DEBUG: DOCKER COMMAND: docker version --format json
[2023-12-21 15:34:09,967] DEBUG: {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"24.0.7","ApiVersion":"1.43","DefaultAPIVersion":"1.43","GitCommit":"afdd53b","GoVersion":"go1.20.10","Os":"linux","Arch":"amd64","BuildTime":"Thu Oct 26 09:07:41 2023","Context":"default"},"Server":null}
[2023-12-21 15:34:09,968] DEBUG: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied
[2023-12-21 15:34:09,972] DEBUG: RETURN CODE: 1
[2023-12-21 15:34:09,972] DEBUG: - -- -- -- -- -- -- -- -- -- -

Seems like your user doesn't have permission to run docker commands. To fix this issue you can add your current user to docker group using usermod -aG docker <youruser>

thank you for reply, i added the user to docker group, it did not solve the problem, still gives same error.

Xieyt commented 8 months ago

Are you able to run docker commands like docker version --format json normally using the same user ?

washaqq commented 8 months ago

Are you able to run docker commands like docker version --format json normally using the same user ?

i just rebooted the server, it seems working now, installing bunch of things., thank you for your help.