title: Problem Setting Up Hyperledger Fabric on Multiple Hosts
body: <p>I am trying to set up Hyperledger Fabric on multiple hosts using different AWS EC2 instances. I am having a problem setting up the peer on the second instance.</p>
  
  <p>I have been following the guide in this medium article:</p>
  
  <p><a href="https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f" rel="nofollow noreferrer">https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f</a></p>
  
  <p>I got as far as step 6 under Setting Up the Network which sets up a peer on the second instance.</p>
  
  <p>I used this command: </p>
  
  <pre><code>docker run --rm -it --network="my-net" --link orderer.example.com:orderer.example.com --link peer0.org1.example.com:peer0.org1.example.com --name peer1.org1.example.com -p 9051:7051 -p 9053:7053 -e CORE_LEDGER_STATE_STATEDATABASE=CouchDB -e CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984 -e CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= -e CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock -e FABRIC_LOGGING_SPEC=DEBUG -e CORE_PEER_NETWORKID=peer1.org1.example.com -e CORE_NEXT=true -e CORE_PEER_ENDORSER_ENABLED=true -e CORE_PEER_ID=peer1.org1.example.com -e CORE_PEER_PROFILE_ENABLED=true -e CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 -e CORE_PEER_GOSSIP_ORGLEADER=true -e CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051 -e CORE_PEER_GOSSIP_IGNORESECURITY=true -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=my-net -e CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 -e CORE_PEER_GOSSIP_USELEADERELECTION=false -e CORE_PEER_TLS_ENABLED=false -v /var/run/:/host/var/run/ -v $(pwd)/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp -w /opt/gopath/src/github.com/hyperledger/fabric/peer hyperledger/fabric-peer peer node start
  </code></pre>
  
  <p>And it resulted in this error:</p>
  
  <pre><code>2019-04-24 20:06:29.798 UTC [msp] getSigningIdentityFromConf -&gt; DEBU 036 Could not find SKI [8d25ff0a9c02de411acf743e7a6577fac0573d0d2561f988fb2305be74918de7], trying KeyMaterial field: Key with SKI 8d25ff0a9c02de411acf743e7a6577fac0573d0d2561f988fb2305be74918de7 not found in /etc/hyperledger/fabric/msp/keystore
  Failed getting key for SKI [[141 37 255 10 156 2 222 65 26 207 116 62 122 101 119 250 192 87 61 13 37 97 249 136 251 35 5 190 116 145 141 231]]
  github.com/hyperledger/fabric/bccsp/sw.(*CSP).GetKey
      /opt/gopath/src/github.com/hyperledger/fabric/bccsp/sw/impl.go:170
  github.com/hyperledger/fabric/msp.(*bccspmsp).getSigningIdentityFromConf
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mspimpl.go:181
  github.com/hyperledger/fabric/msp.(*bccspmsp).setupSigningIdentity
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mspimplsetup.go:267
  github.com/hyperledger/fabric/msp.(*bccspmsp).preSetupV1
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mspimplsetup.go:413
  github.com/hyperledger/fabric/msp.(*bccspmsp).setupV1
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mspimplsetup.go:373
  github.com/hyperledger/fabric/msp.(*bccspmsp).setupV1-fm
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mspimpl.go:112
  github.com/hyperledger/fabric/msp.(*bccspmsp).Setup
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mspimpl.go:225
  github.com/hyperledger/fabric/msp/cache.(*cachedMSP).Setup
      /opt/gopath/src/github.com/hyperledger/fabric/msp/cache/cache.go:88
  github.com/hyperledger/fabric/msp/mgmt.LoadLocalMspWithType
      /opt/gopath/src/github.com/hyperledger/fabric/msp/mgmt/mgmt.go:32
  github.com/hyperledger/fabric/peer/common.InitCrypto
      /opt/gopath/src/github.com/hyperledger/fabric/peer/common/common.go:143
  github.com/hyperledger/fabric/peer/common.InitCmd
      /opt/gopath/src/github.com/hyperledger/fabric/peer/common/common.go:309
  github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute
      /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:746
  github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC
      /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:852
  github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute
      /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:800
  main.main
      /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:53
  runtime.main
      /opt/go/src/runtime/proc.go:201
  runtime.goexit
      /opt/go/src/runtime/asm_amd64.s:1333
  2019-04-24 20:06:29.798 UTC [main] InitCmd -&gt; ERRO 037 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp: KeyMaterial not found in SigningIdentityInfo
  </code></pre>
  
  <p>I have tried searching for a solution but wasn't able to find anything. I have little experience with Fabric. Any ideas?</p>