Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start services #17

Open
ishikaagarwal25 opened this issue May 22, 2022 · 2 comments
Open

Unable to start services #17

ishikaagarwal25 opened this issue May 22, 2022 · 2 comments

Comments

@ishikaagarwal25
Copy link

Everytime I try to start the services in Docker, it says "Error in plugin: Got 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/containers/json?filters=%7B%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied"

@ramazansakin
Copy link

Hi @ishikaagarwal25 ,
Could you solve ur problem ? If not, you can try below options if you are using Linux based OS or also Windows based is below after Linux options. I had issues like yours many years ago and I tried some of below options and mine is working great for a long time.

1 - Add yourself to the Docker group: If you don't want to use sudo every time you run Docker commands, you can add your user to the Docker group. Use the following command to add your user to the Docker group (replace with your actual username):

sudo usermod -aG docker

After running this command, you may need to log out and log back in for the group membership to take effect. Then, you should be able to run Docker commands without using sudo.

2 - Verify Docker daemon socket permissions: Check the permissions and ownership of the Docker daemon socket file /var/run/docker.sock using the ls -l command. It should typically have root ownership and be accessible to the Docker group:

ls -l /var/run/docker.sock

The output should be something like:

srw-rw---- 1 root docker 0 Jul 3 00:00 /var/run/docker.sock

If the ownership or permissions are different, you can adjust them using the chown and chmod commands:

sudo chown root:docker /var/run/docker.sock
sudo chmod 660 /var/run/docker.sock

3 - Restart Docker service: Sometimes, restarting the Docker service can help resolve permission-related issues. You can restart the Docker service with the following command:

sudo systemctl restart docker

4 - Reinstall Docker: If none of the above steps work, you may want to consider reinstalling Docker to ensure all the necessary files and permissions are set up correctly. Instructions for reinstalling Docker will depend on your operating system and the method you used to install Docker initially.

Windows:

1 - Run Docker as Administrator: Right-click on the Docker Desktop icon or shortcut and select "Run as administrator." This ensures that Docker has the necessary permissions to access the Docker daemon.

2 - Check Docker daemon status: Open a Command Prompt or PowerShell with administrator privileges and run the following command to check the status of the Docker daemon:

docker version

If the daemon is not running, you can start it by running:

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock docker

This command starts a temporary container that mounts the Docker daemon socket from the host.

3 - Verify Docker daemon socket permissions: Check the permissions and ownership of the Docker daemon socket file. The socket file location can vary depending on your Docker installation, but it is typically found at \.\pipe\docker_engine. Right-click on the Docker icon in the system tray, go to "Settings," and navigate to the "General" tab to confirm the socket location. Ensure that the file permissions allow Docker to access it.

4 - Restart Docker Desktop: You can try restarting Docker Desktop to see if it resolves the issue. Right-click on the Docker icon in the system tray, select "Quit Docker Desktop," and then relaunch it.

5 - Reinstall Docker Desktop: If the above steps do not resolve the issue, you may want to consider reinstalling Docker Desktop. Download the latest version of Docker Desktop from the Docker website and follow the installation instructions. This process will overwrite any existing Docker configurations, which may help resolve any permission-related problems.

@abhisheknathe
Copy link

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in I:\Online Book Store App\BookStoreApp-Distributed-Application\bookstore-frontend-react-app\node_modules\postcss-safe-parser\node_modules\postcss\package.json
at new NodeError (node:internal/errors:399:5)
at exportsNotFound (node:internal/modules/esm/resolve:361:10)

Getting this error while doing the yarn start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants