I've been experimenting with Hyperledger Fabric, deployed over 2 VirtualBox Ubuntu images with docker swarm. But I have some issues when it comes to the Composer installation.
Network Setup:
Host1: Orderer, Peer1.Org1, Peer2.Org1, CLI
Host2: Peer1.Org2, Peer2.Org2
When it comes to the Fabric setup everything appears to be ok. I'm able to start the network, join the peers from the second host, and update the anchor peers (one for each organisation).
The Composer installation starts with creating and importing the business network card and then installing the .bna file onto the network.
The issues appear when I try to start the network:
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: failed to execute transaction 14f90ad938da64fbbdb2923b07f4985251391937fc3fdc8bab19c2d13135ecd3: error starting container: error starting container: API error (500): Could not attach to network net_example: rpc error: code = NotFound desc = network net_example not found
Response from attempted peer comms was an error: Error: failed to execute transaction 14f90ad938da64fbbdb2923b07f4985251391937fc3fdc8bab19c2d13135ecd3: error starting container: error starting container: API error (500): Could not attach to network net_example: rpc error: code = NotFound desc = network net_example not found
Response from attempted peer comms was an error: Error: Failed to connect before the deadline
Response from attempted peer comms was an error: Error: Failed to connect before the deadline
When I inspect the first peer from org1, I'm seeing the following error:
2018-09-24 13:46:44.665 UTC [lscc] executeInstall -> INFO 03c Installed Chaincode [example-network] Version [0.0.1] to peer
2018-09-24 13:46:46.993 UTC [dockercontroller] Start -> ERRO 03d start-could not start container: API error (500): Could not attach to network net_example: rpc error: code = NotFound desc = network net_example not found
2018-09-24 13:46:47.008 UTC [chaincode] Launch -> ERRO 03e start failed: API error (500): Could not attach to network net_example: rpc error: code = NotFound desc = network net_example not found
error starting container
error starting container
2018-09-24 13:46:47.008 UTC [endorser] SimulateProposal -> ERRO 03f [mychannel][14f90ad9] failed to invoke chaincode name:"lscc" , error: API error (500): Could not attach to network net_example: rpc error: code = NotFound desc = network net_example not found
error starting container
error starting container
failed to execute transaction 14f90ad938da64fbbdb2923b07f4985251391937fc3fdc8bab19c2d13135ecd3
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:173
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:287
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:501
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:923
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1148
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:2361
2018-09-24 13:46:51.770 UTC [lscc] Invoke -> ERRO 040 error getting chaincode example-network on channel [mychannel]: could not find chaincode with name 'example-network'
This is my connectionProfile.json:
{
"name": "example-network",
"x-type": "hlfv1",
"version": "1.0.0",
"channels": {
"mychannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.manager.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
},
"peer1.manager.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
},
"peer0.sponsor.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
},
"peer1.sponsor.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"Manager": {
"mspid": "ManagerMSP",
"peers": [
"peer0.manager.example.com",
"peer1.manager.example.com"
],
"certificateAuthorities": [
"ca.manager.example.com"
]
},
"Sponsor": {
"mspid": "SponsorMSP",
"peers": [
"peer0.sponsor.example.com",
"peer1.sponsor.example.com"
],
"certificateAuthorities": [
"ca.sponsor.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://localhost:7050",
"grpcOptions": {
"ssl-target-name-override": "orderer.example.com"
},
"tlsCACerts": {
"pem": "INSERT_ORDERER_CA_CERT"
}
}
},
"peers": {
"peer0.manager.example.com": {
"url": "grpcs://localhost:7051",
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.manager.example.com"
},
"tlsCACerts": {
"pem": "INSERT_MANAGER_CA_CERT"
}
},
"peer1.manager.example.com": {
"url": "grpcs://localhost:8051",
"eventUrl": "grpcs://localhost:8053",
"grpcOptions": {
"ssl-target-name-override": "peer1.manager.example.com"
},
"tlsCACerts": {
"pem": "INSERT_MANAGER_CA_CERT"
}
},
"peer0.sponsor.example.com": {
"url": "grpcs://10.0.0.113:9051",
"eventUrl": "grpcs://10.0.0.113:9053",
"grpcOptions": {
"ssl-target-name-override": "peer0.sponsor.example.com"
},
"tlsCACerts": {
"pem": "INSERT_SPONSOR_CA_CERT"
}
},
"peer1.sponsor.example.com": {
"url": "grpcs://10.0.0.112:10051",
"eventUrl": "grpcs://10.0.0.112:10053",
"grpcOptions": {
"ssl-target-name-override": "peer1.sponsor.example.com"
},
"tlsCACerts": {
"pem": "INSERT_SPONSOR_CA_CERT"
}
}
},
"certificateAuthorities": {
"ca.manager.example.com": {
"url": "https://localhost:7054",
"caName": "ca-manager",
"httpOptions": {
"verify": false
}
},
"ca.sponsor.example.com": {
"url": "https://10.0.0.111:8054",
"caName": "ca-sponsor",
"httpOptions": {
"verify": false
}
}
}
}
Does anybody know what I could try next?
The composer network start command is attempting to start a 'chaincode' container for each of the peers, and from error you show, there are 2 of your peers that cannot start these new container.
The error looks like a Docker error - the containers cannot be started on a network bridge called "net_example". I would guess that you have an environment variable defined in one of your docker-compose-xxx.yaml files that defines this variable: CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE which determines which network bridge the new containers are attached to.
You will need to determine which network bridge our other Fabric containers are using, then set this variable in the .yaml to that bridge.
This previous post has some discussion on multi-host fabric.
I dont think you need Docker Swarm for multi host Fabric setup.
I tried this tool from Altoros for easy setup of multi host Fabric. it did work with Fabric 1.1. For 1.2 it did not work - i think it requires some changes.
https://www.altoros.com/blog/deploying-a-multi-node-hyperledger-fabric-network-in-5-steps/
There is another tool from Debut Infotech. you can try this too.
https://www.fabricdeployer.com/
Early on i tried setting up with Docker Swarm using the link below. it worked.
https://medium.com/#wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f
Related
I was trying to deploy my network to BYFN network(based on the hyperledegr fabric's base files and changed : - CORE_CHAINCODE_EXECUTETIMEOUT=300s) in single computer as the following toturial:
https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org
and Connection.json file are as following:
"name": "byfn-network",
"x-type": "hlfv1",
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"mychannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer1.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer0.org2.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer1.org2.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
},
"Org2": {
"mspid": "Org2MSP",
"peers": [
"peer0.org2.example.com",
"peer1.org2.example.com"
],
"certificateAuthorities": [
"ca.org2.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://localhost:7050",
"grpcOptions": {
"ssl-target-name-override": "orderer.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICQjCCAemgAwIBAgIQfpE5aZ1m4lVwayWEUER57jAKBggqhkjOPQQDAjBsMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4\nYW1wbGUuY29tMB4XDTIyMDQxNTAyNTIwMFoXDTMyMDQxMjAyNTIwMFowbDELMAkG\nA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu\nY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt\ncGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABB0BjtJc4v3HswWS/oh4\nMaGSXI3MjW217C+zIVTkDGAD0j6l1RfLRw+cfh3TFebuiBX3oWxNX1xUYRdaUwYW\nRVWjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYB\nBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg0now5QRvmIfTSp4zTe1P\nwToH7HK+OoJGFA1sbTN7iYYwCgYIKoZIzj0EAwIDRwAwRAIgOxUlaps8ej1yFBZ5\nwTB2Gchsa6a91uO0pBhM8DYJhaUCIBz0bTqLanH7D83ygaKjnItdNZAkgzY9rogv\nL7WZsXE4\n-----END CERTIFICATE-----\n"
}
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpcs://localhost:7051",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICVjCCAf2gAwIBAgIQO1D2dcn3DjdP/TRl+NFbszAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMjA0MTUwMjUyMDBaFw0zMjA0MTIwMjUy\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAErVRbK4yDDMZoAq1mhLk9orgjCI54EnPfWUFrpK5bYNu8fNeo4MqH6ssV\nRrbmUwSmGLxNA7o/yo5SCcpNvjxE7qNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud\nJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud\nDgQiBCCT5mNCE3D3X8nmbr1ChoejYMsggcliuY5divhAdKG7HTAKBggqhkjOPQQD\nAgNHADBEAiBYNw2BR3LZSJqbOi/2Hp7BAI99yQVq9T3tVT7UN9hXrwIgYSQyJ6CB\ngvwOjkvYavUJmtMJJWSLo92B+z1TDmoZiOM=\n-----END CERTIFICATE-----\n"
}
},
"peer1.org1.example.com": {
"url": "grpcs://localhost:8051",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICVjCCAf2gAwIBAgIQO1D2dcn3DjdP/TRl+NFbszAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMjA0MTUwMjUyMDBaFw0zMjA0MTIwMjUy\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAErVRbK4yDDMZoAq1mhLk9orgjCI54EnPfWUFrpK5bYNu8fNeo4MqH6ssV\nRrbmUwSmGLxNA7o/yo5SCcpNvjxE7qNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud\nJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud\nDgQiBCCT5mNCE3D3X8nmbr1ChoejYMsggcliuY5divhAdKG7HTAKBggqhkjOPQQD\nAgNHADBEAiBYNw2BR3LZSJqbOi/2Hp7BAI99yQVq9T3tVT7UN9hXrwIgYSQyJ6CB\ngvwOjkvYavUJmtMJJWSLo92B+z1TDmoZiOM=\n-----END CERTIFICATE-----\n"
}
},
"peer0.org2.example.com": {
"url": "grpcs://localhost:9051",
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICWDCCAf6gAwIBAgIRAMww19crV8hH1adEpOEDfFUwCgYIKoZIzj0EAwIwdjEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs\nc2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMjIwNDE1MDI1MjAwWhcNMzIwNDEyMDI1\nMjAwWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE\nBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G\nA1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABFr/JSn1EszAScqPVHopPjQhefNhWGFogplMpBhAwF9VPk7BYBDecrYW\njfQ1g1PPnxQ/kp0SXOOVTeZDaFS6POKjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNV\nHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNV\nHQ4EIgQgYn1+kCmnIekTe3tJCH79yIzbZo9/yUTPXrFJ1sfbBfYwCgYIKoZIzj0E\nAwIDSAAwRQIhAKvqoHVNlFY4txK3scbbJw1GiNWlYsSNQnCHFVwCRUbQAiACgK9v\nfOroVCeo6rBsysojq+SlBMtDtpDCknlOGn9UYw==\n-----END CERTIFICATE-----\n"
}
},
"peer1.org2.example.com": {
"url": "grpcs://localhost:10051",
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICWDCCAf6gAwIBAgIRAMww19crV8hH1adEpOEDfFUwCgYIKoZIzj0EAwIwdjEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs\nc2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMjIwNDE1MDI1MjAwWhcNMzIwNDEyMDI1\nMjAwWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE\nBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G\nA1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABFr/JSn1EszAScqPVHopPjQhefNhWGFogplMpBhAwF9VPk7BYBDecrYW\njfQ1g1PPnxQ/kp0SXOOVTeZDaFS6POKjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNV\nHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNV\nHQ4EIgQgYn1+kCmnIekTe3tJCH79yIzbZo9/yUTPXrFJ1sfbBfYwCgYIKoZIzj0E\nAwIDSAAwRQIhAKvqoHVNlFY4txK3scbbJw1GiNWlYsSNQnCHFVwCRUbQAiACgK9v\nfOroVCeo6rBsysojq+SlBMtDtpDCknlOGn9UYw==\n-----END CERTIFICATE-----\n"
}
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "https://localhost:7054",
"caName": "ca-org1",
"httpOptions": {
"verify": false
}
},
"ca.org2.example.com": {
"url": "https://localhost:8054",
"caName": "ca-org2",
"httpOptions": {
"verify": false
}
}
}
}
and I enabled the tls in the configarations of peers.
but while I was fininishing the Step Eighteen.I tried to run my network on composer-playground but it failed and the error informations are as following.Could anyone help me to fix up this question?
2022-04-15T04:40:42.251Z INFO :LoadModule :loadModule() Loading composer-wallet-filesystem from /home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-wallet-filesystem {}$
2022-04-15T04:40:42.312Z INFO :PlaygroundAPI :createServer() Playground API started on port 8080 {}$
2022-04-15T04:41:25.537Z INFO :PlaygroundAPI :createServer() Client with ID 'FqtZNzJSysII2clEAAAA' on host '::ffff:127.0.0.1' connected {}$
2022-04-15T04:41:26.732Z INFO :PlaygroundAPI :createServer() Client with ID 'vofzZszkwPQH6Jd8AAAB' on host '::ffff:127.0.0.1' connected {}$
2022-04-15T04:41:27.532Z INFO :ConnectionProfileManager :getConnectionManagerByTyp Looking up a connection manager for type {"0":"hlfv1"}$
2022-04-15T04:41:32.007Z INFO :ConnectionProfileManager :getConnectionManagerByTyp Using this connection manager {"0":{"connectionProfileManager":{}}}$
2022-04-15T04:41:33.339Z INFO :HLFConnection :constructor() Creating a connection using profile hlfv1 to network data-sharing-network {}$
2022-04-15T04:41:33.339Z INFO :HLFConnection :createQueryHandler() attemping to load query handler module ./hlfqueryhandler {}$
2022-04-15T04:41:33.558Z WARN :HLFConnection :_connectToEventHubs() event hub localhost:7051 failed to connect: 14 UNAVAILABLE: EOF {}$
2022-04-15T04:41:33.559Z WARN :HLFConnection :_registerForChaincodeEven could not find any connected event hubs out of 1 defined hubs to listen on for chaincode events {}$
2022-04-15T04:41:33.572Z ERROR :HLFConnectionManager :fabric-client() [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF
at new createStatusError (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/grpc/src/client.js:64:15)
at /home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/grpc/src/client.js:583:15 {}$
2022-04-15T04:41:33.572Z WARN :HLFQueryHandler :queryChaincode() Peer peer0.org1.example.com failed to respond. Error: 14 UNAVAILABLE: EOF {}$
2022-04-15T04:41:33.573Z ERROR :HLFQueryHandler :queryChaincode() {"message":"No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at HLFQueryHandler.queryChaincode (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfqueryhandler.js:108:30)\n at <anonymous>"}$
2022-04-15T04:41:33.573Z ERROR :HLFConnection :ping() {"message":"Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at _checkRuntimeVersions.then.catch (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:886:34)\n at <anonymous>"}$
2022-04-15T04:41:33.573Z ERROR :ConnectorServer :connectionPing() {"message":"Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at _checkRuntimeVersions.then.catch (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:886:34)\n at <anonymous>"}$
2022-04-15T04:41:37.003Z INFO :PlaygroundAPI :createServer() Client with ID 'vofzZszkwPQH6Jd8AAAB' on host '::ffff:127.0.0.1' disconnected (transport close) {}$
2022-04-15T04:41:37.005Z INFO :PlaygroundAPI :createServer() Client with ID 'FqtZNzJSysII2clEAAAA' on host '::ffff:127.0.0.1' disconnected (transport close) {}$
2022-04-15T04:41:39.401Z INFO :PlaygroundAPI :createServer() Client with ID 'Ea0hQJ5T-gHpYROtAAAC' on host '::ffff:127.0.0.1' connected {}$
2022-04-15T04:41:40.662Z INFO :PlaygroundAPI :createServer() Client with ID '_ZosKcJsSCt6ZZxXAAAD' on host '::ffff:127.0.0.1' connected {}$
2022-04-15T04:41:41.918Z INFO :ConnectionProfileManager :getConnectionManagerByTyp Looking up a connection manager for type {"0":"hlfv1"}$
2022-04-15T04:41:41.921Z INFO :HLFConnection :constructor() Creating a connection using profile hlfv1 to network data-sharing-network {}$
2022-04-15T04:41:41.921Z INFO :HLFConnection :createQueryHandler() attemping to load query handler module ./hlfqueryhandler {}$
2022-04-15T04:41:41.933Z WARN :HLFConnection :_connectToEventHubs() event hub localhost:7051 failed to connect: 14 UNAVAILABLE: EOF {}$
2022-04-15T04:41:41.934Z WARN :HLFConnection :_registerForChaincodeEven could not find any connected event hubs out of 1 defined hubs to listen on for chaincode events {}$
2022-04-15T04:41:41.944Z ERROR :HLFConnectionManager :fabric-client() [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF
at new createStatusError (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/grpc/src/client.js:64:15)
at /home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/grpc/src/client.js:583:15 {}$
2022-04-15T04:41:41.946Z WARN :HLFQueryHandler :queryChaincode() Peer peer0.org1.example.com failed to respond. Error: 14 UNAVAILABLE: EOF {}$
2022-04-15T04:41:41.946Z ERROR :HLFQueryHandler :queryChaincode() {"message":"No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at HLFQueryHandler.queryChaincode (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfqueryhandler.js:108:30)\n at <anonymous>"}$
2022-04-15T04:41:41.946Z ERROR :HLFConnection :ping() {"message":"Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at _checkRuntimeVersions.then.catch (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:886:34)\n at <anonymous>"}$
2022-04-15T04:41:41.947Z ERROR :ConnectorServer :connectionPing() {"message":"Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: Error trying to ping. Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at _checkRuntimeVersions.then.catch (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:886:34)\n at <anonymous>"}$
2022-04-15T04:41:43.293Z INFO :PlaygroundAPI :createServer() Client with ID 'Ea0hQJ5T-gHpYROtAAAC' on host '::ffff:127.0.0.1' disconnected (transport close) {}$
2022-04-15T04:41:43.293Z INFO :PlaygroundAPI :createServer() Client with ID '_ZosKcJsSCt6ZZxXAAAD' on host '::ffff:127.0.0.1' disconnected (transport close) {}$
2022-04-15T04:41:45.536Z INFO :PlaygroundAPI :createServer() Client with ID 'FFfUczgeuWyPcPzuAAAE' on host '::ffff:127.0.0.1' connected {}$
2022-04-15T04:41:46.783Z INFO :PlaygroundAPI :createServer() Client with ID 'u69lIVvh2eeBmc-xAAAF' on host '::ffff:127.0.0.1' connected {}$
2022-04-15T04:41:46.825Z INFO :ConnectionProfileManager :getConnectionManagerByTyp Looking up a connection manager for type {"0":"hlfv1"}$
2022-04-15T04:41:46.834Z INFO :HLFConnection :constructor() Creating a connection using profile hlfv1 to network data-sharing-network {}$
2022-04-15T04:41:46.836Z INFO :HLFConnection :createQueryHandler() attemping to load query handler module ./hlfqueryhandler {}$
2022-04-15T04:41:46.917Z WARN :HLFConnection :_connectToEventHubs() event hub localhost:7051 failed to connect: 14 UNAVAILABLE: EOF {}$
2022-04-15T04:41:46.917Z WARN :HLFConnection :_registerForChaincodeEven could not find any connected event hubs out of 1 defined hubs to listen on for chaincode events {}$
2022-04-15T04:41:46.945Z ERROR :HLFConnectionManager :fabric-client() [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 UNAVAILABLE: EOF
at new createStatusError (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/grpc/src/client.js:64:15)
at /home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/grpc/src/client.js:583:15 {}$
2022-04-15T04:41:46.945Z WARN :HLFQueryHandler :queryChaincode() Peer peer0.org1.example.com failed to respond. Error: 14 UNAVAILABLE: EOF {}$
2022-04-15T04:41:46.946Z ERROR :HLFQueryHandler :queryChaincode() {"message":"No peers available to query. last error was Error: 14 UNAVAILABLE: EOF","stack":"Error: No peers available to query. last error was Error: 14 UNAVAILABLE: EOF\n at HLFQueryHandler.queryChaincode (/home/test/.nvm/versions/node/v8.9.0/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfqueryhandler.js:108:30)\n at <anonymous>"}$
111
When I try to deploy a seemingly simple CDK stack, it fails with a strange error. I don't get this same behavior when I create a different iam.ManagedPolicy in a different file, and that one has a much more complicated policy with several actions, etc. What am I doing wrong?
import aws_cdk.core as core
from aws_cdk import aws_iam as iam
from constructs import Construct
from master_payer import ( env, myenv )
class FromStack(core.Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
#myenv['pma'] = an account ID (12 digits)
#env = 'dev'
rolename = f"arn:aws:iam:{myenv['pma']}:role/CrossAccount{env.capitalize()}MpaAdminRole"
mpname = f"{env.capitalize()}MpaAdminPolicy"
pol = iam.ManagedPolicy(self, mpname, managed_policy_name = mpname,
document = iam.PolicyDocument(statements= [
iam.PolicyStatement(actions=["sts:AssumeRole"], effect=iam.Effect.ALLOW, resources=[rolename])
]))
grp = iam.Group(self, f"{env.capitalize()}MpaAdminGroup", managed_policies=[pol])
The cdk deploy output:
FromStack: deploying...
FromStack: creating CloudFormation changeset...
2:19:52 AM | CREATE_FAILED | AWS::IAM::ManagedPolicy | DevMpaAdminPolicyREDACTED
The policy failed legacy parsing (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: REDACTED-GUID; Proxy: null)
new ManagedPolicy (/tmp/jsii-kernel-EfRyKw/node_modules/#aws-cdk/aws-iam/lib/managed-policy.js:39:26)
\_ /tmp/tmpxl5zxf8k/lib/program.js:8432:58
\_ Kernel._wrapSandboxCode (/tmp/tmpxl5zxf8k/lib/program.js:8860:24)
\_ Kernel._create (/tmp/tmpxl5zxf8k/lib/program.js:8432:34)
\_ Kernel.create (/tmp/tmpxl5zxf8k/lib/program.js:8173:29)
\_ KernelHost.processRequest (/tmp/tmpxl5zxf8k/lib/program.js:9757:36)
\_ KernelHost.run (/tmp/tmpxl5zxf8k/lib/program.js:9720:22)
\_ Immediate._onImmediate (/tmp/tmpxl5zxf8k/lib/program.js:9721:46)
\_ processImmediate (node:internal/timers:464:21)
❌ FromStack failed: Error: The stack named FromStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE
at Object.waitForStackDeploy (/usr/local/lib/node_modules/aws-cdk/lib/api/util/cloudformation.ts:307:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at prepareAndExecuteChangeSet (/usr/local/lib/node_modules/aws-cdk/lib/api/deploy-stack.ts:351:26)
at CdkToolkit.deploy (/usr/local/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:194:24)
at initCommandLine (/usr/local/lib/node_modules/aws-cdk/bin/cdk.ts:267:9)
The stack named FromStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE
And the cdk synth output, which cfn-lint is happy with (no warnings, errors, or informational violations):
{
"Resources": {
"DevMpaAdminPolicyREDACTED": {
"Type": "AWS::IAM::ManagedPolicy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Resource": "arn:aws:iam:REDACTED-ACCOUNT-ID:role/CrossAccountDevMpaAdminRole"
}
],
"Version": "2012-10-17"
},
"Description": "",
"ManagedPolicyName": "DevMpaAdminPolicy",
"Path": "/"
},
"Metadata": {
"aws:cdk:path": "FromStack/DevMpaAdminPolicy/Resource"
}
},
"DevMpaAdminGroupREDACTED": {
"Type": "AWS::IAM::Group",
"Properties": {
"ManagedPolicyArns": [
{
"Ref": "DevMpaAdminPolicyREDACTED"
}
]
},
"Metadata": {
"aws:cdk:path": "FromStack/DevMpaAdminGroup/Resource"
}
},
"CDKMetadata": {
"Type": "AWS::CDK::Metadata",
"Properties": {
"Analytics": "v2:deflate64:REDACTED-B64"
},
"Metadata": {
"aws:cdk:path": "FromStack/CDKMetadata/Default"
}
}
}
}
Environment Specs
$ cdk --version
2.2.0 (build 4f5c27c)
$ cat /etc/redhat-release
Red Hat Enterprise Linux releease 8.5 (Ootpa)
$ python --version
Python 3.6.8
$ node --version
v16.8.0
The role ARN rolename was incorrect; I was missing a colon after iam. So it's iam:: not iam:. I think I copied the single colon from a (wrong) example somewhere on the Internet. Gah...
While running the testcases through jenkins on ec2 instance,I am getting error message.
Here's my nightwatch configuration:
{
"src_folders" : ["test"],
"globals_path": "globals.js",
"output_folder" : "reports",
"custom_commands_path" : "./commands",
"custom_assertions_path" : "./assertions",
"page_objects_path":"./pages",
"test_workers" : {
"enabled" : false,
"workers" : "auto"
},
"selenium" : {
"start_process" : true,
"server_path" : "./bin/selenium-server-standalone-4.0.0.jar",
"log_path" : "",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "./bin/chromedriver_linux"
}
},
"test_settings" : {
"default" : {
"request_timeout_options": {
"timeout": 100000
},
"videos": {
"enabled": false,
"delete_on_pass": false,
"path": "reports/videos",
"format": "mp4",
"resolution": "1280x720",
"fps": 15,
"display": ":",
"pixel_format": "yuv420p",
"inputFormat": "mjpeg"
},
"launch_url" : "http://localhost",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"screenshots" : {
"enabled" : false,
"on_failure" : true,
"on_error" : true,
"path" : "./screenshots"
},
"end_session_on_fail" : true,
"skip_testcases_on_fail" : false,
"use_xpath" : true,
"globals" : {
"url" : "http://ec30-3-100-2-16.us-north-10.compute.amazonws.com:1000/login"
},
"desiredCapabilities": {
"browserName": "chrome",
"chromeOptions": {
"w3c": false,
"args" : ["headless","no-sandbox"]
},
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
getting below error message in the console :
Login Test Test Suite
==========================
- Connecting to localhost on port 4444...
Connected to localhost on port 4444 (31794ms).
Using: chrome (81.0.4044.129) on Linux platform.
Running: Verify user is able to login
POST /wd/hub/session/2a3ca3b508f6dda4d0933225c41824a4/url - ECONNRESET
Error: socket hang up
at connResetException (internal/errors.js:604:14)
at Socket.socketCloseListener (_http_client.js:400:25)
Error while running .navigateTo() protocol action: An unknown error has occurred.
POST /wd/hub/session/2a3ca3b508f6dda4d0933225c41824a4/elements - ECONNRESET
Error: socket hang up
at connResetException (internal/errors.js:604:14)
at Socket.socketCloseListener (_http_client.js:400:25)
Error while running .locateMultipleElements() protocol action: An unknown error has occurred.
I have installed the chrome browser(81.0.4044.129) in ec2 instance and their respective chrome linux driver
selenium server : selenium-server-standalone-4.0.0.jar
Note:
I configured the Jenkins in my local machine(MAC OS) and its working fine.
Please let me know if you need more information.
I believe you security group attached to the EC2 server doesn't have ICMP IPV4 inbound rules accessible to your server running this nightwatch script. Try adding your nightwatch server IP address in the ICMP IPV4 inbound rules of the ec2 server you provided in the URL or you can even make it publicly accessible. I hope this resolves your issue.
I am getting this error while i am trying to attach my real Android device as a Selenium node to hub?
Couldn't register this node: The hub is down or not responding: Connect to x.x.x.x:4445 [/x.x.x.x] failed: Network is unreachable
Any suggestions would be appreciated.
config.json file :
{ "capabilities":
[ {
"browserName": "Android",
"version":"4.4.2",
"maxInstances": 3,
"platform":"ANDROID",
"deviceName":"emulator-5554" } ],
"configuration":
{ "nodeTimeout":120,
"port":4728,
"hubPort":4444,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url":"127.0.0.1:4728/wd/hub",
"hub": "127.0.0.1:4444/grid/register",
"hubHost":"127.0.0.1",
"nodePolling":2000,
"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":30000, "maxSession":1 }
}
Giving config.json file which is working fine for me on selenium grid for android device as well as emulators. Give it a try.
{
"capabilities":
[
{
"browserName": "",
"version":"",
"maxInstances": 1,
"platform":"ANDROID"
}
],
"configuration":
{
"cleanUpCycle":2000,
"timeout":30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url":"http://127.0.0.1:4720/wd/hub",
"host":"192.168.1.163",
"port": 4723,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "192.168.1.163"
}
}
I am getting below error message.
error: `
uncaughtException: Cannot read property 'url' of undefined date=Fri
Oct 30 2015 10:31:30 GMT+0530 (IST), pid=2850, uid=1020000013,
gid=1020000013,
cwd=/home/sandeepreddy/.npm-packages/lib/node_modules/appium,
execPath=/usr/bin/nodejs, version=v0.10.37, argv=[node,
/usr/bin/appium, --nodeconfi**
`
I'm using mesos and marathon to deploy a container of Kibana 4. The JSON to deploy is:
{
"id": "/org/products/kibana/webapp",
"instances": 1,
"cpus": 1,
"mem": 768,
"uris": [],
"constraints": [
["hostname", "UNIQUE"]
],
"upgradeStrategy": {
"minimumHealthCapacity": 0.5
},
"healthChecks": [
{
"protocol": "HTTP",
"path": "/",
"portIndex": 0,
"initialDelaySeconds": 600,
"gracePeriodSeconds": 10,
"intervalSeconds": 30,
"timeoutSeconds": 120,
"maxConsecutiveFailures": 10
}
],
"env": {
"ES_HOST":"172.23.10.23",
"ES_PORT":"9200"
},
"container": {
"type": "DOCKER",
"docker": {
"image": "myregistry.local.com:5000/org/kibana:4.0.0",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 5601,
"hostPort": 0,
"servicePort": 50061,
"protocol": "tcp"
}
]
},
"volumes": [
{
"containerPath": "/etc/localtime",
"hostPath": "/etc/localtime",
"mode": "RO"
}
]
}
}
But when I post it, the kibana app never wake up and the stderr log is:
I0227 12:22:44.666357 1149 exec.cpp:132] Version: 0.21.1
I0227 12:22:44.669059 1178 exec.cpp:206] Executor registered on slave 20150225-040104-1124079532-5050-952-S0
/kibana/src/index.js:58
throw error;
^
Error: listen EADDRNOTAVAIL
at errnoException (net.js:905:11)
at Server._listen2 (net.js:1024:19)
at listen (net.js:1065:10)
at net.js:1147:9
at asyncCallback (dns.js:68:16)
at Object.onanswer [as oncomplete] (dns.js:121:9)
After that I try to eliminate a port mapping, because I found some references indicating that it's an port or network configuration problem. Then my Kibana 4 web app wake up fine, but I need configure a port-mapping to access via HTTP. I have not idea at about why marathon has problem with network and portMappings config. Some help will be appreciated.
This is a nasty problem, and I encountered it as well (running Kibana 4 on Mesos + Marathon).
The short answer:
If you use current master of the Kibana repository, this won't happen - the relevant code has changed in the 4.1.0 snapshot which is master at the time of writing.
The long answer:
4.0.0 has this chunk of code in src/server/index.js:
var port = parseInt(process.env.PORT, 10) || config.port || 3000;
var host = process.env.HOST || config.host || '127.0.0.1';
Marathon supplies HOST and POST environment variables by default, and the HOST variable is set to the Mesos slave's hostname. The above code makes Kibana try to bind to the IP address of the Mesos slave (which Marathon has placed in HOST), which will fail, as it's running inside a Docker container.
If you want to run 4.0.0, you can just patch these lines to:
var port = config.port || 3000;
var host = config.host || '127.0.0.1';
The code looks like this in master at the moment.