hyperledger-labs / minifabric

Do fabric network the right and easy way.
Apache License 2.0
301 stars 166 forks source link

Issue on WSL2 #72

Closed mvkillu closed 3 years ago

mvkillu commented 3 years ago

I am facing the same issue mentioned on this page. And going by that page, it looks like the issue has been fixed and merged? How can i update my minifab to get these latest changes?

litong01 commented 3 years ago

@mvkillu To updating minifabric, you can do this.

curl -o minifab -L https://tinyurl.com/twrt8zv && chmod +x minifab
docker pull hfrd/minifab:latest

Or see this information https://github.com/litong01/minifabric/tree/master/docs#update-minifabric

If the update does not fix you up, please add detailed steps here for reproducing the error. If it does fix your issue, you should close this issue.

litong01 commented 3 years ago

@mvkillu Any update on this?

mvkillu commented 3 years ago

Sorry for the delay, I couldn't get a chance to try it. Will check and update/close this ticket within 24 hours.

mvkillu commented 3 years ago

Even after updating minifabric, I am still getting the issue.

habit@Calvin-pc:~/code/minifab/test$ minifab up
Minifab Execution Context:
    FABRIC_RELEASE=2.2.0
    CHANNEL_NAME=mychannel
    PEER_DATABASE_TYPE=golevel
    CHAINCODE_LANGUAGE=go
    CHAINCODE_NAME=simple
    CHAINCODE_VERSION=1.0
    CHAINCODE_INIT_REQUIRED=true
    CHAINCODE_PARAMETERS="init","a","200","b","300"
    CHAINCODE_PRIVATE=false
    CHAINCODE_POLICY=
    TRANSIENT_DATA=
    BLOCK_NUMBER=newest
    EXPOSE_ENDPOINTS=false
    CURRENT_ORG=org0.example.com
    HOST_ADDRESSES=172.26.39.131
    WORKING_DIRECTORY: /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/5b877c71103324599ed5cbab9a49617510c44fc82708ecd0d2d6e7f0f89b8ac0
...
# Preparing for the following operations: *********************
  verify options, download images, generate certificates, start network, network status, channel create, channel join, anchor update, profile generation, cc install, cc approve, cc commit, cc initialize, discover
.................
# Running operation: ******************************************
  verify options
.
# Running operation: ******************************************
  download images
............
# Running operation: ******************************************
  generate certificates
..........................................................................................................................................
# Use fabric tools container to create channel artifacts ******
  non-zero return code
  docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/etc/hyperledger/fabric/run/certtxgen.sh\": stat /etc/hyperledger/fabric/run/certtxgen.sh: no such file or directory": unknown.

# STATS *******************************************************
minifab: ok=201 failed=1

real    1m7.166s
user    1m3.744s
sys     0m10.108s
litong01 commented 3 years ago

@mvkillu how did you do the update? looks like you were still using the old hfrd/minifab image. do this

docker pull hfrd/minifab:latest

and also make sure you are not using 0.5.0 or earlier release of the script.

mvkillu commented 3 years ago

I used these commands to update minifab.

curl -o minifab -L https://tinyurl.com/twrt8zv && chmod +x minifab
docker pull hfrd/minifab:latest

image

image

litong01 commented 3 years ago

@mvkillu not really sure where you run the command, your working directory looks really strange. It seems to me that you are doing this inside some kind of virtual machine.

litong01 commented 3 years ago

@mvkillu I think that you are running actually inside VM, not actually under windows prompt. That must be the issue.

mvkillu commented 3 years ago

I am running the command in WSL2 (Ubuntu 20.04) on a Windows 10 machine. The minifab up command used to work fine some 1-2 months ago, but after I upgraded my Docker on Windows, it stopped working. Pls let me know if you need me to run any commands to debug the issue. I am very new to hyperledger and doesn't know much about it.

litong01 commented 3 years ago

@mvkillu just not run it inside a VM. you are inside wsl, quit that and run it under a real windows command prompt, you should be ok. Please remember to close this after your issue is resolved.

mvkillu commented 3 years ago

yeah, running minifab in windows is working fine. But in WSL2, which was working last month, it isn't working anymore. Anyhow, I will close this issue.