简体   繁体   English

尝试作曲家网络启动时出现对等错误

[英]Peer error when trying composer network start

I'm trying to start running my chaincode on a peer but when I do I get the following error in my peer logs: 我正在尝试在对等方上运行链码,但是当我这样做时,我的对等方日志中出现以下错误:

simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid SimulationProposal()导致链码名称:“ lscc”的txid响应状态为500

commands used: 使用的命令:

mv ~/Downloads/creds_*_org2.json ./connection-profiles/${CHANNEL_NAME}/connection-profile-lessor.json
composer card create -f ca_Org2.card -p ./connection-profiles/${CHANNEL_NAME}/connection-profile-lessor.json -u admin -s ${LESSOR_SECRET}
composer card import -f ca_Org2.card -c ca_Org2
composer identity request --card ca_Org2 --path ./credentials/${CHANNEL_NAME}/lessor -u admin -s ${LESSOR_SECRET}

#Then sync reqeusted cert onto starter plan

composer card create -f adminCard_Org2-${CHANNEL_NAME}.card -p ./connection-profiles/${CHANNEL_NAME}/connection-profile-lessor.json -u admin -c ./credentials/${CHANNEL_NAME}/lessor/admin-pub.pem -k ./credentials/${CHANNEL_NAME}/lessor/admin-priv.pem --role PeerAdmin --role ChannelAdmin
composer card import -f adminCard_Org2-${CHANNEL_NAME}.card -c adminCardLessor-${CHANNEL_NAME}
composer network install -c adminCardLessor-${CHANNEL_NAME} -a ./contracts/blockaviation/dist/block-aviation-network.bna
composer network start -c adminCardLessor-defaultchannel -n block-aviation-network -V 0.0.1 -A admin -C ./credentials/defaultchannel/lessor/admin-pub.pem -f delete_me.card

This gives the folowing error in my terminal: 这给我的终端以下错误:

    composer network start -c adminCardLessor-defaultchannel -n block-aviation-network -V 0.0.1 -A admin -C ./credentials/defaultchannel/lessor/admin-pub.pem -f delete_me.card
Starting business network block-aviation-network at version 0.0.1

Processing these Network Admins: 
    userName: admin

✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: chaincode exists block-aviation-network)
Command failed

Does anyone know what i'm doing wrong? 有人知道我在做什么错吗?

The above commands work for the first organisation in my network but fails with the above error for all other organisations. 上面的命令对我的网络中的第一个组织有效,但对所有其他组织均失败,并出现上述错误。

If I do a ping with my card created for org1 I get the following result: 如果我对为org1创建的卡执行ping操作,则会得到以下结果:

    composer network ping -c admin@block-aviation-network
The connection to the network was successfully tested: block-aviation-network
    Business network version: 0.0.1
    Composer runtime version: 0.19.5
    participant: org.hyperledger.composer.system.NetworkAdmin#admin
    identity: org.hyperledger.composer.system.Identity#818307ea1e01cc0c691d856cc747e9a721e8424b420b73c0b2e4ce1ce406fbf3

Package.json: 的package.json:

{
  "engines": {
    "composer": "^0.19.9"
  },
  "name": "block-aviation-network",
  "version": "0.0.1",
  "description": "Smart aircraft leasing Business Network",
  "scripts": {
    "pretest": "",
    "lint": "eslint .",
    "postlicchk": "npm run doc",
    "doc": "jsdoc --pedantic --recurse -c jsdoc.json",
    "test": "mocha -t 0 --recursive",
    "deployNetwork": "./deployNetwork.sh"
  },
  "author": "Simon Mullaney",
  "email": "simonpmullaney@gmail.com",
  "license": "Apache-2.0",
  "devDependencies": {
    "@types/googlemaps": "^3.30.7",
    "browserfs": "^1.2.0",
    "chai": "latest",
    "composer-admin": "^0.18.1",
    "composer-client": "^0.18.1",
    "composer-common": "^0.18.1",
    "composer-connector-embedded": "^0.18.1",
    "composer-playground-api": "^0.18.1",
    "composer-runtime": "^0.19.9",
    "composer-runtime-web": "^0.18.1",
    "eslint": "latest",
    "istanbul": "latest",
    "jsdoc": "latest",
    "mkdirp": "latest",
    "mocha": "latest",
    "moment": "latest",
    "passport-github": "^1.1.0",
    "sinon": "latest"
  },
  "license-check-config": {
    "src": [
      "**/*.js",
      "!./coverage/**/*",
      "!./node_modules/**/*",
      "!./out/**/*",
      "!./scripts/**/*"
    ],
    "path": "header.txt",
    "blocking": true,
    "logInfo": false,
    "logError": true
  },
  "dependencies": {
    "angular2-google-maps": "^0.17.0",
    "es6-promise": "latest",
    "fabric-client": "^1.0.4",
    "grpc": "1.10.1",
    "opentracing": "^0.14.1",
    "passport-github": "^1.1.0",
    "isomorphic-fetch": "latest"
  }
}

I dont understand why it works for my first organisation but not for my other organisations? 我不明白为什么它适用于我的第一个组织而不适用于我的其他组织?

EDIT: 编辑:

I updated the chaincode on the network to version 0.0.2 - Now the package.json and the network have the same version of composer - 0.19.9 我将网络上的链码更新为版本0.0.2-现在package.json和网络具有相同版本的composer-0.19.9

 composer network ping -c admin@block-aviation-network
The connection to the network was successfully tested: block-aviation-network
    Business network version: 0.0.2
    Composer runtime version: 0.19.9
    participant: org.hyperledger.composer.system.NetworkAdmin#admin
    identity: org.hyperledger.composer.system.Identity#818307ea1e01cc0c691d856cc747e9a721e8424b420b73c0b2e4ce1ce406fbf3

The chaincode will still only run in the first organisation though - with all other orgs getting the same error as above. 不过,chaincode仍将仅在第一个组织中运行-所有其他组织都遇到与上述相同的错误。

If I follow on with commands to create a business network card to use on the business network for org2 I get the following: 如果我遵循命令来创建要在org2的商业网络上使用的商业网络卡,则会得到以下信息:

composer card create -n block-aviation-network -p ./connection-profiles/${CHANNEL_NAME}/connection-profile-lessor.json -u lessor -c ./credentials/${CHANNEL_NAME}/lessor/admin-pub.pem -k ./credentials/${CHANNEL_NAME}/lessor/admin-priv.pem
composer card import -f ./lessor@block-aviation-network.card
composer network ping -c lessor@block-aviation-network

Error: Error trying to ping. 错误:尝试ping错误。 Error: 2 UNKNOWN: error executing chaincode: could not get ChaincodeDeploymentSpec for block-aviation-network:0.0.2: get ChaincodeDeploymentSpec for block-aviation-network/defaultchannel from LSCC error: chaincode fingerprint mismatch data mismatch Command failed 错误:2 UNKNOWN:执行链代码时出错:无法从LSCC获得针对块航空网络的ChaincodeDeploymentSpec:0.0.2:从LSCC获得针对块航空网络/默认通道的ChaincodeDeploymentSpec错误:链码指纹不匹配数据不匹配命令失败

I have not tried this in IBM Starter Plan, but based on the Composer Multi Org tutorial you Install the network once per Organisation, but you only Start the network once per Network, and you supply Admin Certificates from both Organisations on the composer network start command. 我没有在IBM Starter Plan中尝试过此操作,但是根据Composer Multi Org教程,您每个组织安装一次网络,但是每个网络仅启动一次网络,并且在composer network start命令上从两个组织提供管理证书。 。

So I think what you are seeing is that the Network is already running for Org 2, but the Admin for Org 2 does not have access as it was not specified on the start command line. 因此,我认为您看到的是组织2的网络已经在运行,但是组织2的管理员没有访问权限,因为它没有在启动命令行中指定。

you need to do " composer network install " on all the peers of the network . 您需要在网络的所有对等节点上执行“ composer network install ”。 And then a single " composer network start " command . 然后是一个“ composer network start ”命令。

If that doesn't upgrade the network - try using " composer network upgrade " command . 如果那不能升级网络,请尝试使用“ composer network upgrade ”命令。 Should work. 应该管用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 作曲者网络开始:没有来自任何对等方的有效响应。 来自尝试的对等通讯的响应是错误:错误:REQUEST_TIMEOUT - composer network start: No valid responses from any peers. Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT 运行Hyperledger Composer命令时出错:composer network start - Having error while running Hyperledger Composer command: composer network start Hyperledger Composer:安装错误(错误:尝试启动业务网络时出错。错误:任何对等方均未提供有效响应。) - Hyperledger Composer: install error (Error: Error trying to start business network. Error: No valid responses from any peers.) 添加新对等体 | 作曲家网络启动时“已存在名称为‘cc’的链码” - adding new peer | 'chaincode with name 'cc' already exists' on composer network start Composer网络启动超时 - Composer network start timeout 尝试将新对等方加入现有网络时出现错误 - While trying to join a new peer to an existing network getting error 在Hyperledger Fabric Composer中启动业务网络应用程序时出错-多主机对等环境 - Error starting Business network application in Hyperledger fabric composer— Multi host peer environment Hyperledger Composer v0.20.0网络启动错误 - Hyperledger Composer v0.20.0 network start error 提供.npmrc文件后,Composer网络启动[ssl证书错误] - Composer network start [ssl certificate error] after providing .npmrc file Hyperledger Composer v0.16.0网络启动错误 - Hyperledger Composer v0.16.0 network start error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM