Reputation: 3
I have configured 2 CA for 2 Org (1 CA/1 Org). I have used Port- 7054:7054 for 1st CA and Port- 8054:8054 for 2nd CA.But when I do 'docker logs for 2nd CA container I am getting this- 2019/08/18 19:54:19 [INFO] Listening on http://0.0.0.0:7054 .Is in't it should be 8054 as I configured port 8054:8054 in docker-compose file for 2nd CA.? If yes, where I am doing wrong and where should I update?
My CA service in docker-compose file---
services:
ca0:
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/9a834d764f3ec2ee602e073dc27a971add2052c84024efe3e5224fa5485053e9_sk
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/9a834d764f3ec2ee602e073dc27a971add2052c84024efe3e5224fa5485053e9_sk -b admin:adminpw -d'
volumes:
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
networks:
- basic
ca1:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org2
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/557164d9dc484f634bc058938bac0c68fb56f60ab0359f369ececfe6c7199a53_sk
ports:
- "8054:8054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/557164d9dc484f634bc058938bac0c68fb56f60ab0359f369ececfe6c7199a53_sk -b admin:adminpw -d'
volumes:
- ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg2
networks:
- basic
Upvotes: 0
Views: 410
Reputation: 4133
@Subhra Sankha Bose @Nipun Tharuksha
We can change default values in every open source projects
You are missing one env variable to override the default port 7054
Add this to environment:
- FABRIC_CA_SERVER_PORT=8054
After adding the env see below my logs
2019/08/19 08:34:15 [INFO] Home directory for default CA: /etc/hyperledger/fabric-ca-server
2019/08/19 08:34:15 [DEBUG] 1 CA instance(s) running on server
2019/08/19 08:34:15 [INFO] Operation Server Listening on 127.0.0.1:9443
2019/08/19 08:34:15 [DEBUG] TLS is enabled
2019/08/19 08:34:15 [DEBUG] TLS Certificate: /etc/hyperledger/fabric-ca-server-config/ca.nbd-cert.pem, TLS Key: /etc/hyperledger/fabric-ca-server-config/8b3bb8a74b5901f03c8d0901233f5b0ea2b2800e4176dcada7ade4932df565e1_sk
2019/08/19 08:34:15 [DEBUG] Client authentication type requested: noclientcert
2019/08/19 08:34:15 [INFO] Listening on https://0.0.0.0:8054
Upvotes: 2
Reputation: 867
Just configure your 2nd CA with Port- 8054:7054 because internally CA is configured to listen on port 7054 only so you just have to define external port for your CA(here 8054).
Upvotes: 0