2

I'm running sample tutorial from Hyperledger Fabric Doc, trying to run the "Build Your First Network" sample with following command ./byfn.sh.

  • Network generation works fine, but when I try to up the network:

    $ cd..../fabric-samples/first-network
    $ ./byfn.sh generate
    $ ./byfn.sh up
    
  • I receive the following error:

      Starting for channel 'mychannel' with CLI timeout of '10' seconds and 
      CLI delay of '3' seconds
      Continue? [Y/n] y
      proceeding ...
      LOCAL_VERSION=1.4.1
      DOCKER_IMAGE_VERSION=1.4.1
      Creating peer0.org1.example.com ... done
      Creating peer1.org2.example.com ... done
      Creating peer0.org2.example.com ... done
      Creating orderer.example.com    ... done
      Creating peer1.org1.example.com ... done
      Creating cli                    ... done
    
      **OCI runtime exec failed: exec failed: container_linux.go:344: starting 
      container process caused "no such file or directory": unknown
      ERROR !!!! Test failed**
    

2 Answers2

2

Reinstalled docker, deleted previous node modules, re-run the network, finally worked fine.

$./byfn.sh down
$docker rm $(docker ps -a -q)
$docker volume prune
$./byfn.sh generate
$./byfn.sh up

enter image description here

enter image description here

  • When I changed back to a working docker project, everything worked well, that is why I doubt that reinstalling docker is the solution. – questionto42 Jan 29 '21 at 22:54
2

If you take the workaround using sh:

Using the docker command docker exec -it <your container> sh will allow you to overcome the issue. It does appear that bash is not installed in the container.

Source: OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: "bash": executable file not found in $PATH": unknown

questionto42
  • 7,175
  • 4
  • 57
  • 90
  • Yep now this source might be useful and correct, but back then 2019 year there was no any reliable source :) – Farkhod Abdukodirov Jun 21 '23 at 06:42
  • @FarkhodAbdukodirov All good. You could set it up again and the error was gone. In my case, setting it up again might still have thrown the same error since the path env var for bash would not be set in the container. Yours and mine are then two different answers, and mine might rather not have helped you, but might help others with the same error. – questionto42 Jun 22 '23 at 13:09
  • You are right, it will definitely help for those who face same problem. But I think now there might be much more issues as the Fabric version also changed a lot. – Farkhod Abdukodirov Jun 23 '23 at 00:42