Why can't my peers connect to couchdb? #couchdb #docker #fabric


stpcmferiwbtnundnx@...
 

I am trying to bring up the latest fabric-samples/test-network with this script:
./network.sh up createChannel -ca -s couchdb

But I kept coming up with this error:
Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:7051: connect: connection refused"

I found using `monitordocker.sh net_test` that the peers were crashing because of this error:
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [couchdb] CreateSystemDatabasesIfNotExist -> ERRO 00c Error calling CouchDB CreateDatabaseIfNotExist() for system dbName: _users, error: error handling CouchDB request. Error:forbidden, Status Code:403, Reason:You can't edit the security object of the user database.
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [couchdb] VerifyCouchConfig -> ERRO 00d Unable to connect to CouchDB, error: error handling CouchDB request. Error:forbidden, Status Code:403, Reason:You can't edit the security object of the user database.. Check the admin username and password.
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [gossip.gossip] Stop -> INFO 00e Stopping gossip
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [gossip.discovery] Stop -> INFO 00f Stopping
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [gossip.discovery] Stop -> INFO 010 Stopped
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [gossip.comm] Stop -> INFO 011 Stopping
peer0.org1.example.com|2020-07-14 02:12:13.634 UTC [gossip.comm] Stop -> INFO 012 Stopped

The user and password configs in my .yaml files seem to match, so I don't know what went wrong. Please see attached docker-compose-test-net.yaml and docker-compose-couch.yaml.

I think my problem is similar to this one: https://forum.linuxfoundation.org/discussion/856289/error-handling-couchdb-request-error-unauthorized-status-code-401-reason-you-are-not-a-server-a
But the answers weren't helpful in my case.

Join fabric@lists.hyperledger.org to automatically receive all group messages.