본문 바로가기

일기 혹은 일지/업무관련

HLF2.0 fabric 체인코드 node로 설치시 에러

....
===================== Checking the commit readiness of the chaincode definition successful on peer0.org2 on channel 'mychannel' ===================== 
Using organization 1
Using organization 2
++ peer lifecycle chaincode commit -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --channelID mychannel --name basic --peerAddresses localhost:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt --version 1.0 --sequence 1
++ res=0
2020-08-25 17:37:18.868 KST [chaincodeCmd] ClientWait -> INFO 001 txid [b262f168c0b90e93d4f727383da87948591bd3559b81cde94f86176f2362b525] committed with status (VALID) at localhost:9051
2020-08-25 17:37:18.870 KST [chaincodeCmd] ClientWait -> INFO 002 txid [b262f168c0b90e93d4f727383da87948591bd3559b81cde94f86176f2362b525] committed with status (VALID) at localhost:7051
===================== Chaincode definition committed on channel 'mychannel' ===================== 

Using organization 1
===================== Querying chaincode definition on peer0.org1 on channel 'mychannel'... ===================== 
Attempting to Query committed status on peer0.org1, Retry after 3 seconds.
++ peer lifecycle chaincode querycommitted --channelID mychannel --name basic
++ res=0

Committed chaincode definition for chaincode 'basic' on channel 'mychannel':
Version: 1.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true]
===================== Query chaincode definition successful on peer0.org1 on channel 'mychannel' ===================== 

Using organization 2
===================== Querying chaincode definition on peer0.org2 on channel 'mychannel'... ===================== 
Attempting to Query committed status on peer0.org2, Retry after 3 seconds.
++ peer lifecycle chaincode querycommitted --channelID mychannel --name basic
++ res=0

Committed chaincode definition for chaincode 'basic' on channel 'mychannel':
Version: 1.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true]
===================== Query chaincode definition successful on peer0.org2 on channel 'mychannel' ===================== 

===================== Chaincode initialization is not required ===================== 

​

 

 

 해결

https://www.codingdefined.com/2015/06/nodejs-error-errno-eaiagain.html

npm ERR! code EAI_AGAIN 
npm ERR! errno EAI_AGAIN

 

최신 노드모듈이나 이와 관련한 인스톨이 정상동작하지 않을때 발생하는 Error라고 한다.

 

그래서 확인해보니, DNS 설정이 DID 프로젝트 구성때문에 잘못되 있는것이 확인되었다..

 

본래의 DNS로 설정하니 정상 동작했다!

 

 

/opt/gopath/src/github.com/hyperledger/fabric-samples/test-network$ ./network.sh deployCC -l javascript
deploying chaincode on channel 'mychannel'

Using organization 1
++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/javascript/ --lang node --label fabcar_1
++ res=0
++ set +x
===================== Chaincode is packaged on peer0.org1 ===================== 

Installing chaincode on peer0.org1...
Using organization 1
++ peer lifecycle chaincode install fabcar.tar.gz
++ res=1
++ set +x
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "+ INPUT_DIR=/chaincode/input
+ OUTPUT_DIR=/chaincode/output
+ cp -R /chaincode/input/src/. /chaincode/output
+ cd /chaincode/output
+ '[' -f package-lock.json -o -f npm-shrinkwrap.json ]
+ npm install --production
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/fabric-contract-api failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-02T04_40_57_922Z-debug.log
"
!!!!!!!!!!!!!!! Chaincode installation on peer0.org1 has failed !!!!!!!!!!!!!!!!

ERROR !!! Deploying chaincode failed

 

정상동작한것을 알 수 있다.

 

 

 

'일기 혹은 일지 > 업무관련' 카테고리의 다른 글

에러코드, 메시지 적용한 fabcar  (0) 2020.06.04
iOS 인증서 갱신  (0) 2020.06.01
엑셀함수  (0) 2020.02.18
[Elasticsearch] Index vs Indices  (0) 2019.11.25
Elasticsearch.yml  (0) 2019.11.25