Skip to content

Instantly share code, notes, and snippets.

@rafarocha
Last active October 30, 2019 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafarocha/a78d482fb2880f81894c79dfdb24e86b to your computer and use it in GitHub Desktop.
Save rafarocha/a78d482fb2880f81894c79dfdb24e86b to your computer and use it in GitHub Desktop.
problemas_tutorial_hyperledger.md

problema 1

descricao

container hyperledger/fabric-ca não inicia apos rodar start.sh, pag 3

motivo

docker logs <container_id_hyperledger/fabric-ca>

2019/10/29 23:57:44 [INFO] Configuration file location: /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml
2019/10/29 23:57:44 [INFO] Starting server in home directory: /etc/hyperledger/fabric-ca-server
2019/10/29 23:57:44 [INFO] Server Version: 1.4.3
2019/10/29 23:57:44 [INFO] Server Levels: &{Identity:2 Affiliation:1 Certificate:1 Credential:1 RAInfo:1 Nonce:1}
Error: Failed to find private key for certificate in '/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem': 
    Could not find matching private key for SKI: Failed getting key 
    for SKI [[7 225 238 190 2 189 174 34 132 66 236 114 20 241 241 55 254 81 237 76 118 46 245 59 37 168 84 150 43 205 247 79]]: 
    Key with SKI 07e1eebe02bdae228442ec7214f1f137fe51ed4c762ef53b25a854962bcdf74f 
        not found in /etc/hyperledger/fabric-ca-server/msp/keystore

como chequei e tentei corrigir

  1. tentei encontrar onde esta a chave SKI, citada acima
# find . -name "07e1eebe02bdae228442ec7214f1f137fe51ed4c762ef53b25a854962bcdf74f_sk"
./crypto-config/peerOrganizations/org1.example.com/ca/07e1eebe02bdae228442ec7214f1f137fe51ed4c762ef53b25a854962bcdf74f_sk
  1. agora fui procurar onde tem o certificado (.pem) citado
# find . -name "ca.org1.example.com-cert.pem"
./crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
./crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
./crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
./crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
  1. tentativa de conserto
# sudo cp crypto-config/peerOrganizations/org1.example.com/ca/07e1eebe02bdae228442ec7214f1f137fe51ed4c762ef53b25a854962bcdf74f_sk /etc/hyperledger/fabric-ca-server/msp/keystore/
# sudo cp crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem /etc/hyperledger/fabric-ca-server-config/
docker start <container_id_hyperledger/fabric-ca>
docker logs <container_id_hyperledger/fabric-ca>

apos isso, o mesmo erro persiste ... tb tentei com o .pem da pasta `msp/cacerts da lista acima, sem sucesso

problema 2

descricao

... pendente ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment