Got permission denied while trying to connect to the Docker daemon socket

Hi, I am going through User Guide - Developing CWL Workflows with VSCode section (Arvados | Developing CWL Workflows with VSCode). I have already done SSH Setup and VSCode setup. I am connected via SSH. and I have cloned Repo. All goes well until ponit 3.1 where I am getting :

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.40/version: dial unix /var/run/docker.sock: connect: permission denied

I have checked and indeed, I am NOT listed a user when I do:

cat /etc/group | grep docker

docker:x:998:javier,ward,tom,lucas,tetron,swz,jbertoli,nico,peteramstutz,peteramstutz2,mrubenfield,timehrhart,juliabollrath,lianglull1,franklinventura,rolandschmucki,innocentngwa,bartlomiejkeller,yogeshpaudel,martinmoench,moritzgilsdorf,manueldietrich,shangxue,matthiasmunz,stefaniebienertsb1,torumaruyama,raulrodriguezesteban,awz,luciaschmidt,daviddylus

Why am I not there and other useres are? (I do not have root access, so can not add myself to the docker group using `$ sudo addgroup $USER docker.)

Hi Agata, welcome!

Because Arvados playground is public, we don’t automatically give docker access because there are security implications.

I’ve added you to the docker group.

Thanks,
Peter

Thank you for adding me! I can see myself in a docker group now.

cat /etc/group | grep docker
docker:x:998:javier,ward,tom,lucas,tetron,swz,jbertoli,nico,peteramstutz,peteramstutz2,mrubenfield,timehrhart,juliabollrath,lianglull1,franklinventura,rolandschmucki,innocentngwa,bartlomiejkeller,yogeshpaudel,martinmoench,moritzgilsdorf,manueldietrich,shangxue,matthiasmunz,stefaniebienertsb1,torumaruyama,raulrodriguezesteban,awz,luciaschmidt,daviddylus,agtdziedzic

Do you have any idea why am I still getting the same “premission denied” error?

INFO Using cluster pirca (https://workbench2.pirca.arvadosapi.com/)
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.40/images/json?all=1: dial unix /var/run/docker.sock: connect: permission denied

What does the “groups” command say? You may need to log out and then log in again?

$ groups
agtdziedzic
$ groups agtdziedzic
agtdziedzic : agtdziedzic docker

I have log out and then log in again on Arvados Workbench2 in the browser and reconnected via SHH in VCStudio. Still the same error.

Hi Agata, I think I know what is happening, see the note at the bottom of the page:

https://doc.arvados.org/v2.3/user/cwl/arvados-vscode-training.html

If you need to change something about the environment of the user on the remote host (for example, the user has been added to a new unix group) you need to restart the vscode server that runs on the remote host. Do this in vscode:

ctrl+shift+p: Remote-SSH: Kill VS Code Server on Host

This is because the vscode server remains running on the remote host even after you disconnect, so exiting/restarting vscode on the desktop has no effect.

That was it! It works like a charm now. Thanks a lot!