Search code examples
docker-composehyperledgerhyperledger-composerhttp-proxy

Hyperledger Composer : Network install failing behind corporate proxy


I am trying to install Hyperledger composer .bna file onto a Hyperledger fabric network which is in Linux server.

As I am working behind corporate proxy system, I have provided proxy into /etc/environment file as well as to the docker. I also checked whether npm is working with proxy or not.

Everything works according to the tutorial till I reach network install command. which gives below error :

Error: Error trying install business network. Error: No valid responses from any peers.

Response from attempted peer comms was an error: Error: Failed to connect before the deadline

I have looked on the internet to find similar problems but everybody has atleast logs present in peer docker image. My docker peer image is not even showing any error logs.

It may be possible that due to proxy, composer command is not able to ping docker. What should I do in this condition ?


Solution

  • The problem was related to npm. Composer tries to install composer related libraries from npm registry but corporate proxy doesn't let you do that. Ask your admin if you have personalized npm registry(Generally corporations do). Also, remove all proxy from server, docker and npm. As you run "composer network install" give npmrcFile parameter with proxy and npm global parameter.

    npmrcFile :

    proxy=http://proxy:port/
    http-proxy=http://proxy:port/
    https-proxy=http://proxy:port/
    prefix=~/.npm-global