Hyperledger Fabric marbles v3 demo - Failed when instantiate chaincode - hyperledger

I was testing out the marbles.v3 demo from http://fabric-rtd.readthedocs.io/en/latest/marbles.html and ran into an error while instantiating chaincode. I've double checked the blockchain_creds1.json and chaincode_id and chaincode_version are edited correctly
Log:
error: [Peer.js]: GRPC client got an error response from the peer
"grpc://localhost:7051". Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer0,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer0,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [Peer.js]: GRPC client got an error response from the peer "grpc://localhost:8051". Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer2,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [Chain.js]: Chain-sendPeersProposal - Promise is rejected: Error: Timeout expired while starting chaincode end2end:v0(networkid:dev,peerid:peer2,tx:ec4161b7f14893d1142a836fb552e0a8eb4b5653ad4191e946e11ba4a7191993)
at /home/eric/blockchain-demo/fabric-sdk-node/node_modules/grpc/src/node/src/client.js:434:17
error: [install-chaincode]: instantiate proposal was bad
error: [install-chaincode]: instantiate proposal was bad
not ok 3 Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting...
Not sure why it cant connect to the peer since the container is running:
[root#DEV1 fabric-sdk-node]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3e79a4a80992 hyperledger/fabric-peer "peer node start -..." 36 minutes ago Up 36 minutes 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer3
71fe64571dc6 hyperledger/fabric-peer "peer node start -..." 36 minutes ago Up 36 minutes 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1
08cecbc1cd94 hyperledger/fabric-peer "peer node start -..." 36 minutes ago Up 36 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0
41e7f50fe897 hyperledger/fabric-peer "peer node start -..." 36 minutes ago Up 36 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer2
7182a3c2ad7d hyperledger/fabric-ca "sh -c 'fabric-ca-..." 37 minutes ago Up 36 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1
f8b529fdd7ec hyperledger/fabric-orderer "orderer" 37 minutes ago Up 36 minutes 0.0.0.0:7050->7050/tcp orderer0
ca83ab5db256 hyperledger/fabric-ca "sh -c 'fabric-ca-..." 37 minutes ago Up 36 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2
b68cf9ee6725 couchdb "tini -- /docker-e..." 37 minutes ago Up 36 minutes 0.0.0.0:5984->5984/tcp couchdb
Any help would be appreciated Thx All =)

I recommend checking the peer's logs to see why it is failing.
For example, since it timed out talking to peer0, check peer0's logs as follows:
docker logs peer0

Related

Setting up Confluent Kafka Community Locally - broker container keeps exiting

I'm trying to setup Kafka locally and facing an issue. Whenever I run docker compose up, all containers are up correctly. After sometime, the broker container stops running for some reason. There is no error in the container logs.
Below is the status of all docker containers:
0c27a63bb0e7 confluentinc/ksqldb-examples:5.5.1 "bash -c 'echo Waiti…" 6 minutes ago Up 6 minutes ksql-datagen
4e4a30204ccc confluentinc/cp-ksqldb-cli:5.5.1 "/bin/sh" 6 minutes ago Up 6 minutes ksqldb-cli
61b86ff2a6d6 confluentinc/cp-ksqldb-server:5.5.1 "/etc/confluent/dock…" 6 minutes ago Up 6 minutes (health: starting) 0.0.0.0:8088->8088/tcp, :::8088->8088/tcp ksqldb-server
2e022b64a760 cnfldemos/kafka-connect-datagen:0.3.2-5.5.0 "/etc/confluent/dock…" 6 minutes ago Exited (137) 5 minutes ago connect
3c7d273683fb confluentinc/cp-kafka-rest:5.5.1 "/etc/confluent/dock…" 6 minutes ago Exited (137) 5 minutes ago rest-proxy
6b6d36fb9d88 confluentinc/cp-schema-registry:5.5.1 "/etc/confluent/dock…" 6 minutes ago Up 6 minutes 0.0.0.0:8081->8081/tcp, :::8081->8081/tcp schema-registry
3bb20335ecd1 confluentinc/cp-kafka:5.5.1 "/etc/confluent/dock…" 6 minutes ago Exited (137) 5 minutes ago broker
7b2f922ef8ef confluentinc/cp-zookeeper:5.5.1 "/etc/confluent/dock…" 6 minutes ago Up 6 minutes 2888/tcp, 0.0.0.0:2181->2181/tcp, :::2181->2181/tcp, 3888/tcp zookeeper
All I want is a single node Kafka cluster with Schema Registry up and running locally. Any pointers are appreciated.
137 exit code is memory related.
If all you want is Kafka and the Schema Registry, remove KSQLDB stuff, REST Proxy, and DataGen containers
I'd also suggest using a later image tag, such as 7.3.1

airflow cluster cant't fetch logs from workers

The airflow cluster accesses the worker log error, and accesses the worker in the master node will not report an error.I can't solve my proplem.I used the docker develoment my airflow and celery.can you help me?Thanks!!!
*** Log file does not exist: /opt/airflow/logs/dag_id=example_bash_operator/run_id=scheduled__2022-09-23T00:00:00+00:00/task_id=runme_1/attempt=1.log
*** Fetching from: http://eosbak01.zzz.ac.cn:8793/log/dag_id=example_bash_operator/run_id=scheduled__2022-09-23T00:00:00+00:00/task_id=runme_1/attempt=1.log
*** !!!! Please make sure that all your Airflow components (e.g. schedulers, webservers and workers) have the same 'secret_key' configured in 'webserver' section and time is synchronized on all your machines (for example with ntpd) !!!!!
****** See more at https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key
****** Failed to fetch log file from worker. Client error '403 FORBIDDEN' for url 'http://eosbak01.zzz.ac.cn:8793/log/dag_id=example_bash_operator/run_id=scheduled__2022-09-23T00:00:00+00:00/task_id=runme_1/attempt=1.log'
For more information check: https://httpstatuses.com/403
WorkerNode
[airflow#eosbak01 deploy]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ef39a54de97 apache/airflow:2.3.4 "/usr/bin/dumb-init …" About a minute ago Up About a minute (healthy) 8080/tcp deploy_airflow-worker_
MainNode
[airflow#eosbak02 deploy]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1e6a7e50831d apache/airflow:2.3.4 "/usr/bin/dumb-init …" 26 minutes ago Up 26 minutes (healthy) 0.0.0.0:5555->5555/tcp, :::5555->5555/tcp, 8080/tcp deploy_flower_1
9afb5985b9f3 apache/airflow:2.3.4 "/usr/bin/dumb-init …" 27 minutes ago Up 27 minutes (healthy) 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp deploy_airflow-webserver_1
80132177ae3d apache/airflow:2.3.4 "/usr/bin/dumb-init …" 27 minutes ago Up 27 minutes (healthy) 8080/tcp deploy_airflow-triggerer_1
6ea5a0ed7dec apache/airflow:2.3.4 "/usr/bin/dumb-init …" 27 minutes ago Up 27 minutes (healthy) 8080/tcp deploy_airflow-scheduler_1
2787acb189ad mysql:8.0.27 "docker-entrypoint.s…" 29 minutes ago Up 29 minutes (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp deploy_mysql_1
057af26f6070 redis:latest "docker-entrypoint.s…" 29 minutes ago Up 29 minutes (healthy) 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp deploy_redis_1

Hyperledger composer rest server : Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: Connect Failed

Under Hyperledger composer, I am trying to set up a persistent Rest Server using googleauth2.0 over a multi-org setup.
For the multi-org setup, I have followed https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org and for the google auth setup I have followed https://hyperledger.github.io/composer/latest/tutorials/google_oauth2_rest.
Everything goes fine until following step when I try to start a new instance of the extended Docker image for the REST server using following command
docker run
-d
-e COMPOSER_CARD=${COMPOSER_CARD}
-e COMPOSER_NAMESPACES=${COMPOSER_NAMESPACES}
-e COMPOSER_AUTHENTICATION=${COMPOSER_AUTHENTICATION}
-e COMPOSER_MULTIUSER=${COMPOSER_MULTIUSER}
-e COMPOSER_PROVIDERS="${COMPOSER_PROVIDERS}"
-e COMPOSER_DATASOURCES="${COMPOSER_DATASOURCES}"
-v ~/.composer:/home/composer/.composer
--name rest
--network composer_default
-p 3001:3001
org1/composer-rest-server
Following are the logs from rest container:
[2018-05-13 02:38:15] PM2 log: Launching in no daemon mode
[2018-05-13 02:38:16] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-05-13 02:38:16] PM2 log: App name:composer-rest-server id:0 online
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Discovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: Connect Failed
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: Connect Failed
Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: Connect Failed
at _checkRuntimeVersions.then.catch (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:790:34)
at <anonymous>
[2018-05-13 02:38:29] PM2 log: App [composer-rest-server] with id [0] and pid [14], exited with code [1] via signal [SIGINT]
Here are the docker containers:
233938f12ef0 org1/composer-rest-server "pm2-docker composer…" 30 minutes ago Up 30 minutes 3000/tcp, 0.0.0.0:3001->3001/tcp rest
6285853fdceb dev-peer1.org1.example.com-emcs-0.0.3-b1bb3a7f1090c0d1cabf10340188aa72e329e1266595f63d232d9cc38a0ed8b8 "/bin/sh -c 'cd /usr…" About an hour ago Up About an hour dev-peer1.org1.example.com-emcs-0.0.3
1a4f7680cac9 dev-peer0.org1.example.com-emcs-0.0.3-094e3600469176994df7048ec5afad4114ce5203fe267b0c45da52a3d3b9e0b7 "/bin/sh -c 'cd /usr…" About an hour ago Up About an hour dev-peer0.org1.example.com-emcs-0.0.3
b7c7364c88bd dev-peer0.org2.example.com-emcs-0.0.3-3f76658cf8352417e15be589ed41aa0fa81e702a1bdb6e7e1ce898a015fdd34c "/bin/sh -c 'cd /usr…" About an hour ago Up About an hour dev-peer0.org2.example.com-emcs-0.0.3
b154cd4f50bd dev-peer1.org2.example.com-emcs-0.0.3-340eb1dbb0152185d068724d637848c882bd3754f7c9888d57c80bdfb6530774 "/bin/sh -c 'cd /usr…" About an hour ago Up About an hour dev-peer1.org2.example.com-emcs-0.0.3
f9d2a72fde40 dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab "chaincode -peer.add…" 2 hours ago Up 2 hours dev-peer1.org2.example.com-mycc-1.0
d812bef3a1bd dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 "chaincode -peer.add…" 2 hours ago Up 2 hours dev-peer0.org1.example.com-mycc-1.0
ccb70e752d7b dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b "chaincode -peer.add…" 2 hours ago Up 2 hours dev-peer0.org2.example.com-mycc-1.0
6989f8850296 hyperledger/fabric-tools "/bin/bash -c './scr…" 2 hours ago Up 2 hours cli
0eabbd6be684 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
d8c1146a5989 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
142aeb4525ab hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
70ef571ea1ba hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
31c8417beae2 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 hours ago Up 2 hours 0.0.0.0:8054->7054/tcp ca_peerOrg2
ade3061fc517 hyperledger/fabric-orderer "orderer" 2 hours ago Up 2 hours 0.0.0.0:7050->7050/tcp orderer.example.com
e315be1721d9 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp couchdb3
0197051ffaf6 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdb1
5abd60481ec3 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp couchdb2
58205a7b26fe hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 hours ago Up 2 hours 0.0.0.0:7054->7054/tcp ca_peerOrg1
13009c1401fb hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb0
1ef9ab29b607 mongo "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:27017->27017/tcp mongo
I have already gone through some errors which have been received by others, and so have already performed following additional steps:
Changing the permissions of ~/.composer by using the command: chmod
-R 777 ~/.composer
Replaced the IP addresses in the connection.json for my network cards to use 0.0.0.0 as recommended
in https://github.com/hyperledger/composer/issues/3002.
I have tried cleaning up all my docker containers and images, stopping the fabric and starting the fabric but it still comes up with the same error..
Expected behaviour is that the command docker logs -f rest should finish with Browse your REST API at http://localhost:3001/explorer. However, it results in the above error.
The Google Auth tutorial isn't expecting a fabric set up from the multiorg tutorial so isn't going to work if you follow the steps. The Auth tutorial is designed to work with the single org provided by the development fabric from setting up the composer development environment or running the single org tutorial. The problem will be that the connection.json needs to describe the multi-org setup (so you will need an appropriate connection profile from the multi-org tutorial) and as you are running your rest server in a docker container and are attaching to the network which all the hyperledger fabric containers are connected to you cannot use hostnames and addresses such as localhost, 127.0.0.1 or 0.0.0.0 to try to address the different hyperledger fabric processes (all of these will actually refer to your rest server container). You need to use the correct hostnames to identify them. For example
orderer.example.com for the orderer
peer0.org1.example.com for peer0.org1.example.com (and similar for the other peers)
ca0 for the certificate authority in org1, ca1 for the certificate authority in org2
Try replacing your peer0.org1.example.com, peer0.org1.example.com, ca.org1.example.com and orderer.example.com in
sed -e 's/localhost:7051/peer0.org1.example.com:7051/' \
-e 's/localhost:7053/peer0.org1.example.com:7053/' \
-e 's/localhost:7054/ca.org1.example.com:7054/' \
-e 's/localhost:7050/orderer.example.com:7050/' \
< $HOME/.composer/cards/restadmin#trade-network/connection.json \
> /tmp/connection.json && \
cp -p /tmp/connection.json $HOME/.composer/cards/restadmin#trade-network/
command with your ip adddress like :
sed -e 's/localhost:7051/192.168.0.170:7051/' \
-e 's/localhost:7053/192.168.0.170:7053/' \
-e 's/localhost:7054/192.168.0.170:7054/' \
-e 's/localhost:7050/192.168.0.170:7050/' \
< $HOME/.composer/cards/restadmin#trade-network/connection.json \
> /tmp/connection.json && \
cp -p /tmp/connection.json $HOME/.composer/cards/restadmin#trade-network/

docker containers shutdown continuously

I follow the official tutorial of deploying docker services https://docs.docker.com/get-started/part5/#add-a-new-service-and-redeploy, in the first time i tried this the containers was running as expected but after that the containers shutdown and restarting (i notice that using the visualizer service provided by docker )
and when i execute the command :
docker stack ps getstartedlab
NAME DESIRED STATE CURRENT STATE
ERROR
getstartedlab_web.1 Running Preparing 2 seconds ago
\_ getstartedlab_web.1 Shutdown Failed 4 minutes ago
"task: non-zero exit (2)"
i read in this post https://github.com/docker/machine/issues/3747 that the problem came from the firewall that may block the icmp, i tried to ping docker.com and i had 100% loss packet but when i ping google.com it's ok with no loss packets.
the result of docker ps --all is :
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9f67c82da7c7 username/repo:tag "python app.py" 2 minutes ago Exited (2) 2 minutes ago getstartedlab_web.2.zcnr0ld9bioy0dffsxmn8zss5
f59e413b0780 username/repo:tag "python app.py" 4 minutes ago Exited (2) 4 minutes ago getstartedlab_web.5.ymxgnsf7n8306yr8963xyyljv
9ab631c4057c username/repo:tag "python app.py" 10 minutes ago Exited (2) 10 minutes ago getstartedlab_web.5.zr3gsvgbyxs8c51fiko5h9jxp
bee5816ce1f2 dockersamples/visualizer:stable "npm start" 15 minutes ago Up 15 minutes 8080/tcp getstartedlab_visualizer.1.oyiqwb5esq6zakcdtiw4txh8a
cadca594f8cd username/repo:tag "python app.py" 24 hours ago Exited (2) 24 hours ago getstartedlab_web.1.zehutsl9cefrccqrj86dz4ap7
576b1a6db0b0 username/repo:tag "python app.py" 24 hours ago Exited (2) 24 hours ago getstartedlab_web.5.za9xvxpo5yvl20kha9sjcimmz
2804ebc4fc0c username/repo:tag "python app.py" 24 hours ago Exited (2) 24 hours ago getstartedlab_web.1.zlk42chspvym3jxkzs2nc8k2d
03efb2b04489 dockersamples/visualizer:stable "npm start" 24 hours ago Exited (255) 16 minutes ago 8080/tcp getstartedlab_visualizer.1.qyp4egtu9vcd31kf2jxtzxko3
b85fd1600955 username/repo:tag "python app.py" 2 days ago Exited (2) 2 days ago getstartedlab_web.5.kzrj3m5c3jgkuox0ulpszizee
and the
docker logs 9f67c82da7c7
python: can't open file 'app.py': [Errno 2] No such file or directory
exuse me for representation of the results of those commands because when i copy past the results the lines breaks, how to copy past and preserve the same displaying ?
can anyone have a fix to this problem ? thanks.

When trying to issue an identity, it says my CA does not exist

I'm trying to issue an identity by
composer identity issue -p hlfv1 -n bonusetis -i PeerAdmin -s password -u perelluis -x true -a perelluis
But I get
Error: fabric-ca request register failed with errors [[{"code":0,"message":"CA 'ca_peerOrg1' does not exist"}]]
Command failed.
Command succeeded
And I do have a CA named ca_peerOrg1, as I have used it so far and it shows up in my docker containers:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
425df4a2d729 hyperledger/composer-playground "pm2-docker compos..." 30 minutes ago Up 30 minutes 0.0.0.0:8080->8080/tcp composer-playground
5d6ac09d2f41 dev-peer0.org1.example.com-bonusetis-0.9.0 "chaincode -peer.a..." 2 hours ago Up 2 hours dev-peer0.org1.example.com-bonusetis-0.9.0
b115a06eebdb dev-peer1.org1.example.com-bonusetis-0.9.0 "chaincode -peer.a..." 2 hours ago Up 2 hours dev-peer1.org1.example.com-bonusetis-0.9.0
bd2b4a5dfced hyperledger/fabric-tools "/bin/bash" 3 hours ago Up 3 hours cli
76a1159e510c hyperledger/fabric-ca "sh -c 'fabric-ca-..." 3 hours ago Up 3 hours 0.0.0.0:8054->7054/tcp ca_peerOrg2
92c6786f3ff1 hyperledger/fabric-peer "peer node start" 3 hours ago Up 3 hours 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
f439f9f809c6 hyperledger/fabric-orderer "orderer" 3 hours ago Up 3 hours 0.0.0.0:7050->7050/tcp orderer.example.com
8584208cd8a8 hyperledger/fabric-peer "peer node start" 3 hours ago Up 3 hours 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
7e68ac2e33b4 hyperledger/fabric-peer "peer node start" 3 hours ago Up 3 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
8688c0ef16da hyperledger/fabric-ca "sh -c 'fabric-ca-..." 3 hours ago Up 3 hours 0.0.0.0:7054->7054/tcp ca_peerOrg1
baa42aa6bb12 hyperledger/fabric-peer "peer node start" 3 hours ago Up 3 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
My connection profile shows the same name for the CA, with the correct ports.
If it's of any help, if I try to access the ports of the peers I get a
This page isn’t working
0.0.0.0 sent an invalid response.
message, but if I try to access the localhost:7054, I get a 404 page not found. I think this is expected, but just in case it tells something.
As seen in the containers, I'm using latest versions of Fabric(beta) and Composer(0.9) and I'm on Ubuntu 16.04 TLS.
Problem was the name of the CA on the Connection Profile must be the name of the server, as a global defined by
- FABRIC_CA_SERVER_CA_NAME= $CA_NAME
So the $CA_NAME must be set in your Connection Profile, and not the containers name.
Hope it helps if someone is facing the same problem
For anyone else who gets this error when using docker, ensure this flag is set for the CA container FABRIC_CA_SERVER_CA_NAME=myca-name in your docker-compose.yml file
Adding a few details to Pere-Lluis answer.
fabric ca name in network-config must be equal to ca container's FABRIC_CA_SERVER_CA_NAME=ca-org1
CA service
services:
ca.org1.example.com:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org1
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fe93c5b8ef6f4c1c91d9e6e577c33163609fe40011_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fe93c5b8ef6f4c1c91d9e6e577c33163609fe40011_sk
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
- ./channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
CA name is ca-org1 -- - FABRIC_CA_SERVER_CA_NAME=ca-org1
network-config.yaml
certificateAuthorities:
ca-org1:
url: "http://localhost:7054"
httpOptions:
verify: false
tlsCACerts:
path: "artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem"
registrar:
- enrollId: "admin"
enrollSecret: "adminpw"
caName: ca-org1
caName must be the name which is set to this environment variable FABRIC_CA_SERVER_CA_NAME. In this case, it is ca-org1.
Anything other than this will give ca not exist error for this service.
Convert the container name ca_peerOrg1 to lower case ca_peerorg1.

Resources