Closed KennethNagin closed 7 years ago
@KennethNagin We updated quite a lot of modules with the last release, so please be sure you start from a complete clean environment, removing all your previous installed dependencies.
rm -rf node_modules client/assets/node_modules
npm install
Try again and keep us updated about this issue.
removing nod_modules .... does not fix the problem. It is still throwing Not Found exceptions.
@KennethNagin It seems something went wrong with your angular dependencies.
I believe a cd client/assets && npm install
can solve this, but before doing that, could you please paste here the output of a clean npm install
? So, we can hopefully figure it out why the client dependencies are not installed correctly.
Now I can browse to 8080 without incurring an exception. But Login fails and throws an exception.
Here are the traces that you ask for and more:
Without cloning again:
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo npm install
[sudo] password for nagin:
npm WARN lifecycle server@0.0.0~postinstall: cannot run in wd %s %s (wd=%s) server@0.0.0 npm run install-dependencies /home/nagin/work/src/github.com/fabric-boilerplate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
After cloning the boilerplate
*******************************npm install of boilerplate***************************
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$
******************client/assert npm install
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate/client/assets$ sudo npm install
client@0.0.0 /home/nagin/work/src/github.com/fabric-boilerplate/client/assets
\u251c\u2500\u2500 angular@1.6.0
\u251c\u2500\u2500 angular-route@1.6.0
\u251c\u2500\u2500 bootstrap@3.3.7
\u2514\u2500\u2500 ngstorage@0.3.11
*****************bring up fabric with docker-compose*****************************
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo docker-compose up
Creating fabricboilerplate_membersrvc_1
Creating fabricboilerplate_vp0_1
Attaching to fabricboilerplate_membersrvc_1, fabricboilerplate_vp0_1
vp0_1 | 12:13:35.218 [peer] func1 -> INFO 001 Auto detected peer address: 172.17.0.3:7051
vp0_1 | 12:13:35.219 [peer] func1 -> INFO 002 Auto detected peer address: 172.17.0.3:7051
vp0_1 | 12:13:35.221 [nodeCmd] serve -> INFO 003 Security enabled status: true
vp0_1 | 12:13:35.222 [nodeCmd] serve -> INFO 005 Privacy enabled status: false
vp0_1 | 12:13:35.223 [db] open -> INFO 006 Setting rocksdb maxLogFileSize to 10485760
vp0_1 | 12:13:35.223 [db] open -> INFO 007 Setting rocksdb keepLogFileNum to 10
vp0_1 | 12:13:35.222 [eventhub_producer] start -> INFO 004 event processor started
vp0_1 | 12:13:35.320 [crypto] RegisterValidator -> INFO 008 Registering validator [test_vp0] with name [test_vp0]...
vp0_1 | 12:13:35.402 [crypto] RegisterValidator -> INFO 009 Registering validator [test_vp0] with name [test_vp0]...done!
vp0_1 | 12:13:35.403 [crypto] InitValidator -> INFO 00a Initializing validator [test_vp0]...
vp0_1 | 12:13:35.418 [crypto] InitValidator -> INFO 00b Initializing validator [test_vp0]...done!
vp0_1 | 12:13:35.419 [chaincode] NewChaincodeSupport -> INFO 00c Chaincode support using peerAddress: 172.17.0.3:7051
vp0_1 | 12:13:35.420 [sysccapi] RegisterSysCC -> WARN 00d Currently system chaincode does support security(noop,github.com/hyperledger/fabric/bddtests/syschaincode/noop)
vp0_1 | 12:13:35.421 [state] loadConfig -> INFO 00e Loading configurations...
vp0_1 | 12:13:35.422 [state] loadConfig -> INFO 00f Configurations loaded. stateImplName=[buckettree], stateImplConfigs=map[bucketCacheSize:%!s(int=100) numBuckets:%!s(int=1000003) maxGroupingAtEachLevel:%!s(int=5)], deltaHistorySize=[500]
vp0_1 | 12:13:35.422 [state] NewState -> INFO 010 Initializing state implementation [buckettree]
vp0_1 | 12:13:35.423 [buckettree] initConfig -> INFO 011 configs passed during initialization = map[string]interface {}{"maxGroupingAtEachLevel":5, "bucketCacheSize":100, "numBuckets":1000003}
vp0_1 | 12:13:35.423 [buckettree] initConfig -> INFO 012 Initializing bucket tree state implemetation with configurations &{maxGroupingAtEachLevel:5 lowestLevel:9 levelToNumBucketsMap:map[7:40001 6:8001 1:3 8:200001 9:1000003 4:321 0:1 5:1601 3:65 2:13] hashFunc:0xab4dc0}
vp0_1 | 12:13:35.424 [buckettree] newBucketCache -> INFO 013 Constructing bucket-cache with max bucket cache size = [100] MBs
vp0_1 | 12:13:35.424 [buckettree] loadAllBucketNodesFromDB -> INFO 014 Loaded buckets data in cache. Total buckets in DB = [0]. Total cache size:=0
vp0_1 | 12:13:35.424 [genesis] func1 -> INFO 015 Creating genesis block.
vp0_1 | 12:13:35.427 [consensus/controller] NewConsenter -> INFO 016 Creating default consensus plugin (noops)
vp0_1 | 12:13:35.427 [consensus/noops] newNoops -> INFO 017 NOOPS consensus type = *noops.Noops
vp0_1 | 12:13:35.428 [consensus/noops] newNoops -> INFO 018 NOOPS block size = 500
vp0_1 | 12:13:35.428 [consensus/noops] newNoops -> INFO 019 NOOPS block wait = 1s
vp0_1 | 12:13:35.429 [consensus/statetransfer] blockThread -> INFO 01a Validated blockchain to the genesis block
vp0_1 | 12:13:35.430 [rest] StartOpenchainRESTServer -> INFO 01b Initializing the REST service on 0.0.0.0:7050, TLS is disabled.
vp0_1 | 12:13:35.430 [nodeCmd] serve -> INFO 01c Starting peer with ID=name:"vp0" , network ID=dev, address=172.17.0.3:7051, rootnodes=, validator=true
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo npm start
[sudo] password for nagin:
> server@0.0.0 start /home/nagin/work/src/github.com/fabric-boilerplate1
> npm run build-css | npm run watch-css | npm run nodemon
> server@0.0.0 nodemon /home/nagin/work/src/github.com/fabric-boilerplate1
> GOPATH=$(pwd) nodemon ./bin/www
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
Rendering Complete, saving .css file...
Wrote CSS to /home/nagin/work/src/github.com/fabric-boilerplate1/client/assets/css/main.css
info: [SDK] Initializing the blockchain
info: [SDK] Running in local mode
info: [SDK] Connected to memberservice and peer
info: [NodeJS] Express server listening at http://localhost:8080
info: [SDK] Successfully registered WebAppAdmin
info: [SDK] Going to register users
info: [SDK] Checking if redeploy is needed
info: [SDK] User john1 is already enrolled
info: [SDK] User jane1 is already enrolled
info: [SDK] Using previously deployed chaincode: c48beb2a0373481c1ca702579df799e9a19420f6c78f7c8efc462b0db619641d
info: [SDK] Executing after deployment
info: [SDK] Watching /home/nagin/work/src/github.com/fabric-boilerplate1/src/build-chaincode for changes...
**********************browse to 8080 ***********************************
*********************login to john1 ************************************
*********************************************** npm start boilerplate ****************************
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo npm start
[sudo] password for nagin:
> server@0.0.0 start /home/nagin/work/src/github.com/fabric-boilerplate1
> npm run build-css | npm run watch-css | npm run nodemon
> server@0.0.0 nodemon /home/nagin/work/src/github.com/fabric-boilerplate1
> GOPATH=$(pwd) nodemon ./bin/www
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
Rendering Complete, saving .css file...
Wrote CSS to /home/nagin/work/src/github.com/fabric-boilerplate1/client/assets/css/main.css
info: [SDK] Initializing the blockchain
info: [SDK] Running in local mode
info: [SDK] Connected to memberservice and peer
info: [NodeJS] Express server listening at http://localhost:8080
info: [SDK] Successfully registered WebAppAdmin
info: [SDK] Going to register users
info: [SDK] Checking if redeploy is needed
info: [SDK] User john1 is already enrolled
info: [SDK] User jane1 is already enrolled
info: [SDK] Using previously deployed chaincode: c48beb2a0373481c1ca702579df799e9a19420f6c78f7c8efc462b0db619641d
info: [SDK] Executing after deployment
info: [SDK] Watching /home/nagin/work/src/github.com/fabric-boilerplate1/src/build-chaincode for changes...
***************************browse to 8080 *******************************
***************************login john1******************************
debug: Login attempt w/ username: john1
error: [SDK] error on query: {"error":{"code":2,"metadata":{"_internal_repr":{}}},"msg":"Error: sql: no rows in result set"}
error:
{ error: { code: 2, metadata: { _internal_repr: {} } },
msg: 'Error: sql: no rows in result set' }
(node:25810) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): [object Object]
debug: Login attempt w/ username: john1
@KennethNagin Be sure to clean your docker containers and deploying data (rm -rf blockchain/deployLocal/*
) before starting up a new network, otherwise the application will try to use the latest deployed chaincode with the ID specified in _blockchain/deployLocal/chaincodeid (and the container could be inexistent or stopped).
That is automatically done by the ./start.sh
script.
Could you please paste the outputs from the following?
npm run gobuild
docker ps
(when your network is up and running)My previous comment is after doing a git clone of the boilerplate so it was clean. It also contains the log from the peer.
This next set of traces is starting with sudo ./start.sh. I do not think it is very revealing. I will happy to gather any additional information.
output from ./start.sh
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo ./start.sh
[sudo] password for nagin:
###################################################
##### HYPERLEDGER FABRIC START SCRIPT #####
###################################################
Blockchain directory: /home/nagin/work/src/github.com/fabric-boilerplate/blockchain
Do you want to clear the environment? [y/N] y
keyValStore removed
Latest deployed removed
2041630c9653
717485b5ce0a
All docker containers removed
All chaincode images removed
All untagged images removed
Starting docker containers...
Docker containers up and running
server@0.0.0 start /home/nagin/work/src/github.com/fabric-boilerplate
npm run build-css | npm run watch-css | npm run nodemon
server@0.0.0 nodemon /home/nagin/work/src/github.com/fabric-boilerplate
GOPATH=$(pwd) nodemon ./bin/www
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
Rendering Complete, saving .css file...
Wrote CSS to /home/nagin/work/src/github.com/fabric-boilerplate/client/assets/css/main.css
Using credentials from file.
info: [SDK] Initializing the blockchain
info: [SDK] $GOPATH: /home/nagin/work/src/github.com/fabric-boilerplate
info: [SDK] Running in local mode
debug: [SDK] CA: grpc://localhost:7054
debug: [SDK] Peer: grpc://localhost:7051
info: [SDK] Connected to memberservice and peer
info: [NodeJS] Express server listening at http://localhost:8080
info: [SDK] Successfully registered WebAppAdmin
info: [SDK] Going to register users
debug: [SDK] Checking if redeploy is needed
debug: Found chaincode id from file:
debug: [SDK] Going to deploy chaincode
info: [SDK] User jane1 successfully registered and enrolled
info: [SDK] User john1 successfully registered and enrolled
debug: [SDK] Successfully deployed chaincode
debug: [SDK] Deploy result:
{ uuid: 'cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11',
chaincodeID: 'cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11',
result: undefined }
debug: Saving chaincode id cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11
info: [SDK] Watching /home/nagin/work/src/github.com/fabric-boilerplate/src/build-chaincode for changes...
info: [SDK] Done.
info: [SDK] Calling callback...
info: -- Deploying Test Data as WebAppAdmin --
(node:18411) DeprecationWarning: crypto.pbkdf2 without specifying a digest is deprecated. Please specify a digest
debug: [SDK] WebAppAdmin submitted invoke function add_test_data [{"id":"john1","firstName":"John","lastName":"Doe","things":["12345678","87654321"],"salt":"64b5861b28a44b84871fdc31693c5ec0","hash":"3e9826e914d12d7f41f19773d2b8bf7a714fd5b5a3bce109b5699b2641876432c096a103c3bae39117528e8a27a0b34d7d9accd56cb033d614c7a83c1ae67a72","address":"Dam 1, 1012 JS Amsterdam, The Netherlands","phoneNumber":"0900 0048","emailAddress":"johndoe@gmail.com","role":0},{"id":"jane1","firstName":"Jane","lastName":"Doe","things":["87654321"],"salt":"dc4a4ed0485bade14713bea3f1e1787b","hash":"ce2123dd8f12e64d3a4dfcb9e7f9fb7589f9f9506d09bed30890d7f0fefa6682646dd9d442edf8ad254dbd5824ac8806f422d603e26fef5c27679a33ce48d012","address":"128 West 44th Street, New York, NY 10036, United States","phoneNumber":"0900 0024","emailAddress":"janedoe@gmail.com","role":1}]
debug: -- Added testData
docker ps
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo docker ps[sudo] password for nagin:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
52ac4631079f hyperledger/fabric-peer:x86_64-0.6.1-preview "sh -c 'sleep 5; peer" 3 minutes ago Up 3 minutes 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp fabricboilerplate_vp0_1
2f3c4941a6d4 hyperledger/fabric-membersrvc:x86_64-0.6.1-preview "membersrvc" 3 minutes ago Up 3 minutes 0.0.0.0:7054->7054/tcp fabricboilerplate_membersrvc_1
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo docker-compose ps
Name Command State Ports
npm run gobuild
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ npm run gobuild
server@0.0.0 gobuild /home/nagin/work/src/github.com/fabric-boilerplate1
cd src/build-chaincode && GOPATH=$(pwd)/../.. && go build
@KennethNagin I still do not see the dev-..
container in the list of your docker containers. It means something went wrong during the deployment phase, that is why I asked you to paste the log of the peer related to that. Please have a look if your issue is similar to the one discussed in the last comments in #19 .
It looks like it can not find cannot find package "github.com/hyperledger/fabric/core/chaincode/shim
Here is the peer log:
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo docker log 52ac4631079f
docker: 'log' is not a docker command.
See 'docker --help'.
nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ sudo docker logs 52ac4631079f
16:22:09.935 [peer] func1 -> INFO 001 Auto detected peer address: 172.17.0.3:7051
16:22:09.935 [peer] func1 -> INFO 002 Auto detected peer address: 172.17.0.3:7051
16:22:09.937 [nodeCmd] serve -> INFO 003 Security enabled status: true
16:22:09.937 [eventhub_producer] start -> INFO 004 event processor started
16:22:09.937 [nodeCmd] serve -> INFO 005 Privacy enabled status: false
16:22:09.938 [db] open -> INFO 006 Setting rocksdb maxLogFileSize to 10485760
16:22:09.938 [db] open -> INFO 007 Setting rocksdb keepLogFileNum to 10
16:22:10.003 [crypto] RegisterValidator -> INFO 008 Registering validator [test_vp0] with name [test_vp0]...
16:22:10.076 [crypto] RegisterValidator -> INFO 009 Registering validator [test_vp0] with name [test_vp0]...done!
16:22:10.076 [crypto] InitValidator -> INFO 00a Initializing validator [test_vp0]...
16:22:10.091 [crypto] InitValidator -> INFO 00b Initializing validator [test_vp0]...done!
16:22:10.092 [chaincode] NewChaincodeSupport -> INFO 00c Chaincode support using peerAddress: 172.17.0.3:7051
16:22:10.093 [sysccapi] RegisterSysCC -> WARN 00d Currently system chaincode does support security(noop,github.com/hyperledger/fabric/bddtests/syschaincode/noop)
16:22:10.093 [state] loadConfig -> INFO 00e Loading configurations...
16:22:10.094 [state] loadConfig -> INFO 00f Configurations loaded. stateImplName=[buckettree], stateImplConfigs=map[maxGroupingAtEachLevel:%!s(int=5) bucketCacheSize:%!s(int=100) numBuckets:%!s(int=1000003)], deltaHistorySize=[500]
16:22:10.094 [state] NewState -> INFO 010 Initializing state implementation [buckettree]
16:22:10.094 [buckettree] initConfig -> INFO 011 configs passed during initialization = map[string]interface {}{"maxGroupingAtEachLevel":5, "bucketCacheSize":100, "numBuckets":1000003}
16:22:10.094 [buckettree] initConfig -> INFO 012 Initializing bucket tree state implemetation with configurations &{maxGroupingAtEachLevel:5 lowestLevel:9 levelToNumBucketsMap:map[3:65 0:1 9:1000003 8:200001 2:13 7:40001 5:1601 4:321 1:3 6:8001] hashFunc:0xab4dc0}
16:22:10.094 [buckettree] newBucketCache -> INFO 013 Constructing bucket-cache with max bucket cache size = [100] MBs
16:22:10.095 [buckettree] loadAllBucketNodesFromDB -> INFO 014 Loaded buckets data in cache. Total buckets in DB = [0]. Total cache size:=0
16:22:10.095 [genesis] func1 -> INFO 015 Creating genesis block.
16:22:10.099 [consensus/controller] NewConsenter -> INFO 016 Creating default consensus plugin (noops)
16:22:10.100 [consensus/noops] newNoops -> INFO 017 NOOPS consensus type = *noops.Noops
16:22:10.100 [consensus/noops] newNoops -> INFO 018 NOOPS block size = 500
16:22:10.100 [consensus/noops] newNoops -> INFO 019 NOOPS block wait = 1s
16:22:10.100 [consensus/statetransfer] blockThread -> INFO 01a Validated blockchain to the genesis block
16:22:10.102 [rest] StartOpenchainRESTServer -> INFO 01b Initializing the REST service on 0.0.0.0:7050, TLS is disabled.
16:22:10.102 [nodeCmd] serve -> INFO 01c Starting peer with ID=name:"vp0" , network ID=dev, address=172.17.0.3:7051, rootnodes=, validator=true
2016/12/20 16:22:20 transport: http2Server.HandleStreams failed to receive the preface from client: EOF
16:22:23.143 [dockercontroller] deployImage -> ERRO 01d Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11' returned a non-zero code: 1
16:22:23.143 [dockercontroller] deployImage -> ERRO 01e Image Output:
********************
Step 1 : FROM hyperledger/fabric-baseimage
---> 7cfcd874dfa0
Step 2 : COPY . $GOPATH/src/build-chaincode/
---> 756380302601
Removing intermediate container c656bb6a30db
Step 3 : WORKDIR $GOPATH
---> Running in a1bfaaf2fbb4
---> 35add88b3768
Removing intermediate container a1bfaaf2fbb4
Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11
---> Running in 1ebcca6f4c47
src/build-chaincode/utils/utils.go:5:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of:
/opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH)
src/build-chaincode/utils/utils.go:8:2: cannot find package "github.com/pkg/errors" in any of:
/opt/go/src/github.com/pkg/errors (from $GOROOT)
/opt/gopath/src/github.com/pkg/errors (from $GOPATH)
********************
16:22:24.067 [dockercontroller] deployImage -> ERRO 01f Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11' returned a non-zero code: 1
16:22:24.067 [dockercontroller] deployImage -> ERRO 020 Image Output:
********************
Step 1 : FROM hyperledger/fabric-baseimage
---> 7cfcd874dfa0
Step 2 : COPY . $GOPATH/src/build-chaincode/
---> Using cache
---> 756380302601
Step 3 : WORKDIR $GOPATH
---> Using cache
---> 35add88b3768
Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11
---> Running in 0f0df14739f3
src/build-chaincode/utils/utils.go:5:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of:
/opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH)
src/build-chaincode/utils/utils.go:8:2: cannot find package "github.com/pkg/errors" in any of:
/opt/go/src/github.com/pkg/errors (from $GOROOT)
/opt/gopath/src/github.com/pkg/errors (from $GOPATH)
********************
16:22:24.068 [chaincode] Launch -> ERRO 021 launchAndWaitForRegister failed Error starting container: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11' returned a non-zero code: 1
2016/12/20 16:22:50 transport: http2Server.HandleStreams failed to receive the preface from client: EOF
Summarising: You can successfully build the chaincode locally with npm run gobuild
(that is with clean output), that means you have all the vendors (and correct version) in local.
Step 1 : FROM hyperledger/fabric-baseimage ---> 7cfcd874dfa0
That also can be meaningful. The commit code seems being suspiciously wrong. The correct one:
hyperledger/fabric-baseimage latest 930520b2a511
hyperledger/fabric-baseimage x86_64-0.2.1 930520b2a511
From the README:
- Pull fabric-baseimage image: docker pull hyperledger/fabric-baseimage:x86_64-0.2.1 (note: be sure you do not have already an image with the same tag, in that case, rename/tag first the current hyperledger/fabric-baseimage to something else)
- Change tag to the fabric-baseimage:xx to latest: docker tag hyperledger/fabric-baseimage:x86_64-0.2.1 hyperledger/fabric-baseimage:latest This will prepare a docker baseimage in which the chaincode will be launched and deployed.
My images look fine:
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 1a0c7c83866f 38 minutes ago 1.345 GB
mysql 5.5 11f3eec60e17 6 weeks ago 254.9 MB
hyperledger/fabric-baseimage latest 930520b2a511 6 weeks ago 1.345 GB
hyperledger/fabric-baseimage x86_64-0.2.1 930520b2a511 6 weeks ago 1.345 GB
hyperledger/fabric-membersrvc x86_64-0.6.1-preview b3654d32e4f9 9 weeks ago 1.417 GB
hyperledger/fabric-peer x86_64-0.6.1-preview 21cb00fb27f4 9 weeks ago 1.424 GB
But the problem persists. Any suggestions?
@KennethNagin That is very weird. What pops up in my mind as first:
docker-compose.yml
or compose-default.yml
files? Using a wrong GOPATH
or GOROOT
destination could cause the issue.Could you perform also the following test?
vendor
folder and run again npm run installgo
to download all the go dependencies and then run npm run gobuild
.
Confirm you do not get any errors.I did not touch docker-compose.yml, compose-default.yml. My GOPATH and GOROOT look normal. $ echo $GOPATH /home/nagin/work $ echo $GOROOT /usr/local/go
I do not have a vendor folder. Maybe that is part of the problem: $ find . -name vendor ./node_modules/parse-json/vendor ./node_modules/node-sass/vendor
Should I remove these directories or remove ./node_modules?
No. The vendor
directory I'm referring to should be in src/build-chaincode. That is why I am asking you if the two commands below report any errors. Without vendor dependencies you should not be able to build the chaincode and you should receive the same error message in local as well.
Both "npm run installgo" and "npm run gobuild" run successfully.
Do you have a vendor
directory in src/build-chaincode after you run npm run installgo
? Could you paste the log?
Now there is a vendor directory: $ find . -name vendor ./src/build-chaincode/vendor ./src/build-chaincode/vendor/github.com/stretchr/testify/vendor ./src/build-chaincode/vendor/github.com/hyperledger/fabric/vendor ./node_modules/parse-json/vendor ./node_modules/node-sass/vendor $ cat logs/logs.log {"error":{"status":"FAILURE","msg":{"0":69,"1":114,"2":114,"3":111,"4":114,"5":58,"6":70,"7":97,"8":105,"9":108,"10":101,"11":100,"12":32,"13":116,"14":111,"15":32,"16":108,"17":97,"18":117,"19":110,"20":99,"21":104,"22":32,"23":99,"24":104,"25":97,"26":105,"27":110,"28":99,"29":111,"30":100,"31":101,"32":32,"33":115,"34":112,"35":101,"36":99,"37":40,"38":67,"39":111,"40":117,"41":108,"42":100,"43":32,"44":110,"45":111,"46":116,"47":32,"48":103,"49":101,"50":116,"51":32,"52":100,"53":101,"54":112,"55":108,"56":111,"57":121,"58":109,"59":101,"60":110,"61":116,"62":32,"63":116,"64":114,"65":97,"66":110,"67":115,"68":97,"69":99,"70":116,"71":105,"72":111,"73":110,"74":32,"75":102,"76":111,"77":114,"78":32,"79":99,"80":100,"81":101,"82":48,"83":48,"84":54,"85":97,"86":99,"87":53,"88":50,"89":56,"90":49,"91":50,"92":54,"93":99,"94":55,"95":52,"96":98,"97":102,"98":51,"99":102,"100":98,"101":53,"102":52,"103":54,"104":55,"105":97,"106":56,"107":97,"108":102,"109":57,"110":51,"111":102,"112":98,"113":54,"114":102,"115":48,"116":50,"117":53,"118":52,"119":57,"120":50,"121":57,"122":98,"123":102,"124":98,"125":49,"126":48,"127":50,"128":57,"129":49,"130":49,"131":102,"132":52,"133":48,"134":100,"135":55,"136":55,"137":98,"138":98,"139":97,"140":98,"141":49,"142":49,"143":32,"144":45,"145":32,"146":76,"147":101,"148":100,"149":103,"150":101,"151":114,"152":69,"153":114,"154":114,"155":111,"156":114,"157":32,"158":45,"159":32,"160":82,"161":101,"162":115,"163":111,"164":117,"165":114,"166":99,"167":101,"168":78,"169":111,"170":116,"171":70,"172":111,"173":117,"174":110,"175":100,"176":58,"177":32,"178":108,"179":101,"180":100,"181":103,"182":101,"183":114,"184":58,"185":32,"186":114,"187":101,"188":115,"189":111,"190":117,"191":114,"192":99,"193":101,"194":32,"195":110,"196":111,"197":116,"198":32,"199":102,"200":111,"201":117,"202":110,"203":100,"204":41}},"msg":"Error:Failed to launch chaincode spec(Could not get deployment transaction for cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11 - LedgerError - ResourceNotFound: ledger: resource not found)","level":"error","message":"[SDK] error on query:","timestamp":"2016-12-21T09:15:32.534Z"} {"level":"warn","message":"Error:Failed to launch chaincode spec(Could not get deployment transaction for cde006ac528126c74bf3fb5467a8af93fb6f0254929bfb102911f40d77bbab11 - LedgerError - ResourceNotFound: ledger: resource not found)","timestamp":"2016-12-21T09:15:32.548Z"} {"error":{"status":"FAILURE","msg":{"0":69,"1":114,"2":114,"3":111,"4":114,"5":58,"6":70,"7":97,"8":105,"9":108,"10":101,"11":100,"12":32,"13":116,"14":111,"15":32,"16":108,"17":97,"18":117,"19":110,"20":99,"21":104,"22":32,"23":99,"24":104,"25":97,"26":105,"27":110,"28":99,"29":111,"30":100,"31":101,"32":32,"33":115,"34":112,"35":101,"36":99,"37":40,"38":67,"39":111,"40":117,"41":108,"42":100,"43":32,"44":110,"45":111,"46":116,"47":32,"48":103,"49":101,"50":116,"51":32,"52":100,"53":101,"54":112,"55":108,"56":111,"57":121,"58":109,"59":101,"60":110,"61":116,"62":32,"63":116,"64":114,"65":97,"66":110,"67":115,"68":97,"69":99,"70":116,"71":105,"72":111,"73":110,"74":32,"75":102,"76":111,"77":114,"78":32,"79":98,"80":99,"81":98,"82":53,"83":55,"84":49,"85":50,"86":48,"87":56,"88":48,"89":49,"90":57,"91":56,"92":48,"93":49,"94":54,"95":54,"96":102,"97":53,"98":97,"99":98,"100":53,"101":100,"102":54,"103":102,"104":97,"105":48,"106":51,"107":97,"108":102,"109":101,"110":97,"111":100,"112":101,"113":51,"114":99,"115":52,"116":49,"117":102,"118":49,"119":101,"120":48,"121":50,"122":97,"123":52,"124":56,"125":48,"126":100,"127":100,"128":99,"129":48,"130":49,"131":98,"132":49,"133":97,"134":50,"135":100,"136":100,"137":48,"138":49,"139":56,"140":49,"141":52,"142":101,"143":32,"144":45,"145":32,"146":76,"147":101,"148":100,"149":103,"150":101,"151":114,"152":69,"153":114,"154":114,"155":111,"156":114,"157":32,"158":45,"159":32,"160":82,"161":101,"162":115,"163":111,"164":117,"165":114,"166":99,"167":101,"168":78,"169":111,"170":116,"171":70,"172":111,"173":117,"174":110,"175":100,"176":58,"177":32,"178":108,"179":101,"180":100,"181":103,"182":101,"183":114,"184":58,"185":32,"186":114,"187":101,"188":115,"189":111,"190":117,"191":114,"192":99,"193":101,"194":32,"195":110,"196":111,"197":116,"198":32,"199":102,"200":111,"201":117,"202":110,"203":100,"204":41}},"msg":"Error:Failed to launch chaincode spec(Could not get deployment transaction for bcb57120801980166f5ab5d6fa03afeade3c41f1e02a480ddc01b1a2dd01814e - LedgerError - ResourceNotFound: ledger: resource not found)","level":"error","message":"[SDK] error on query:","timestamp":"2016-12-21T09:44:11.849Z"} {"level":"warn","message":"Error:Failed to launch chaincode spec(Could not get deployment transaction for bcb57120801980166f5ab5d6fa03afeade3c41f1e02a480ddc01b1a2dd01814e - LedgerError - ResourceNotFound: ledger: resource not found)","timestamp":"2016-12-21T09:44:11.862Z"} {"message":"[SDK] Failed to register WebAppAdmin WebAppAdmin DJY27pEnl16d","stack":"Error\n at /home/nagin/work/src/github.com/fabric-boilerplate/node_modules/grpc/src/node/src/client.js:417:17","code":14,"metadata":{"_internal_repr":{}},"level":"error","timestamp":"2016-12-21T09:48:14.450Z"}
@KennethNagin I need the specific log after you run npm run installgo
to see if the download of all the vendor completes with success. After that you should be able to deploy the chaincode.
Please describe as much detailed as possible all the steps you do before reaching the current status and follow strictly what we ask in our comments, otherwise it becomes more and more difficult to help you. Moreover, this conversation should be valuable for you as much as for someone else having similar troubles, so please be cooperative. Thanks!
I am happy to cooperate. Maybe I do not understand which log you are asking for since log is created in sub-directory logs/ Here is this output from npm run installgo:
$ npm run installgo
server@0.0.0 installgo /home/nagin/work/src/github.com/fabric-boilerplate cd src/build-chaincode && GOPATH=$(pwd)/../.. && govend -v
github.com/hyperledger/fabric/core/chaincode/shim google.golang.org/grpc google.golang.org/grpc/transport google.golang.org/grpc/peer google.golang.org/grpc/credentials golang.org/x/net/context google.golang.org/grpc/metadata google.golang.org/grpc/grpclog google.golang.org/grpc/codes golang.org/x/net/trace golang.org/x/net/internal/timeseries golang.org/x/net/http2/hpack golang.org/x/net/http2 golang.org/x/net/lex/httplex golang.org/x/net/idna google.golang.org/grpc/test/codec_perf github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/proto/testdata github.com/golang/protobuf/proto/proto3_proto google.golang.org/grpc/naming google.golang.org/grpc/internal google.golang.org/grpc/credentials/oauth golang.org/x/oauth2/jwt golang.org/x/oauth2/jws golang.org/x/oauth2/internal golang.org/x/oauth2 google.golang.org/appengine/urlfetch google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/internal google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/log google.golang.org/appengine/internal/datastore google.golang.org/appengine/internal/base golang.org/x/oauth2/google google.golang.org/appengine google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/app_identity cloud.google.com/go/compute/metadata golang.org/x/net/context/ctxhttp cloud.google.com/go/internal github.com/spf13/viper gopkg.in/yaml.v2 gopkg.in/check.v1 github.com/stretchr/testify/assert github.com/pmezard/go-difflib/difflib github.com/davecgh/go-spew/spew github.com/davecgh/go-spew/spew/testdata github.com/spf13/pflag github.com/spf13/jwalterweatherman github.com/spf13/cast github.com/spf13/afero golang.org/x/text/unicode/norm golang.org/x/text/transform golang.org/x/text/internal/testtext golang.org/x/text/internal/gen golang.org/x/text/unicode/cldr golang.org/x/text/internal/ucd golang.org/x/text/internal/triegen github.com/spf13/afero/sftp github.com/pkg/sftp golang.org/x/crypto/ssh golang.org/x/crypto/ssh/testdata golang.org/x/crypto/ssh/terminal golang.org/x/crypto/ed25519 golang.org/x/crypto/ed25519/internal/edwards25519 golang.org/x/crypto/curve25519 github.com/pkg/errors github.com/kr/fs github.com/spf13/afero/mem github.com/pelletier/go-toml github.com/pelletier/go-buffruneio github.com/mitchellh/mapstructure github.com/magiconair/properties github.com/magiconair/properties/_third_party/gopkg.in/check.v1 github.com/magiconair/properties/_third_party/gopkg.in/check.v1 bad ping: stat vendor/github.com/magiconair/properties/_third_party/gopkg.in/check.v1: no such file or directory github.com/hashicorp/hcl github.com/hashicorp/hcl/testhelper github.com/hashicorp/hcl/json/parser github.com/hashicorp/hcl/json/token github.com/hashicorp/hcl/hcl/token github.com/hashicorp/hcl/hcl/strconv github.com/hashicorp/hcl/json/scanner github.com/hashicorp/hcl/hcl/ast github.com/hashicorp/hcl/hcl/parser github.com/hashicorp/hcl/hcl/scanner github.com/fsnotify/fsnotify golang.org/x/sys/unix github.com/op/go-logging github.com/looplab/fsm github.com/hyperledger/fabric/protos github.com/hyperledger/fabric/core/util golang.org/x/crypto/sha3 github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/empty github.com/hyperledger/fabric/core/comm github.com/hyperledger/fabric/core/config github.com/hyperledger/fabric/core/chaincode/shim/crypto/ecdsa github.com/hyperledger/fabric/core/crypto/primitives github.com/hyperledger/fabric/core/crypto/utils github.com/hyperledger/fabric/core/chaincode/shim/crypto github.com/hyperledger/fabric/core/chaincode/shim/crypto/attr github.com/hyperledger/fabric/core/crypto/attributes github.com/hyperledger/fabric/core/crypto/attributes/proto nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ $ npm run installgo golang.org/x/text/internal/triegen github.com/spf13/afero/sftp github.com/pkg/sftp golang.org/x/crypto/ssh golang.org/x/crypto/ssh/testdata golang.org/x/crypto/ssh/terminal golang.org/x/crypto/ed25519 golang.org/x/crypto/ed25519/internal/edwards25519 golang.org/x/crypto/curve25519 github.com/pkg/errors github.com/kr/fs github.com/spf13/afero/mem github.com/pelletier/go-toml github.com/pelletier/go-buffruneio github.com/mitchellh/mapstructure github.com/magiconair/properties $: command not found nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ > server@0.0.0 installgo /home/nagin/work/src/github.com/fabric-boilerplate installgo: command not found nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ > cd src/build-chaincode && GOPATH=$(pwd)/../.. && govend -v bash: src/build-chaincode: Is a directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/hyperledger/fabric/core/chaincode/shim bash: github.com/hyperledger/fabric/core/chaincode/shim: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc bash: google.golang.org/grpc: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/transport bash: google.golang.org/grpc/transport: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/peer bash: google.golang.org/grpc/peer: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/credentials bash: google.golang.org/grpc/credentials: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/context bash: golang.org/x/net/context: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/metadata bash: google.golang.org/grpc/metadata: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/grpclog bash: google.golang.org/grpc/grpclog: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/codes bash: google.golang.org/grpc/codes: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/trace bash: golang.org/x/net/trace: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/internal/timeseries bash: golang.org/x/net/internal/timeseries: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/http2/hpack bash: golang.org/x/net/http2/hpack: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/http2 bash: golang.org/x/net/http2: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/lex/httplex bash: golang.org/x/net/lex/httplex: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/idna bash: golang.org/x/net/idna: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/test/codec_perf bash: google.golang.org/grpc/test/codec_perf: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/golang/protobuf/proto bash: github.com/golang/protobuf/proto: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/golang/protobuf/ptypes/any bash: github.com/golang/protobuf/ptypes/any: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/golang/protobuf/proto/testdata bash: github.com/golang/protobuf/proto/testdata: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/golang/protobuf/proto/proto3_proto bash: github.com/golang/protobuf/proto/proto3_proto: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/naming bash: google.golang.org/grpc/naming: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/internal bash: google.golang.org/grpc/internal: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/grpc/credentials/oauth bash: google.golang.org/grpc/credentials/oauth: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/oauth2/jwt bash: golang.org/x/oauth2/jwt: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/oauth2/jws bash: golang.org/x/oauth2/jws: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/oauth2/internal bash: golang.org/x/oauth2/internal: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/oauth2 bash: golang.org/x/oauth2: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/urlfetch bash: google.golang.org/appengine/urlfetch: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/urlfetch bash: google.golang.org/appengine/internal/urlfetch: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal bash: google.golang.org/appengine/internal: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/remote_api bash: google.golang.org/appengine/internal/remote_api: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/log bash: google.golang.org/appengine/internal/log: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/datastore bash: google.golang.org/appengine/internal/datastore: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/base bash: google.golang.org/appengine/internal/base: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/oauth2/google bash: golang.org/x/oauth2/google: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine bash: google.golang.org/appengine: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/modules bash: google.golang.org/appengine/internal/modules: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ google.golang.org/appengine/internal/app_identity bash: google.golang.org/appengine/internal/app_identity: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ cloud.google.com/go/compute/metadata bash: cloud.google.com/go/compute/metadata: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/net/context/ctxhttp bash: golang.org/x/net/context/ctxhttp: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ cloud.google.com/go/internal bash: cloud.google.com/go/internal: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/viper bash: github.com/spf13/viper: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ gopkg.in/yaml.v2 bash: gopkg.in/yaml.v2: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ gopkg.in/check.v1 bash: gopkg.in/check.v1: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/stretchr/testify/assert bash: github.com/stretchr/testify/assert: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/pmezard/go-difflib/difflib bash: github.com/pmezard/go-difflib/difflib: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/davecgh/go-spew/spew bash: github.com/davecgh/go-spew/spew: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/davecgh/go-spew/spew/testdata bash: github.com/davecgh/go-spew/spew/testdata: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/pflag bash: github.com/spf13/pflag: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/jwalterweatherman bash: github.com/spf13/jwalterweatherman: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/cast bash: github.com/spf13/cast: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/afero bash: github.com/spf13/afero: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/unicode/norm bash: golang.org/x/text/unicode/norm: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/transform bash: golang.org/x/text/transform: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/internal/testtext bash: golang.org/x/text/internal/testtext: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/internal/gen bash: golang.org/x/text/internal/gen: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/unicode/cldr bash: golang.org/x/text/unicode/cldr: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/internal/ucd bash: golang.org/x/text/internal/ucd: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/text/internal/triegen bash: golang.org/x/text/internal/triegen: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/afero/sftp bash: github.com/spf13/afero/sftp: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/pkg/sftp bash: github.com/pkg/sftp: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/crypto/ssh bash: golang.org/x/crypto/ssh: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/crypto/ssh/testdata bash: golang.org/x/crypto/ssh/testdata: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/crypto/ssh/terminal bash: golang.org/x/crypto/ssh/terminal: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/crypto/ed25519 bash: golang.org/x/crypto/ed25519: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/crypto/ed25519/internal/edwards25519 bash: golang.org/x/crypto/ed25519/internal/edwards25519: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ golang.org/x/crypto/curve25519 bash: golang.org/x/crypto/curve25519: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/pkg/errors bash: github.com/pkg/errors: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/kr/fs bash: github.com/kr/fs: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/spf13/afero/mem bash: github.com/spf13/afero/mem: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/pelletier/go-toml bash: github.com/pelletier/go-toml: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/pelletier/go-buffruneio bash: github.com/pelletier/go-buffruneio: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/mitchellh/mapstructure bash: github.com/mitchellh/mapstructure: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.com/fabric-boilerplate$ github.com/magiconair/properties bash: github.com/magiconair/properties: No such file or directory nagin@rcc-hrl-kvg-558:~/work/src/github.
Had the same issue and it seems that it can be fixed by making links in $GOPATH/src/build-chaincode/ poiniting to invoke, query, utils, data catalogues in ~/fabric-boilerplate/src/build-chaincode. Not so clean way actually.
But faced the problem with building the code itself:
vagrant@vagrant:~/fabric-boilerplate/src/build-chaincode$ go build
# _/home/vagrant/fabric-boilerplate/src/build-chaincode
./chaincode.go:42: cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start:
*SimpleChaincode does not implement shim.Chaincode (wrong type for Init method)
have Init(shim.ChaincodeStubInterface, string, []string) ([]byte, error)
want Init(shim.ChaincodeStubInterface) ([]byte, error)
Looks like the older version of Fabric was used and should be updated.
Closed as the newer version resolves this issue.
The most recent release seems to have degenerated. It it seems to start successfully. However when I browse to it (even before logging on) it throws all sorts of exceptions, since it is expected some node modules. I think the documentation is missing some setup to get some go modules.
This is the tail of the successful startup: