Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when creating channels #494

Open
user1234-code-arch opened this issue Sep 24, 2024 · 3 comments
Open

Error when creating channels #494

user1234-code-arch opened this issue Sep 24, 2024 · 3 comments

Comments

@user1234-code-arch
Copy link

I tried running the new version of Fablo and I encountered this error message while trying to build chain code, I've tried changing the docker image but it didn't work. I am running on an M1 Mac but I am using x86_64 architecture to run it. I've attached the error message here.

No need to build the chaincode
Packaging chaincode chaincode1...
CHAINCODE_VERSION: 0.0.1
CHAINCODE_LANG: node
PEER_ADDRESS: peer0.org1.example.com:7041
CLI_NAME: cli.org1.example.com
Installing chaincode chaincode1...
CHAINCODE_VERSION: 0.0.1
PEER_ADDRESS: peer0.org1.example.com:7041
CA_CERT:
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: no match for platform in manifest sha256:fa9b938028ecf987bd2321547f9f2837cd21d79420f95c258950563d35877b5f: not found

Any help to resolve this would be appreciated.

Regards

@dzikowski
Copy link
Contributor

That sounds pretty unusual. What Fabric version do you use? Starting from 2.5 arm64 images for Fabric are available, and everything should work without any compatibility layer (native M1). For versions lower than 2.5 Fablo pre-fetches chaincode base images, since they are not available by default with Rosetta. And my guess is, since you are using x86_64 on M1, something fails with downloading chaincode base Docker images. You can try pulling images manually:

docker pull "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION"
docker pull "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION"
docker pull "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION"

Samples are for Node, Java and Go - pick what is needed. Env values are in your Fablo target directory: fablo-target/fabric-docker/.env.

Then start your network again and let us know if it helped.

@user1234-code-arch
Copy link
Author

user1234-code-arch commented Oct 10, 2024

That sounds pretty unusual. What Fabric version do you use? Starting from 2.5 arm64 images for Fabric are available, and everything should work without any compatibility layer (native M1). For versions lower than 2.5 Fablo pre-fetches chaincode base images, since they are not available by default with Rosetta. And my guess is, since you are using x86_64 on M1, something fails with downloading chaincode base Docker images. You can try pulling images manually:

docker pull "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION"
docker pull "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION"
docker pull "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION"

Samples are for Node, Java and Go - pick what is needed. Env values are in your Fablo target directory: fablo-target/fabric-docker/.env.

Then start your network again and let us know if it helped.

Hi, sorry for the delay in response but i tried the above and it still didnt work. I pulled the latest version from github and now I am able to use fabric 2.5 so I am running it nativly without using rosetta but it wont allow me to start the docker images. This is the error i am seeing now:
============ 🚀 Starting network 🚀 ==============
[+] Running 8/9
✘ fablo-rest.orderer.example.com Error context canceled 1.6s
✘ ca.org1.example.com Error context canceled 1.6s
✘ orderer0.group1.orderer.example.com Error context canceled 1.6s
✘ ca.orderer.example.com Error context canceled 1.6s
⠦ peer0.org1.example.com Pulling 1.6s
✘ cli.orderer.example.com Error context canceled 1.6s
✘ fablo-rest.org1.example.com Error no match for platform in manifest: not fou... 1.6s
✘ cli.org1.example.com Error context canceled 1.6s
✘ peer1.org1.example.com Error context canceled 1.6s
Error response from daemon: no match for platform in manifest: not found

-- update -- i was able to sort the above problem by specifying the platform in the yaml file for fablo but now i am facing another problem when trying to create a channel this is the log i am seeing :

Successfully copied 2.05kB to /User/fablo-target/fabric-config/config/my-channel1.tx
createChannelTx
============ 😻 Creating 'my-channel1' on Org1/peer0 😻 ==============
Creating channel with name: my-channel1
Orderer: orderer0.group1.orderer.example.com:7030
CORE_PEER_LOCALMSPID: Org1MSP
CORE_PEER_ADDRESS: peer0.org1.example.com:7041
CORE_PEER_MSPCONFIGPATH: /var/hyperledger/cli/crypto/users/[email protected]/msp
Error: failed to create deliver client for orderer: orderer client failed to connect to orderer0.group1.orderer.example.com:7030: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer0.group1.orderer.example.com on 127.0.0.11:53: no such host"
I tried to look into the logs of the orderer and this is what i am seeing, is there a way to resolve this :
[grpc] AddTraceEvent -> [core] [Server #1]Server created
INFO [blkstorage] NewProvider -> Creating new file ledger directory at /var/hyperledger/production/orderer/chains
PANI [orderer.common.server] Main -> Bootstrap method: 'file' is forbidden, since system channel is no longer supported
panic: Bootstrap method: 'file' is forbidden, since system channel is no longer supported

any help would be much appreciated please.

@dzikowski
Copy link
Contributor

I was trying to reproduce it and run on MacBook M1 with no fabric images downloaded, but I didn't get any error (
log.txt). I had no images at the beginning, and after running fablo, all downloaded images were for arm architecture - which is correct. I was using fabric 2.5.9, and Docker desktop 4.12.0, Docker 20.10.17.

Maybe you could try to remove all docker images (incl both fabric and fablo), and then follow the same flow for the same fabric version?

So:

  1. Delete all docker images
  2. Download fablo with curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/2.0.0/fablo.sh -o ./fablo && chmod +x ./fablo
  3. Init network with Node chaincode: ./fablo init node
  4. Start the network: ./fablo up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants