1

Following the tutorial and tool setup as outlined here; https://hyperledger.github.io/composer/installing/development-tools.html

On the very last step, I executed the script to download and install local Fabric runtime:

cd ~/fabric-tools
./downloadFabric.sh

The resulting log in the console contained this error at the very end:

# Pull and tag the latest Hyperledger Fabric base image.
docker pull hyperledger/fabric-peer:$ARCH-1.0.4
Warning: failed to get default registry endpoint from daemon (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.35/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/images/create?fromImage=hyperledger%2Ffabric-peer&tag=x86_64-1.0.4: dial unix /var/run/docker.sock: connect: permission denied

What should I do about this warning?

JamesD
  • 679
  • 10
  • 36
  • Somehow, I've lost the permissions in this Terminal shell once again. I just realized that I can no longer just run: $ docker version and get a successful response, I get the same permission denied error as above. What would make this shell loose permissions that were setup in the prior steps of the tutorial where the Path was modified?! – JamesD Jan 19 '18 at 03:24
  • 1
    I closed the shell, I shut down Ubuntu and restarted it, logged back in, started a new shell and voila, it works now. Why is it losing permissions intermittently?! – JamesD Jan 19 '18 at 03:29

2 Answers2

2

So your issue is a Docker issue - not a Hyperledger Composer issue FYI. I think this may help you https://techoverflow.net/2017/03/01/solving-docker-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket/

Possibly a docker install issue - didn't install correctly? See here https://superuser.com/questions/835696/how-solve-permission-problems-for-docker-in-ubuntu where it talks about being in the docker group. Or else you can find an answer on Google.

Paul O'Mahony
  • 6,740
  • 1
  • 10
  • 15
  • Log out and then log in again. That solved it for me (and it was actually said in an earlier stage of the hyperledger per-requisites installation process). – Ytsen de Boer Apr 03 '19 at 13:54
1

I think this answer might be the reason behind it. The shell keeps your session stored. SO, in order to get the updates working, you have to close the shell and restart it again. That's why it worked after the restart. Please correct me if I'm wrong!

PrashantNagawade
  • 426
  • 1
  • 6
  • 24
  • Ok, but this problem seems to be intermittent. One minute everything works with docker, then - somehow it will lose its permissions until I close the session again. – JamesD Jan 19 '18 at 14:28