我正在将.BNA文件部署到结构上,正在成功地在bluemix操场上对其进行测试和制作原型,但是,当我尝试将网络应用程序安装到结构上时,我得到了错误。
> Error: Error trying install business network.
>Error: No valid responses from any peers.
>Response from attempted peer comms was an error:
>Error: 14 UNAVAILABLE: Connect Failed
Command failed
**This is the steps I took**
1. Launch your Fabric network
> ./startFabric.sh
2.) Create the peer admin card
> ./createPeerAdminCard.sh
3.) Install the network application to fabric
> composer network install -a dist/bna.bna -c PeerAdmin@hlfv1
**This step is where I get the error**
✖ Installing business network. This may take a minute...
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed
Command failed
**Details of my env**
Node Version: v8.11.3
Docker version: 18.03
Composer version: v0.19.12
Docker PS:
[Docker PS Screen shot][1]
[1]: https://i.stack.imgur.com/HQGBf.png
Any help is really appreciated.
更新 用于hlfv1的Connection.json
{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"composerchannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://localhost:7050"
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpc://localhost:7051",
"eventUrl": "grpc://localhost:7053"
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "http://localhost:7054",
"caName": "ca.org1.example.com"
}
}
}
Hlfv11与HLFv1 我注意到,当我查看结构片段时,有两个组件hlfv11和hlfv1。
当我启动startfabric时,我得到的行是fabric假定它是“ hlfv11”而不是hlfv1 。 enter image description here
任何帮助将不胜感激。
docker inspect peer0.org1.example.com
[
{
"Id": "6caa83b2a8a5ee976c9066d0bbd98475e5bff885736ec9931606c33f06ccd9ac",
"Created": "2018-07-20T22:49:51.238208735Z",
"Path": "peer",
"Args": [
"node",
"start"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 7506,
"ExitCode": 0,
"Error": "",
"StartedAt": "2018-07-20T22:49:51.543106588Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:b023f9be07714e495e6d41849d7e916434e85580754423ece145866468ad29a9",
"ResolvConfPath": "/mnt/sda1/var/lib/docker/containers/6caa83b2a8a5ee976c9066d0bbd98475e5bff885736ec9931606c33f06ccd9ac/resolv.conf",
"HostnamePath": "/mnt/sda1/var/lib/docker/containers/6caa83b2a8a5ee976c9066d0bbd98475e5bff885736ec9931606c33f06ccd9ac/hostname",
"HostsPath": "/mnt/sda1/var/lib/docker/containers/6caa83b2a8a5ee976c9066d0bbd98475e5bff885736ec9931606c33f06ccd9ac/hosts",
"LogPath": "/mnt/sda1/var/lib/docker/containers/6caa83b2a8a5ee976c9066d0bbd98475e5bff885736ec9931606c33f06ccd9ac/6caa83b2a8a5ee976c9066d0bbd98475e5bff885736ec9931606c33f06ccd9ac-json.log",
"Name": "/peer0.org1.example.com",
"RestartCount": 0,
"Driver": "aufs",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/var/run:/host/var/run:rw",
"/Users/wppa/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users:rw",
"/Users/wppa/fabric-dev-servers/fabric-scripts/hlfv11/composer:/etc/hyperledger/configtx:rw",
"/Users/wppa/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/peer/msp:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "composer_default",
"PortBindings": {
"7051/tcp": [
{
"HostIp": "",
"HostPort": "7051"
}
],
"7053/tcp": [
{
"HostIp": "",
"HostPort": "7053"
}
]
},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"Mounts": [
{
"Type": "bind",
"Source": "/var/run",
"Destination": "/host/var/run",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/wppa/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users",
"Destination": "/etc/hyperledger/msp/users",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/wppa/fabric-dev-servers/fabric-scripts/hlfv11/composer",
"Destination": "/etc/hyperledger/configtx",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/wppa/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp",
"Destination": "/etc/hyperledger/peer/msp",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "6caa83b2a8a5",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"7051/tcp": {},
"7053/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"CORE_LOGGING_LEVEL=debug",
"CORE_CHAINCODE_LOGGING_LEVEL=DEBUG",
"CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock",
"CORE_PEER_ID=peer0.org1.example.com",
"CORE_PEER_ADDRESS=peer0.org1.example.com:7051",
"CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=composer_default",
"CORE_PEER_LOCALMSPID=Org1MSP",
"CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/peer/msp",
"CORE_LEDGER_STATE_STATEDATABASE=CouchDB",
"CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"FABRIC_CFG_PATH=/etc/hyperledger/fabric"
],
"Cmd": [
"peer",
"node",
"start"
],
"Image": "hyperledger/fabric-peer:x86_64-1.1.0",
"Volumes": {
"/etc/hyperledger/configtx": {},
"/etc/hyperledger/msp/users": {},
"/etc/hyperledger/peer/msp": {},
"/host/var/run": {}
},
"WorkingDir": "/opt/gopath/src/github.com/hyperledger/fabric",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "d44983248579bb25822020f82382fba01b891c3338b2fe91bb17ac3936126c69",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "composer",
"com.docker.compose.service": "peer0.org1.example.com",
"com.docker.compose.version": "1.21.1",
"org.hyperledger.fabric.base.version": "0.4.6",
"org.hyperledger.fabric.version": "1.1.0"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "5645c1988100b53fa9a8c2d13adc40c43f3995cb808b3eda28771176033b26b4",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"7051/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "7051"
}
],
"7053/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "7053"
}
]
},
"SandboxKey": "/var/run/docker/netns/5645c1988100",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"composer_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"peer0.org1.example.com",
"6caa83b2a8a5"
],
"NetworkID": "d4f496b7b3aeae87d1b1461523bc8620ac34b54d9b3b9f8d31c6cfa7be4da024",
"EndpointID": "a19687702d04e166dc0291dc9ce1130caf5eccf484ece4fd988c13cc2660c8fb",
"Gateway": "172.19.0.1",
"IPAddress": "172.19.0.5",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:13:00:05",
"DriverOpts": null
}
}
}
}
]
已修复:需要重新安装Hyperledger结构,作曲家,节点,npm和docker。并且需要设置“ unset $ {!DOCKER *}”,这似乎是一个码头工人问题。
答案 0 :(得分:0)
当CLI无法使用PeerAdmin的connection.json文件中指定的地址连接到Fabric时,通常会出现此错误。在此之前,您是否下载了here所示的最新结构工具?
有时(在公司网络中)涉及到代理,则可能会出现某些路由故障。
在此处查看可能对您有帮助的答案-> Hyperledger composer network install
答案 1 :(得分:0)
错误14表示您无法找到对等方。您的问题在这里:
var qsRegex;
var buttonFilter;
// init Isotope
var $grid = $('.directory').isotope({
itemSelector: '.listing, .listing_title, .listing_notice', // IMPORTANT CLASSES HERE -- '.listing = container for website link', '.listing_title = container for website link title', '.listing_notice = Notice to inform there is no website under this category'
layoutMode: 'fitRows',
filter: function() {
var $this = $(this);
var searchResult = qsRegex ? $this.text().match( qsRegex ) : true;
var buttonResult = buttonFilter ? $this.is( buttonFilter ) : true;
return searchResult && buttonResult;
}
});
$('.directory_menu ul').on( 'click', 'li', function() {
buttonFilter = $( this ).attr('data-filter');
$grid.isotope();
});
// use value of search field to filter
var $quicksearch = $('.quicksearch').keyup( debounce( function() {
qsRegex = new RegExp( $quicksearch.val(), 'gi' );
$grid.isotope();
}));
// change active class on buttons
$('.directory_menu ul').each( function( i, buttonGroup ) {
var $buttonGroup = $( buttonGroup );
$buttonGroup.on( 'click', 'li', function() {
$buttonGroup.find('.active').removeClass('active');
$( this ).addClass('active');
});
});
// debounce so filtering doesn't happen every millisecond
function debounce( fn, threshold ) {
var timeout;
threshold = threshold || 100;
return function debounced() {
clearTimeout( timeout );
var args = arguments;
var _this = this;
function delayed() {
fn.apply( _this, args );
}
timeout = setTimeout( delayed, threshold );
};
}
// RESETTING
$('.directory_search_reset').on('click', function() {
//hide reset button
$('.directory_search_reset').hide();
//clear search field
$('.directory_search input[type="search"]').val('');
var qsRegex;
var buttonFilter;
// init Isotope
var $grid = $('.directory').isotope({
itemSelector: '.listing, .listing_title, .listing_notice', // IMPORTANT CLASSES HERE -- '.listing = container for website link', '.listing_title = container for website link title', '.listing_notice = Notice to inform there is no website under this category'
layoutMode: 'fitRows',
filter: function() {
var $this = $(this);
var searchResult = qsRegex ? $this.text().match( qsRegex ) : true;
var buttonResult = buttonFilter ? $this.is( buttonFilter ) : true;
return searchResult && buttonResult;
}
});
$('.directory_menu ul').on( 'click', 'li', function() {
buttonFilter = $( this ).attr('data-filter');
$grid.isotope();
});
// use value of search field to filter
var $quicksearch = $('.quicksearch').keyup( debounce( function() {
qsRegex = new RegExp( $quicksearch.val(), 'gi' );
$grid.isotope();
}));
// debounce so filtering doesn't happen every millisecond
function debounce( fn, threshold ) {
var timeout;
threshold = threshold || 100;
return function debounced() {
clearTimeout( timeout );
var args = arguments;
var _this = this;
function delayed() {
fn.apply( _this, args );
}
timeout = setTimeout( delayed, threshold );
};
}
$('li').removeClass('active'); //ADDED
$('li:first-of-type').addClass('active'); //ADDED
});
//show reset icon once input field has been typed in
$('.directory_search input[type="search"]').keyup(function() {
$('.directory_search_reset').show();
});
您需要编写如下内容:
"peers": {
"peer0.org1.example.com": {}
}
已修复: 我先卸载了docker,node,npm,然后重新安装了一切,并确保在首次为Mac OS安装docker时使用未设置的$ {!DOCKER *}。