spydra-tech / fabric-debugger

Extension for Visual Studio Code that makes it easy for developers to build and debug Chaincode right from within the IDE.
Apache License 2.0
14 stars 3 forks source link

[BUG]: Network fabric_debug startup failure on MAC with Intel CPU #258

Open securedimensions opened 7 months ago

securedimensions commented 7 months ago

Describe the bug Startup of Local Fabric Network on MAC failed.

To Reproduce Steps to reproduce the behavior:

  1. In VSC install extension "Hyperledger Fabric Debugger v1.0.0"
  2. Follow setup as explained in this repo
  3. Click on Hyperledger Fabric Debugger icon and "Start Network"
  4. See error log below

Expected behavior The Local Fabric Network started with no errors. FYI: I can start the test-network from the Hyperledger Fabric Samples.

Environment:

Screenshots This is the full log

2023-12-21T17:01:43.574Z [Info]  Network fabric_debug  Creating
2023-12-21T17:01:43.624Z [Info]  Network fabric_debug  Created
2023-12-21T17:01:43.624Z [Info]  Container ca.org1.debugger.com  Creating
2023-12-21T17:01:43.662Z [Info]  Container ca.org1.debugger.com  Created
2023-12-21T17:01:43.669Z [Info]  Container ca.org1.debugger.com  Starting
2023-12-21T17:01:43.948Z [Info]  Container ca.org1.debugger.com  Started
2023-12-21T17:01:45.154Z [Info] Certificates already enrolled. Skipping certificate creation
2023-12-21T17:01:45.308Z [Info]  Container debug-couchdb1  Creating
2023-12-21T17:01:45.308Z [Info]  Container debug-cli  Creating
2023-12-21T17:01:45.353Z [Info]  Container debug-couchdb1  Created
2023-12-21T17:01:45.357Z [Info]  Container debug-cli  Created
2023-12-21T17:01:45.358Z [Info]  Container orderer.debugger.com  Creating
2023-12-21T17:01:45.396Z [Info]  Container orderer.debugger.com  Created
2023-12-21T17:01:45.396Z [Info]  Container peer0.org1.debugger.com  Creating
2023-12-21T17:01:45.431Z [Info]  Container peer0.org1.debugger.com  Created
2023-12-21T17:01:45.437Z [Info]  Container debug-couchdb1  Starting
2023-12-21T17:01:45.437Z [Info]  Container debug-cli  Starting
2023-12-21T17:01:45.808Z [Info]  Container debug-cli  Started
2023-12-21T17:01:45.808Z [Info]  Container orderer.debugger.com  Starting
2023-12-21T17:01:45.835Z [Info]  Container debug-couchdb1  Started
2023-12-21T17:01:46.052Z [Info]  Container orderer.debugger.com  Started
2023-12-21T17:01:46.052Z [Info]  Container peer0.org1.debugger.com  Starting
2023-12-21T17:01:46.277Z [Info]  Container peer0.org1.debugger.com  Started
2023-12-21T17:01:46.283Z [Info] Created local Fabric network
2023-12-21T17:01:47.617Z [Info] Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.debugger.com:5051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 192.168.96.6:5051: connect: connection refused"
2023-12-21T17:01:47.620Z [Info] Creating 'default' channel
2023-12-21T17:01:47.671Z [Info] 2023-12-21 17:01:47.670 UTC 0001 INFO [common.tools.configtxgen] main -> Loading configuration
2023-12-21T17:01:47.692Z [Info] 2023-12-21 17:01:47.690 UTC 0002 INFO [common.tools.configtxgen.localconfig] Load -> Loaded configuration: /etc/hyperledger/fabric/sampleconfig/configtx.yaml
2023-12-21T17:01:47.692Z [Info] 2023-12-21 17:01:47.690 UTC 0003 INFO [common.tools.configtxgen] doOutputChannelCreateTx -> Generating new channel configtx
2023-12-21T17:01:47.733Z [Info] 2023-12-21 17:01:47.732 UTC 0004 INFO [common.tools.configtxgen] doOutputChannelCreateTx -> Writing new channel tx
2023-12-21T17:01:47.831Z [Info] 2023-12-21 17:01:47.830 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2023-12-21T17:01:47.865Z [Info] 2023-12-21 17:01:47.864 UTC 0002 INFO [cli.common] readBlock -> Received block: 0
2023-12-21T17:01:47.957Z [Info] Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.debugger.com:5051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 192.168.96.6:5051: connect: connection refused"
2023-12-21T17:01:47.973Z [Info] Fetching channel config for channel default
2023-12-21T17:01:47.973Z [Info] Fetching the most recent configuration block for the channel
2023-12-21T17:01:48.082Z [Info] 2023-12-21 17:01:48.081 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2023-12-21T17:01:48.084Z [Info] 2023-12-21 17:01:48.083 UTC 0002 INFO [cli.common] readBlock -> Received block: 0
2023-12-21T17:01:48.085Z [Info] 2023-12-21 17:01:48.083 UTC 0003 INFO [channelCmd] fetch -> Retrieving last config block: 0
2023-12-21T17:01:48.088Z [Info] 2023-12-21 17:01:48.085 UTC 0004 INFO [cli.common] readBlock -> Received block: 0
2023-12-21T17:01:48.099Z [Info] Decoding config block to JSON and isolating config to ../local/Org1MSPconfig.json
2023-12-21T17:01:48.191Z [Info] Generating anchor peer update transaction for Org1 on channel default
2023-12-21T17:01:48.484Z [Info] 2023-12-21 17:01:48.465 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2023-12-21T17:01:48.484Z [Info] 2023-12-21 17:01:48.476 UTC 0002 INFO [channelCmd] update -> Successfully submitted channel update
2023-12-21T17:01:48.484Z [Info] Anchor peer set for org 'Org1MSP' on channel 'default'
2023-12-21T17:01:48.746Z [Info] Error: query failed with status: 500 - channel 'default' not found
2023-12-21T17:01:48.749Z [Info] Deploying chaincode 'chaincode-javascript' to channel 'default'
2023-12-21T17:01:48.831Z [Info] Error: proposal failed with status: 500 - channel 'default' not found
2023-12-21T17:01:48.907Z [Info] Error: query failed with status: 500 - channel 'default' not found
2023-12-21T17:01:48.986Z [Info] Error: proposal failed with status: 500 - channel 'default' not found
2023-12-21T17:01:48.998Z [Info] Local Fabric Network started

P.S.: I've tried the startup multiple times and I noticed the weird IP 192.168.96.6 that keeps chaning from startup to startup.

ashwath-spdr commented 7 months ago

Thanks @securedimensions for the detailed logs. I'll try to reproduce in a couple of days on a Mac intel CPU.

Meanwhile, when you tried multiple times, did you remove the current network and try again? Pls see here for instructions on how to remove the network. Sometimes doing that might clean some configuration which might be stuck.

securedimensions commented 7 months ago

when you tried multiple times, did you remove the current network and try again? Yes.

chitraarasu commented 4 months ago

Hi @ashwath-spdr , I am also facing this issue. Is this issue solved?. I am having same Environment as mentioned above. Same logs too. But it worked few months back now it is not working.

securedimensions commented 4 months ago

I have not solved that issue and went on not using this feature. For me it never worked...

chitraarasu commented 4 months ago

Then do you have any other ways to debug chaincode. Please share if you have any other methods to debug chain code. @securedimensions @ashwath-spdr

chitraarasu commented 4 months ago

@ashwath-spdr @ashwathgovindan