ошибка: -< /p>
Код: Выделить всё
root@bb48fb67e34d:/opt/gopath/src/github.com/patient-chaincode/patient-chaincode# peer lifecycle chaincode install patient-chaincode.tar.gz
Error: failed to retrieve endorser client for install: endorser client failed to connect to peer0.hospital.health.cl:7056: failed to create new connection: context deadline exceeded
когда я проверил журналы больничной организации: -
Код: Выделить всё
2024-10-07 10:45:02.348 UTC 0deb ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 666.832µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=127.0.0.1:53694
2024-10-07 10:45:02.348 UTC 0ded DEBU [grpc] InfoDepth -> [core] [Server #1] grpc: Server.Serve failed to create ServerTransport: connection error: desc = "ServerHandshake(\"127.0.0.1:53694\") failed: remote error: tls: bad certificate"
2024-10-07 10:45:02.348 UTC 0dec DEBU [grpc] InfoDepth -> [core] Creating new client transport to "{Addr: \"127.0.0.1:7051\", ServerName: \"127.0.0.1:7051\", }": connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"
2024-10-07 10:45:02.348 UTC 0dee DEBU [grpc] WarningDepth -> [core] [Channel #101 SubChannel #102] grpc: addrConn.createTransport failed to connect to {Addr: "127.0.0.1:7051", ServerName: "127.0.0.1:7051", }. Err: connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"
2024-10-07 10:45:02.348 UTC 0def DEBU [grpc] InfoDepth -> [core] [Channel #101 SubChannel #102] Subchannel Connectivity change to TRANSIENT_FAILURE, last error: connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"
2024-10-07 10:45:02.348 UTC 0df0 DEBU [grpc] InfoDepth -> [core] [pick-first-lb 0xc00014e900] Received SubConn state update: 0xc00014e990, {ConnectivityState:TRANSIENT_FAILURE ConnectionError:connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"}
Код: Выделить всё
PeerOrgs:
- Name: Org1
Domain: hospital.health.cl
EnableNodeOUs: true
Template:
Count: 1
TLS:
Enabled: true
Hosts:
- peer0.hospital.health.cl
- 127.0.0.1
Users:
Count: 1
Код: Выделить всё
peer0_org1:
image: hyperledger/fabric-peer
environment:
- CORE_PEER_ID=peer0.hospital.health.cl
- CORE_PEER_ADDRESS=peer0.hospital.health.cl:7056
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.hospital.health.cl:7056
- CORE_PEER_LOCALMSPID=Org1MSP
- FABRIC_LOGGING_SPEC=DEBUG
- CORE_PEER_MSPCONFIGPATH=/var/hyperledger/peer/msp
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/peer/tls/ca.crt
- CORE_PEER_TLS_CERT_FILE=/var/hyperledger/peer/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/var/hyperledger/peer/tls/server.key
ports:
- "7056:7051"
- "7060:7052"
networks:
- my-network
volumes:
- ./crypto-config/peerOrganizations/hospital.health.cl/peers/peer0.hospital.health.cl/msp:/var/hyperledger/peer/msp
- ./crypto-config/peerOrganizations/hospital.health.cl/peers/peer0.hospital.health.cl/tls:/var/hyperledger/peer/tls
command: peer node start
Код: Выделить всё
curl -v https://peer0.hospital.health.cl:7056 --cacert /var/hyperledger/peer/tls/ca.crt
Код: Выделить всё
* Trying 64.190.63.222:7056...
* connect to 64.190.63.222 port 7056 failed: Connection refused
* Failed to connect to peer0.hospital.health.cl port 7056 after 449 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to peer0.hospital.health.cl port 7056 after 449 ms: Connection refused
Все докер-контейнеры работают на назначенных им портах, и одноранговые узлы существуют в сети.
Подробнее здесь: https://stackoverflow.com/questions/790 ... ger-fabric