Open httran13 opened 6 years ago
are you using the "my first network" setup from fabric-samples
? this seems more of a problem with your network's setup than with marbles. I'm stating the obvious here, but you need to specify the hostname to docker: docker run --hostname=value
im using docker-compose file and both marbles and ca is in the same network "projbc".
Below is my local connection_profile
{
"name": "Docker Compose Network",
"x-networkId": "not-important",
"x-type": "hlfv1",
"description": "Connection Profile for an Hyperledger Fabric network on a local machine",
"version": "1.0.0",
"client": {
"organization": "Org1MSP",
"credentialStore": {
"path": "/$HOME/proj/hfc-key-store"
}
},
"channels": {
"projbc": {
"orderers": [
"orderer.example.com",
"orderer0.example.com"
],
"peers": {
"peer0.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": false
}
},
"chaincodes": [
"marbles:v4"
]
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com"
],
"certificateAuthorities": [
"fabric-ca"
],
"x-adminCert": {
"path": "./crypto/v1.1/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem"
},
"x-adminKeyStore": {
"path": "./crypto/v1.1/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://orderer.example.com:7050",
"grpcOptions": {
"ssl-target-name-override": "orderer.example.com",
"grpc-max-send-message-length": 15
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----
And here is my docker compose:
##################################################################TODO the ca will need to be modified when new certs are generated ca0: image: ${IMAGE_REPO}/fabric-ca${IMAGE_TAG_FABRIC} environment:
"7054:7054" command: sh -c 'fabric-ca-server start -n ca0 ${V11_IDENTITIES_ALLOWREMOVE} ${V11_AFFILIATIONS_ALLOWREMOVE} --registry.maxenrollments -1 --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/*_sk -b admin:adminpw'
volumes:
projbc
marbles: container_name: marbles image: htran1/marbles:latest command: gulp marbles_local ports:
I am running a marbles docker image in the same network with my fab network. Using the docker container's name as the hostname, marbles is unable to connect to the fabric ca(http protocol) but marbles is able to resolve the peers/orderers.
How I had to temporarily get marbles working, hence i know that its able to connect to peers/orderers using the dockers given hostnames, is using the marbles ui guided help, I input the fabric ca IP.
I got the fabric ca IP by using docker network inspect, only when using the IP, marbles were able to function correctly.