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
- 207 LFX Mentorship
- 207 LFX Mentorship: Linux Kernel
- 735 Linux Foundation IT Professional Programs
- 339 Cloud Engineer IT Professional Program
- 167 Advanced Cloud Engineer IT Professional Program
- 66 DevOps Engineer IT Professional Program
- 132 Cloud Native Developer IT Professional Program
- 122 Express Training Courses
- 122 Express Courses - Discussion Forum
- 5.9K Training Courses
- 40 LFC110 Class Forum - Discontinued
- 66 LFC131 Class Forum
- 39 LFD102 Class Forum
- 221 LFD103 Class Forum
- 17 LFD110 Class Forum
- 33 LFD121 Class Forum
- 17 LFD133 Class Forum
- 6 LFD134 Class Forum
- 17 LFD137 Class Forum
- 70 LFD201 Class Forum
- 3 LFD210 Class Forum
- 2 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 3 LFD237 Class Forum
- 23 LFD254 Class Forum
- 689 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 109 LFS101 Class Forum
- LFS111 Class Forum
- 2 LFS112 Class Forum
- 1 LFS116 Class Forum
- 3 LFS118 Class Forum
- 3 LFS142 Class Forum
- 3 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 2 LFS147 Class Forum
- 8 LFS151 Class Forum
- 1 LFS157 Class Forum
- 14 LFS158 Class Forum
- 5 LFS162 Class Forum
- 1 LFS166 Class Forum
- 3 LFS167 Class Forum
- 1 LFS170 Class Forum
- 1 LFS171 Class Forum
- 2 LFS178 Class Forum
- 2 LFS180 Class Forum
- 1 LFS182 Class Forum
- 4 LFS183 Class Forum
- 30 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 17 LFS203 Class Forum
- 117 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 50 LFS241 Class Forum
- 43 LFS242 Class Forum
- 37 LFS243 Class Forum
- 13 LFS244 Class Forum
- 1 LFS245 Class Forum
- 45 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 145 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 6 LFS256 Class Forum
- LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 9 LFS258-JP クラス フォーラム
- 116 LFS260 Class Forum
- 155 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 23 LFS267 Class Forum
- 18 LFS268 Class Forum
- 29 LFS269 Class Forum
- 200 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 7 LFW111 Class Forum
- 257 LFW211 Class Forum
- 178 LFW212 Class Forum
- 12 SKF100 Class Forum
- SKF200 Class Forum
- 791 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 98 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 754 Linux Distributions
- 82 Debian
- 67 Fedora
- 16 Linux Mint
- 13 Mageia
- 23 openSUSE
- 147 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 351 Ubuntu
- 465 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 91 Linux Security
- 78 Network Management
- 101 System Management
- 47 Web Management
- 56 Mobile Computing
- 17 Android
- 28 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 366 Off Topic
- 114 Introductions
- 171 Small Talk
- 20 Study Material
- 534 Programming and Development
- 293 Kernel Development
- 223 Software Development
- 1.1K Software
- 212 Applications
- 182 Command Line
- 3 Compiling/Installing
- 405 Games
- 311 Installation
- 79 All In Program
- 79 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)