Lab 4: Instantiat chaincode problem: peer container crash with Getting block information from block
Hello
I'm struggling with some errors after start to use couchdb, now everything seems to work well, I install the chaincode but when I try to instantiate it start to give me errors like
$ peer chaincode install -n ccForAll -p github.com/sacc -v 1.0 2019-11-02 01:07:14.215 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-11-02 01:07:14.240 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-11-02 01:07:14.260 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2019-11-02 01:07:14.261 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2019-11-02 01:07:15.407 UTC [chaincodeCmd] install -> INFO 005 Installed remotely response:<status:200 payload:"OK" > $ peer chaincode instantiate -n ccForAll -v 1.0 -o orderer.example.com:7050 -C allarewelcome -c '{"Args":["Mach","50"]}' Error: error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [allarewelcome] creator org [Org1MSP]
when I try to see if peers are in channel, it seems that they are not, maybe because of a container restart, but now the problem is bigger when I try to join channel I have this crach container problem
$ docker exec -it peer0.org1.example.com bash # check first that we are not parte of the channel $ peer channel list # fetch genesis block $ peer channel fetch oldest allarewelcome.block -c allarewelcome --orderer orderer.example.com:7050 # ls allarewelcome.block allarewelcome.block # setup CORE_PEER_MSPCONFIGPATH $ export CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin\@org1.example.com/msp # add peer to channel $ peer channel join -b allarewelcome.block
logs
peer1.org1.example.com | 2019-11-02 02:00:40.969 UTC [endorser] callChaincode -> INFO 028 [][137f1239] Entry chaincode: name:"cscc" peer1.org1.example.com | 2019-11-02 02:00:40.971 UTC [ledgermgmt] CreateLedger -> INFO 029 Creating ledger [allarewelcome] with genesis block peer1.org1.example.com | 2019-11-02 02:00:41.033 UTC [fsblkstorage] newBlockfileMgr -> INFO 02a Getting block information from block storage peer1.org1.example.com | panic: runtime error: invalid memory address or nil pointer dereference peer1.org1.example.com | panic: runtime error: invalid memory address or nil pointer dereference peer1.org1.example.com | [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xcecbb6] peer1.org1.example.com | peer1.org1.example.com | goroutine 310 [running]: peer1.org1.example.com | github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).triggerNextState(0xc00053d320, 0x0, 0xc00053a4e0) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:35 +0x26 peer1.org1.example.com | github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1.1(0xc00053d320, 0xc0004ebeb0, 0xc00053a4e0) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:247 +0x42 peer1.org1.example.com | panic(0x106e340, 0x1e32280) peer1.org1.example.com | /opt/go/src/runtime/panic.go:513 +0x1b9 peer1.org1.example.com | github.com/hyperledger/fabric/core/ledger/kvledger.(*Provider).openInternal(0xc0000beb80, 0xc000046dd0, 0xd, 0x0, 0x0, 0x0, 0x27) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger_provider.go:157 +0xf5 peer1.org1.example.com | github.com/hyperledger/fabric/core/ledger/kvledger.(*Provider).Create(0xc0000beb80, 0xc0002a8cc0, 0x27, 0xc0004eb7a8, 0x1, 0x1) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger_provider.go:117 +0x102 peer1.org1.example.com | github.com/hyperledger/fabric/core/ledger/ledgermgmt.CreateLedger(0xc0002a8cc0, 0x0, 0x0, 0x0, 0x0) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgermgmt/ledger_mgmt.go:97 +0x17b peer1.org1.example.com | github.com/hyperledger/fabric/core/peer.CreateChainFromBlock(0xc0002a8cc0, 0x1378f60, 0xc00000edc0, 0x1383c80, 0xc0004dc6e0, 0x1, 0x1) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/peer/peer.go:436 +0x7b peer1.org1.example.com | github.com/hyperledger/fabric/core/scc/cscc.joinChain(0xc0000466e0, 0xd, 0xc0002a8cc0, 0x1378f60, 0xc00000edc0, 0x1383c80, 0xc0004dc6e0, 0x0, 0x0, 0x0, ...) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:236 +0x79 peer1.org1.example.com | github.com/hyperledger/fabric/core/scc/cscc.(*PeerConfiger).InvokeNoShim(0xc0004dcc30, 0xc0002cf7a0, 0x2, 0x2, 0xc0003f1db0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:164 +0x692 peer1.org1.example.com | github.com/hyperledger/fabric/core/scc/cscc.(*PeerConfiger).Invoke(0xc0004dcc30, 0x1390b60, 0xc0005986e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/scc/cscc/configure.go:120 +0x29b peer1.org1.example.com | github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction.func1(0xc00053d320, 0xc00053a4e0, 0xc0000bf300) peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:273 +0x4eb peer1.org1.example.com | created by github.com/hyperledger/fabric/core/chaincode/shim.(*Handler).handleTransaction peer1.org1.example.com | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/handler.go:242 +0x53 peer1.org1.example.com exited with code 2
any help will be great, thanks guys
K
Comments
-
update:
I forget to mention that now I can't even launch this basic command,
it seems that my network breaks again just to try to follow the pdf instructions,
and I can't always restart from start$ docker exec -it peer1.org1.example.com bash root@4a58a9c918a7:/opt/gopath/src/github.com/hyperledger/fabric# peer channel fetch oldest allarewelcome.block -c allarewelcome --orderer orderer.example.com:7050 2019-11-02 02:15:11.839 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized 2019-11-02 02:15:11.842 UTC [cli.common] readBlock -> INFO 002 Received block: 0 root@4a58a9c918a7:/opt/gopath/src/github.com/hyperledger/fabric# ls allarewelcome.block root@4a58a9c918a7:/opt/gopath/src/github.com/hyperledger/fabric# peer channel list 2019-11-02 02:10:39.343 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized Error: Failed sending proposal, got rpc error: code = Unavailable desc = transport is closing
thanks
0 -
Hello
aftre some debug, I have luck
it seems that channel dataallarewelcome_
is lost in couchdb,
I drop all couchdb volumes and start service stack
and recreate it and it with above commands, andnow peer channel list
starts to work again# Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c allarewelcome -f /etc/hyperledger/configtx/allarewelcome.tx # Join peer0.org1.example.com to the channel. docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b allarewelcome.block
now it seems that it instantiate the chaincode
$ peer chaincode instantiate -n ccForAll -v 1.0 -o orderer.example.com:7050 -C allarewelcome -c '{"Args":["Mach","50"]}' 2019-11-02 02:35:19.769 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-11-02 02:35:19.781 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-11-02 02:35:19.785 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2019-11-02 02:35:19.785 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc $ peer chaincode list --installed Get installed chaincodes on peer: Name: ccForAll, Version: 1.0, Path: github.com/sacc, Id: ebccdb27247faa8febc6cdb17a288dafcdb21d6484cfafcbcf8a46eacbf9dbfd $ peer chaincode list --instantiated -C allarewelcome Get instantiated chaincodes on channel allarewelcome: Name: ccForAll, Version: 1.0, Path: github.com/sacc, Escc: escc, Vscc: vscc
1 -
@koakh said:
Helloaftre some debug, I have luck
it seems that channel dataallarewelcome_
is lost in couchdb,
I drop all couchdb volumes and start service stack
and recreate it and it with above commands, andnow peer channel list
starts to work again# Create the channel docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c allarewelcome -f /etc/hyperledger/configtx/allarewelcome.tx # Join peer0.org1.example.com to the channel. docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b allarewelcome.block
now it seems that it instantiate the chaincode
$ peer chaincode instantiate -n ccForAll -v 1.0 -o orderer.example.com:7050 -C allarewelcome -c '{"Args":["Mach","50"]}' 2019-11-02 02:35:19.769 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-11-02 02:35:19.781 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-11-02 02:35:19.785 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc 2019-11-02 02:35:19.785 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc $ peer chaincode list --installed Get installed chaincodes on peer: Name: ccForAll, Version: 1.0, Path: github.com/sacc, Id: ebccdb27247faa8febc6cdb17a288dafcdb21d6484cfafcbcf8a46eacbf9dbfd $ peer chaincode list --instantiated -C allarewelcome Get instantiated chaincodes on channel allarewelcome: Name: ccForAll, Version: 1.0, Path: github.com/sacc, Escc: escc, Vscc: vscc
Hi @koakh ,
Could you please explain in more detail what you did here as I have the exact same error:it seems that channel data
allarewelcome_
is lost in couchdb,
I drop all couchdb volumes and start service stack
and recreate it and it with above commands, andnow peer channel list
starts to work again0 -
Seems to be an error with the couchDb containers?
[info] 2019-11-26T10:28:38.398968Z nonode@nohost <0.195.0> -------- Apache CouchDB has started on http://any:5986/
[info] 2019-11-26T10:28:38.399538Z nonode@nohost <0.7.0> -------- Application couch started on node nonode@nohost
[info] 2019-11-26T10:28:38.399838Z nonode@nohost <0.7.0> -------- Application ets_lru started on node nonode@nohost
[info] 2019-11-26T10:28:38.428548Z nonode@nohost <0.7.0> -------- Application rexi started on node nonode@nohost
[info] 2019-11-26T10:28:38.441617Z nonode@nohost <0.201.0> -------- open_result error {not_found,no_db_file} for _nodes
[warning] 2019-11-26T10:28:38.441655Z nonode@nohost <0.271.0> -------- creating missing database: _nodes
[info] 2019-11-26T10:28:38.470566Z nonode@nohost <0.201.0> -------- open_result error {not_found,no_db_file} for _dbs
[warning] 2019-11-26T10:28:38.470600Z nonode@nohost <0.285.0> -------- creating missing database: _dbs
[warning] 2019-11-26T10:28:38.470639Z nonode@nohost <0.284.0> -------- creating missing database: _dbs
[info] 2019-11-26T10:28:38.478597Z nonode@nohost <0.7.0> -------- Application mem3 started on node nonode@nohost
[info] 2019-11-26T10:28:38.478957Z nonode@nohost <0.7.0> -------- Application fabric started on node nonode@nohost
[info] 2019-11-26T10:28:38.529437Z nonode@nohost <0.7.0> -------- Application chttpd started on node nonode@nohost
[notice] 2019-11-26T10:28:38.553132Z nonode@nohost <0.322.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:395) <= mem3_shards:load_shards_from_disk/1(line:370) <= mem3_shards:load_shards_from_disk/2(line:399) <= mem3_shards:for_docid/3(line:86) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2019-11-26T10:28:38.555361Z nonode@nohost emulator -------- Error in process <0.323.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,395}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,370}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,86}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 788 Linux Foundation IT Professional Programs
- 352 Cloud Engineer IT Professional Program
- 177 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 146 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.1K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 36 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 693 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 144 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 4 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 25 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 130 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 150 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 370 Off Topic
- 114 Introductions
- 173 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 96 All In Program
- 96 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)