hyperledger explorer not starting with Fabcar app - hyperledger-fabric

Hyperledger Explorer is not starting with Fabcar sample application. I have configured config.json and change connection profile to fabcar. I am using default connection setting available in connection-profile/fabcar.jason.But while starting blockchain explorer it giving me below error.
2019-11-30T09:44:53.671Z - error: [Channel.js]: Error: 2 UNKNOWN: Stream removed
Error : Failed to connect client peer, please check the configuration and peer status

Did you start a network before? If so, try to remove the crypto-config and channel-artifacts folders and rerun. When you start a network should not be crypto material from other before

Related

hyperledger fabric No such file or directory when invoke chaincode by sdk-node

This is a tracing network with one channel composed of 3 Orgs, 1 anchor peer per organization, 1 MSP per org, and 1 CA for org3. And I'm not using TLS (because I couldn't find a dependable sample with TLS ON)
I'm trying to use Fabric-sdk-node to build a web front end for it, and I'm using fabcar sample. and when I use invoke.js (almost the same as the example), I find this.
root#oyu-virtual-machine:~/hyperledger-fabric/test/webapp# node get2.js
Wallet path: /root/hyperledger-fabric/test/webapp/wallet
2021-05-05T10:34:16.275Z - warn: [Query]: evaluate: Query ID "[object Object]" of peer "peer0.sell.trace.com" failed: message=cannot retrieve package for chaincode sellcc/1.0, error open /var/hyperledger/production/chaincodes/sellcc.1.0: no such file or directory, stack=Error: cannot retrieve package for chaincode sellcc/1.0, error open /var/hyperledger/production/chaincodes/sellcc.1.0: no such file or directory
at /root/hyperledger-fabric/test/webapp/node_modules/fabric-client/lib/Peer.js:144:36
at Object.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/grpc/src/client_interceptors.js:1212:9)
at InterceptingListener._callNext (/root/hyperledger-fabric/test/webapp/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/root/hyperledger-fabric/test/webapp/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/root/hyperledger-fabric/test/webapp/node_modules/grpc/src/client_interceptors.js:847:24), status=500, , url=grpc://localhost:7051, name=peer0.sell.trace.com, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.keepalive_time_ms=120000, grpc.http2.min_time_between_pings_ms=120000, grpc.keepalive_timeout_ms=20000, grpc.http2.max_pings_without_data=0, grpc.keepalive_permit_without_calls=1, name=peer0.sell.trace.com, request-timeout=3000000, isProposalResponse=true
Failed to evaluate transaction: Error: cannot retrieve package for chaincode sellcc/1.0, error open /var/hyperledger/production/chaincodes/sellcc.1.0: no such file or directory
In my opinion, the most important message is
error open /var/hyperledger/production/chaincodes/sellcc.1.0: no such file or directory
It once occurred when I forgot install other orgs' chaincodes on the SellOrg(InvokeChaincode API require), but I definitetly install it this time. I dont know what's going on.
I'm a very newbie in both fabric and nodejs, so any kind of help would be great. Thanks in advance.
Now I know where the problem is, all of my peers have the same addr of localhost:7051, and it link to another org's peer. The peer's name in the error message is completely wrong, it just show the name in my connection.json !

Error While Installing Fabric Chaincode: _lifecycle.syscc: no such file or directory

While trying to install chaincode using Fabric v2.1, I am encountering an error. Does anyone face similar issues? My peer is running fine and able to join the channel as well. I am able to list the channel details as well.
Note: I am doing Native installation without using docker images for running orderer and peer.
Highly appreciate for your support and looking forward to hear from you.
Error:
chaincode install failed with status: 500 - error in simulation: failed to execute transaction 44688cc50afeda03e3f5e7735ae650030952477b6bdfce83064582f42bec6c84: could not launch chaincode _lifecycle.syscc: error building chaincode: error building image: failed to get chaincode package for external build: could not get legacy chaincode package '_lifecycle.syscc': open /home/vagrant/ledger/ORG2/peer1-org2/ledger/chaincodes/_lifecycle.syscc: no such file or directory
I got this error after upgrading from 1.4. In my case the problem was in the old config file for the peer.
Make sure you have next lines in your core.yaml:
chaincode:
...
# enabled system chaincodes
system:
_lifecycle: enable

adding new peer | 'chaincode with name 'cc' already exists' on composer network start

I am facing issues while while starting chaincode on my newly added peer in hyperledger network. Let me explain you the issue I am facing.
I had up and running hyperledger network where I had installed my bna with version 0.0.1. When I ping my network everything works fine. I have added new peer in network without bringing network down. Now I am trying to install bna on newly added peer. I have added new peer in connection profile for both organizations after adding I have created card and installed on organization where I have added new peer. bna is installed on the peer successfully. Now I am trying to start the network with composer network start. this is the point where I am receiving the following error.
Processing these Network Admins:
userName: user1
userName: user2
× 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: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Response from attempted peer comms was an error: Error: chaincode with name 'cc' already exists
Command failed
Please help in this matter. How am I suppose to add bna on newly added peer in network. I dont want bring my network down while adding new peer and install bna file.
So long as the bna is the same on the other peers, then you don't need to do anything else. All you need to do is install it onto the peer (the install command will not install it on peers that already have the bna, but will install it on peers that don't have it), and it sounds like you have done the correct approach by updating your connection profile and run the install command using an identity that is in the same MSP as your new Peer.
You do not need to start the business network because it is already started and that is the meaning of the error you are getting.
Now if you submit a transaction it will be sent to all peers in your connection profile. For your new Peer it will bring up the chaincode (ie the business network) automatically so that it can simulate that submission.

Error when running hyperledger caliper on hyperledger composer

i have been trying for days to get this working. My problem is that i have a running network with 4 peers (3 peers and 1 orderer) on 4 virtual machines, the network is able to communicate and everything seems to work, my issue is that hyperledger caliper does not want to connect. When i try to run a test with caliper i get this error:
error: [composer.js]: composer.init() failed at initialiseFabric(), code=1, stdout=, stderr=Error: No such container: peer0.org1.example.com
I have configured the json file used to get information about the network and the .yaml file for the tests.
Any help would be appreciated.

SSL3_GET_RECORD:wrong version number in Hyperledger Blockchain Explorer

I am trying to run Hyperledger Blockchain Explorer with a Hyperledger Fabric network setup using the steps here. composer-cli works good. But when I run Blockchain Explorer with node main.js it returns following error
16637 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number.
composer-cli is able to connect well with peers which means the SSL connection between composer-cli and peers is good. How do I fix the version of SSL running on blockchain explorer written in node.js ?

Resources