我一直在遵循IBM hyperledger项目上的说明来创建基本的待办事项,在遇到一些麻烦之后,我陷入了试图实例化链码的困境。
Here is the link to the project
我对这个项目的年代以及它是由旧版本的先决条件所产生的问题感到困惑。 我当前的版本是:
Go版本go1.11.1 linux / amd64
Docker版本18.09.0-ce-beta1,内部版本78a6bdb
节点v6.2.0
npm版本6.4.1
nvm版本0.33.11
我得到的错误如下:
red1010@red1010-XPS-L501X:~/fabric-sdk-node$ node
test/integration/e2e/instantiate-chaincode.js
info: Returning a new winston logger with default configurations
TAP version 13
#
***** End-to-end flow: instantiate chaincode *****
info: [Peer.js]: Peer.const - url: grpc://localhost:7051 options
grpc.ssl_target_name_override=peer0, grpc.default_authority=peer0
info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options
grpc.ssl_target_name_override=peer2, grpc.default_authority=peer2
info: [crypto_ecdsa_aes]: This class requires a CryptoKeyStore to save
keys, using the store: {"opts":{"path":"/home/red1010/.hfc-key-
store"}}
info: [Client.js]: Successfully loaded user "admin" from local key
value store
ok 1 Successfully loaded member from persistence
ok 2 Successfully enrolled user 'admin'
error: [Peer.js]: GRPC client got an error response from the peer
"grpc://localhost:8051". Error: Error starting container: Failed to
generate platform-specific docker build: Error returned from build: 1
"can't load package: package github.com/example_cc: no buildable Go
source files in /chaincode/input/src/github.com/example_cc
"
at /home/red1010/fabric-sdk-
node/node_modules/grpc/src/node/src/client.js:434:17
error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected:
Error: Error starting container: Failed to generate platform-specific
docker build: Error returned from build: 1 "can't load package:
package github.com/example_cc: no buildable Go source files in
/chaincode/input/src/github.com/example_cc
"
at /home/red1010/fabric-sdk-
node/node_modules/grpc/src/node/src/client.js:434:17
error: [Peer.js]: GRPC client got an error response from the peer
"grpc://localhost:7051". Error: Error starting container: Failed to
generate platform-specific docker build: Error returned from build: 1
"can't load package: package github.com/example_cc: no buildable Go
source files in /chaincode/input/src/github.com/example_cc
"
at /home/red1010/fabric-sdk-
node/node_modules/grpc/src/node/src/client.js:434:17
error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected:
Error: Error starting container: Failed to generate platform-specific
docker build: Error returned from build: 1 "can't load package:
package github.com/example_cc: no buildable Go source files in
/chaincode/input/src/github.com/example_cc
"
at /home/red1010/fabric-sdk-
node/node_modules/grpc/src/node/src/client.js:434:17
error: [install-chaincode]: instantiate proposal was bad
error: [install-chaincode]: instantiate proposal was bad
not ok 3 Failed to send instantiate Proposal or receive valid
response. Response null or status is not 200. exiting...
---
operator: fail
at: hfc.newDefaultKeyValueStore.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:228:6)
stack: |-
Error: Failed to send instantiate Proposal or receive valid
response. Response null or status is not 200. exiting...
at Test.assert [as _assert] (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:224:54)
at Test.bound [as _assert] (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:76:32)
at Test.fail (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:317:10)
at Test.bound [as fail] (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:76:32)
at hfc.newDefaultKeyValueStore.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:228:6)
at process._tickCallback
(internal/process/next_tick.js:103:7)
...
not ok 4 Error: Failed to send instantiate Proposal or receive valid
response. Response null or status is not 200. exiting... at
hfc.newDefaultKeyValueStore.then.then.then.then (/home/red1010/fabric-
sdk-node/test/integration/e2e/instantiate-chaincode.js:229:10) at
process._tickCallback (internal/process/next_tick.js:103:7)
---
operator: fail
at: hfc.newDefaultKeyValueStore.then.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:246:5)
stack: |-
Error: Error: Failed to send instantiate Proposal or receive
valid response. Response null or status is not 200. exiting...
at hfc.newDefaultKeyValueStore.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:229:10)
at process._tickCallback
(internal/process/next_tick.js:103:7)
at Test.assert [as _assert] (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:224:54)
at Test.bound [as _assert] (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:76:32)
at Test.fail (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:317:10)
at Test.bound [as fail] (/home/red1010/fabric-sdk-
node/node_modules/tape/lib/test.js:76:32)
at hfc.newDefaultKeyValueStore.then.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:246:5)
at process._tickCallback
(internal/process/next_tick.js:103:7)
...
info: [install-chaincode]: Disconnecting the event hub
info: [install-chaincode]: Disconnecting the event hub
not ok 5 Error: Error: Failed to send instantiate Proposal or receive
valid response. Response null or status is not 200. exiting... at
hfc.newDefaultKeyValueStore.then.then.then.then (/home/red1010/fabric-
sdk-node/test/integration/e2e/instantiate-chaincode.js:229:10) at
process._tickCallback (internal/process/next_tick.js:103:7)
---
operator: error
expected: |-
undefined
actual: |-
[Error: Error: Failed to send instantiate Proposal or receive
valid response. Response null or status is not 200. exiting...
at hfc.newDefaultKeyValueStore.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:229:10)
at process._tickCallback (internal/process/next_tick.js:103:7)]
at: Test.onetime (/home/red1010/fabric-sdk-
node/node_modules/onetime/index.js:22:12)
stack: |-
Error: Error: Failed to send instantiate Proposal or receive
valid response. Response null or status is not 200. exiting...
at hfc.newDefaultKeyValueStore.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:229:10)
at process._tickCallback
(internal/process/next_tick.js:103:7)
at hfc.newDefaultKeyValueStore.then.then.then.then.then
(/home/red1010/fabric-sdk-node/test/integration/e2e/instantiate-
chaincode.js:247:9)
at process._tickCallback
(internal/process/next_tick.js:103:7)
...
1..5
# tests 5
# pass 2
# fail 3