Closed wenshuohan closed 5 years ago
Have you solved your problem?I have the same problem
no,a person tell me “running many peer containers with couchDB is really resource demanding. In this case, the connection could be lost between the peer and its DB under high (or even smaller) load. Try to spread your network among different machines and see if the error persists.”maybe you can have a try
In private, I discussed two nodes vx yangyang602112
@wenshuohan @zsh122958 the problem is like the issue #112 , you can take a look at the issue. one solution:
another solution:
Thank you very much for solving the problem Now the error is port occupancy let me set it up first
非常感谢您 问题解决啦 现在报错是端口占用 我先设置一下
18234444581@163.com
From: houqinghui Date: 2018-11-06 15:47 To: hyperledger/caliper CC: zsh122958; Mention Subject: Re: [hyperledger/caliper] error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/home/hanwenshuo/caliper/node_modules/grpc/src/client.js:64:15) at /home/hanwenshuo/caliper/node_modules/grpc/src/client.js:583:15 (#204) @wenshuohan @zsh122958 the problem is like the issue #112 , you can take a look at the issue. one solution: docker-compose -f network/fabric-v11/2-org-2-peer/docker-compose.yaml up -d in another shell remove "start": "docker-compose -f network/fabric-v11/2-org-2-peer/docker-compose.yaml up -d", from config.json 3.node benchmark/simple/main.js another solution: change user to root user. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
我使用不同的节点放到不同的服务器上 还是不行 是否我该去了解一下网络配置方面的问题 我应该直接修修改docker-compose.yaml 文件么? I can't put different nodes on different servers Should I learn about network configuration Should I modify the docker-composer. Yaml file directly?
18234444581@163.com
From: houqinghui Date: 2018-11-06 15:47 To: hyperledger/caliper CC: zsh122958; Mention Subject: Re: [hyperledger/caliper] error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/home/hanwenshuo/caliper/node_modules/grpc/src/client.js:64:15) at /home/hanwenshuo/caliper/node_modules/grpc/src/client.js:583:15 (#204) @wenshuohan @zsh122958 the problem is like the issue #112 , you can take a look at the issue. one solution: docker-compose -f network/fabric-v11/2-org-2-peer/docker-compose.yaml up -d in another shell remove "start": "docker-compose -f network/fabric-v11/2-org-2-peer/docker-compose.yaml up -d", from config.json 3.node benchmark/simple/main.js another solution: change user to root user. ― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@wenshuohan Can you share your callback implementation as a gist, so I can reproduce the problem? Also note, that your chaincode endorsement policy doesn't require a signature from Org3. I don't know whether this is intentional or not.
@aklenik my prolem is same as #205,when I look at the peer2.org1.example.com,there is a error: 2018-11-06 12:23:12.436 UTC [couchdb] handleRequest -> WARN 004 Retrying couchdb request in 125ms. Attempt:1 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.19.0.10:5984: getsockopt: connection refused 2018-11-06 12:23:12.562 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.19.0.10:5984: getsockopt: connection refused 2018-11-06 12:23:12.813 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb request in 500ms. Attempt:3 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.19.0.10:5984: getsockopt: connection refused 2018-11-06 12:23:13.314 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb request in 1s. Attempt:4 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.19.0.10:5984: getsockopt: connection refused 2018-11-06 12:23:14.315 UTC [couchdb] handleRequest -> WARN 008 Retrying couchdb request in 2s. Attempt:5 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.19.0.10:5984: getsockopt: connection refused
@wenshuohan Take a look at the CouchDB container logs, maybe it couldn't start properly. Or you have misconfigured the admin access to the DB in the peer settings.
@aklenik when I look at the couchdb.peer2.org1.example.com,there is the error: [error] 2018-11-06T13:26:08.239858Z nonode@nohost emulator -------- Error in process <0.325.0> with exit value: {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,378}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,407}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,91}]},{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}]}]}
@aklenik when I look at the couchdb.peer2.org1.example.com's docker logs,there is the warning:
WARNING: CouchDB is running in Admin Party mode. This will allow anyone with access to the CouchDB port to access your database. In Docker's default configuration, this is effectively any other container on the same system. Use "-e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password" to set it in "docker run".
@wenshuohan This seems like a CouchDB issue. Try setting the admin user and password for both the CouchDB and peer containers, as suggested here to avoid Admin Party mode.
If it doesn't solve your problem, then try to set up the network on multiple machines (a 3 org network might be too much for a single machine), or try a Fabric specific forum (RocketChat, mailing list), because this is not Caliper-related.
@coulde you please tell me how to set the admin user and password for couchDB,I I try to modify docker-compose-tls.yaml ,add" - COUCHDB_USER= - COUCHDB_PASSWORD= "to couchdb.peer0.org1.example.com's environment,but it Report errors
@wenshuohan You have to fill in the values you want to use:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=adminpw
And don't forget to set the (almost) same for the corresponding peer container:
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=<container_name>:<port>
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=adminpw
@aklenik I do fill in the values: couchdb.peer2.org2.example.com: container_name: couchdb.peer2.org2.example.com image: hyperledger/fabric-couchdb:x86_64-0.4.6 ports:
but it report errors:
docker-compose -f network/fabric/2-org-3-peer/docker-compose-tls.yaml up -d
yaml.parser.ParserError: while parsing a block collection
in "./network/fabric/2-org-3-peer/docker-compose-tls.yaml", line 109, column 7
expected
The line 109 is what i added:
yaml.parser.ParserError: while parsing a block collection
in "./network/fabric/2-org-3-peer/docker-compose-tls.yaml", line 109, column 7
expected , but found '?'
This is your first error, complaining about the yaml syntax. Can you share your docker compose file as a GitHub Gist?
@aklenik hey,This is my cofig files https://gist.github.com/wenshuohan/7996452492060f05ad36e24a51c0dc7b
@wenshuohan Remove all DB_URL: http://localhost:5984/member_db
lines, the sample config doesn't use it either. And if you use it, you should put a -
before it, because it's also an environment variable.
@aklenik I have removed all DB_URL: http://localhost:5984/member_db lines,the error still existence,docker logs peer2.org1.example.com has error:
2018-11-09 08:58:10.880 UTC [couchdb] handleRequest -> WARN 004 Retrying couchdb request in 125ms. Attempt:1 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.20.0.5:5984: getsockopt: connection refused 2018-11-09 08:58:11.013 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.20.0.5:5984: getsockopt: connection refused 2018-11-09 08:58:11.265 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb request in 500ms. Attempt:3 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.20.0.5:5984: getsockopt: connection refused 2018-11-09 08:58:11.766 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb request in 1s. Attempt:4 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.20.0.5:5984: getsockopt: connection refused 2018-11-09 08:58:12.767 UTC [couchdb] handleRequest -> WARN 008 Retrying couchdb request in 2s. Attempt:5 Error:Get http://couchdb.peer2.org1.example.com:5984/: dial tcp 172.20.0.5:5984: getsockopt: connection refused 2018-11-09 08:58:14.822 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 009 Created state database _users 2018-11-09 08:58:14.838 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00a Created state database _replicator 2018-11-09 08:58:14.873 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00b Created state database
_global_change`
docker logs couchdb.peer2.org1.example.com has error: `[error] 2018-11-09T08:58:13.697758Z nonode@nohost emulator -------- Error in process <0.326.0> with exit value: {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,378}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,407}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,91}]},{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}]}]}
[notice] 2018-11-09T08:58:13.697780Z nonode@nohost <0.325.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:403) <= mem3_shards:load_shards_from_disk/1(line:378) <= mem3_shards:load_shards_from_disk/2(line:407) <= mem3_shards:for_docid/3(line:91) <= 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) ` maybe I should use more computs have a try
@wenshuohan Definitely try it with a smaller network. There is an example dev network in this repo, you can add a CouchDB container to it. If it works that way, then it's a resource issue. If the error still persists, try a Fabric channel/mailing list, maybe others also encountered similar errors.
@aklenik yeah,when my network‘s peers is less than four,such as 2-org-1-peer,2-org-2-peer,and 3-org-1-peer,they all worked well,but when the number is more than 6,such as 2-org-3-peer and 3-org-2-peer or more,it has the error.
Then I vote for resource issue. Can you provide some info about the machine you're using? Maybe I can try a stronger machine/VM to see if the network can be started with more resources.
VMware Workstation10 ubuntu14.04 memory 4G processer 1 SCSI 30GB network adapter NAT USB controller exits
@wenshuohan hi, i have the same error, i want to know how you the newwork incluing two organizations and four nodes ? do you just change the fabric.json ?
@houqinghui I changed notonly fabric.json,but also config.json
@wenshuohan this is the information "peer2": {
"requests": "grpcs://localhost:9057",
"events": "grpcs://localhost:9059",
"server-hostname": "peer1.org3.example.com",
"tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt"
} in Org3,
can you find the file network/fabric/config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt
when i add one peer in org, i cannot find the certificate file? then i have the same error with you. @wenshuohan
@houqinghui Key Storage Path in Configuration File
@wenshuohan do you generate the centificate and key about org3 by yourself before the test? or that you just change the config file, then you run the test?
@wenshuohan @houqinghui Is this issue resolved?
When I tested the merbles example with caliper, I tried to replace its network configuration with two organizations, each with three peers. Or three organizations, each organization has two peers, but there is such a mistake when starting the network.In my previous tests, two organizations and four nodes could run normally. the error is: Creating orderer.example.com ... done bric-go.json -n ./fabric-go.json TAP version 13 Creating couchdb.peer1.org3.example.com ... done Creating couchdb.peer0.org3.example.com ... done Creating peer0.org1.example.com ... done Creating peer1.org1.example.com ... done Creating couchdb.peer1.org2.example.com ... Creating couchdb.peer0.org1.example.com ... Creating ca.org2.example.com ... Creating ca.org3.example.com ... Creating couchdb.peer1.org3.example.com ... Creating couchdb.peer0.org3.example.com ... Creating couchdb.peer1.org1.example.com ... Creating orderer.example.com ... Creating ca.org1.example.com ... Creating peer1.org2.example.com ... Creating peer0.org2.example.com ... Creating peer0.org1.example.com ... Creating peer1.org3.example.com ... Creating peer0.org3.example.com ... Creating peer1.org1.example.com ...
create mychannel......
ok 1 created mychannel successfully
Sleep 5s......
Join channel......
join mychannel
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/home/hanwenshuo/caliper/node_modules/grpc/src/client.js:64:15) at /home/hanwenshuo/caliper/node_modules/grpc/src/client.js:583:15 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError (/home/hanwenshuo/caliper/node_modules/grpc/src/client.js:64:15) at /home/hanwenshuo/caliper/node_modules/grpc/src/client.js:583:15 not ok 2 TypeError: Cannot read property 'stack' of undefined
...
1..2
tests 2
pass 1
fail 1
this is my fabric-go.json { "fabric": { "cryptodir": "network/fabric/config/crypto-config", "network": { "orderer": { "url": "grpcs://localhost:7050", "mspid": "OrdererMSP", "domain": "example.com", "user": { "key": "network/fabric/config/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/key.pem", "cert": "network/fabric/config/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem" }, "server-hostname": "orderer.example.com", "tls_cacerts": "network/fabric/config/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt" }, "org1": { "name": "peerOrg1", "mspid": "Org1MSP", "domain": "org1.example.com", "user": { "key": "network/fabric/config/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/key.pem", "cert": "network/fabric/config/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" }, "ca": { "url": "https://localhost:7054", "name": "ca-org1" }, "peer1": { "requests": "grpcs://localhost:7051", "events": "grpcs://localhost:7053", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://localhost:7057", "events": "grpcs://localhost:7059", "server-hostname": "peer1.org1.example.com", "tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" } }, "org2": { "name": "peerOrg2", "mspid": "Org2MSP", "domain": "org2.example.com", "ca": { "url": "https://localhost:8054", "name": "ca-org2" }, "peer1": { "requests": "grpcs://localhost:8051", "events": "grpcs://localhost:8053", "server-hostname": "peer0.org2.example.com", "tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://localhost:8057", "events": "grpcs://localhost:8059", "server-hostname": "peer1.org2.example.com", "tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" } }, "org3": { "name": "peerOrg3", "mspid": "Org3MSP", "domain": "org3.example.com", "ca": { "url": "https://localhost:9054", "name": "ca-org3" }, "peer1": { "requests": "grpcs://localhost:9051", "events": "grpcs://localhost:9053", "server-hostname": "peer0.org3.example.com", "tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://localhost:9057", "events": "grpcs://localhost:9059", "server-hostname": "peer1.org3.example.com", "tls_cacerts": "network/fabric/config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt" } } }, "channel": [ { "name": "mychannel", "config": "network/fabric/config/mychannel.tx", "organizations": ["org1", "org2", "org3"], "deployed": false } ], "chaincodes": [{"id": "marbles", "path": "contract/fabric/marbles/go", "language":"golang", "version": "v1", "channel": "mychannel", "metadataPath": "src/contract/fabric/marbles/go/metadata"}], "endorsement-policy": { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } }, { "role": { "name": "member", "mspId": "Org2MSP" } }, { "role": { "name": "admin", "mspId": "Org1MSP" } } ], "policy": { "2-of": [{"signed-by": 0}, {"signed-by": 1}]} }, "context": { "init": "mychannel", "read": "mychannel", "transfer": "mychannel", "query": "mychannel" } }, "info" : { "Version": "1.1.0", "Size": "6 Peers", "Orderer": "Solo", "Distribution": "Single Host" } }
this is my config-fabric-go.json { "blockchain": { "type": "fabric", "config": "benchmark/marbletest/fabric-go.json" }, "command" : { "start": "docker-compose -f network/fabric/3-org-2-peer/docker-compose-tls.yaml up -d", "end" : "docker-compose -f network/fabric/3-org-2-peer/docker-compose-tls.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)" }, "test": { "clients": { "type": "local", "number": 5 }, "rounds": [{ "label" : "init", "txNumber" : [500, 500, 500, 500, 500], "rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 25}}, {"type": "fixed-rate", "opts": {"tps" : 35}}, {"type": "fixed-rate", "opts": {"tps" : 45}}, {"type": "fixed-rate", "opts": {"tps" : 55}}, {"type": "fixed-rate", "opts": {"tps" : 65}}], "callback" : "benchmark/marbletest/init.js" }, { "label" : "read", "txNumber" : [500, 500, 500, 500, 500], "rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 50}}, {"type": "fixed-rate", "opts": {"tps" : 60}}, {"type": "fixed-rate", "opts": {"tps" : 70}}, {"type": "fixed-rate", "opts": {"tps" : 80}}, {"type": "fixed-rate", "opts": {"tps" : 90}}], "callback" : "benchmark/marbletest/read.js" }, { "label" : "transfer", "txNumber" : [500, 500, 500, 500, 500], "rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 25}}, {"type": "fixed-rate", "opts": {"tps" : 35}}, {"type": "fixed-rate", "opts": {"tps" : 45}}, {"type": "fixed-rate", "opts": {"tps" : 55}}, {"type": "fixed-rate", "opts": {"tps" : 65}}], "callback" : "benchmark/marbletest/transfer.js" }, { "label" : "query", "txNumber" : [20, 20, 20, 20, 20], "rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 4}}, {"type": "fixed-rate", "opts": {"tps" : 6}}, {"type": "fixed-rate", "opts": {"tps" : 8}}, {"type": "fixed-rate", "opts": {"tps" : 10}}, {"type": "fixed-rate", "opts": {"tps" : 12}}], "callback" : "benchmark/marbletest/query.js" }] }, "monitor": { "type": ["docker", "process"], "docker":{ "name": ["all"] }, "process": [ { "command" : "node", "arguments" : "local-client.js", "multiOutput" : "avg" } ], "interval": 1
my Environment ubuntu 14.04(64bit) fabric 1.1.0 nodejs 8.11.4 docker 18.06 docker-compose 1.18.0 This is my first time to ask questions and look forward to a reply.