5

I am getting this error while trying to bring up the first hyperledger network:

$ ./byfn.sh -m up
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
2018-05-13 07:33:04.240 UTC [main] main -> INFO 001 Exiting.....
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
Starting peer1.org1.example.com ... done
Starting peer1.org2.example.com ... done
Starting peer0.org1.example.com ... done
Starting peer0.org2.example.com ... done
Starting orderer.example.com    ... done
cli is up-to-date
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"scripts/script.sh\": stat scripts/script.sh: no such file or directory": unknown
ERROR !!!! Test failed

The main folder fabric-samples is under the folder C:\User\XXXXX. This is the same path for $HOME as well. I can see that the file script.sh is present under fabric-samples/first-network/scripts.

Any other setting that needs to be done to help execute this?

Go version:

go version go1.10.2 windows/amd64
Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Arun
  • 61
  • 1
  • 3
  • The container can't find `/scripts/script.sh`. It could be a problem with your Windows settings or it could be a problem with the image that the container uses to run hyperledger. – boaz_shuster May 13 '18 at 07:53
  • can you please elaborate? is there a way to find what causes the issue? earlier resolutions regarding this issue mentioned to place the main folder in the same path as $HOME. – Arun May 13 '18 at 08:11
  • Which version of Windows are you using? If Windows 10, are you using Docker for Windows? This error typically indicates that the folder in which the fabric-samples is located is not shared with Docker – Gari Singh May 13 '18 at 09:49
  • Yes Windows 10 and Docker for Windows. The fabric-samples is located in C:/Users/XXXXX folder. If I go to the Settings->Shared Drives for dockers, it shows the 'C' drive as shared. – Arun May 13 '18 at 10:26
  • I encounter the same error in Windows Subsystem for Linux (WSL) Ubuntu. Can it be because Windows is preventing running the _sh_ file in another directory? Have you found a solution? – kiatng Oct 24 '18 at 02:22

6 Answers6

1

I have just encountered the above error and have processed the following as mount the drive by command:

sudo mkdir /c
sudo mount --bind /mnt/c /c

cd /c/<your path>/fabric-samples/first-network
./byfn.sh generate
./byfn.sh up

good luck!

kitamaru
  • 11
  • 1
  • 1
0

I ran into this problem on Ubuntu 18. I stopped all of my running Docker images and removed the exited images. After doing this, I was able to successfully run the byfn.sh script without the scripts.sh no such file error.

0

Ensure that the fabric-samples folder should be at location: C:\Users\fabric-samples.
Now, the first-network folder should be found at location: C:\Users\fabric-samples\first-network. I assume you ran command : ./byfn.sh -m generate from first-network directory. Then, ran ./byfn.sh -m up command, and you got that error.

Ensure that the path is correct and accordingly change path in environment variable $HOME.

enamoria
  • 896
  • 2
  • 11
  • 29
0

I faced similar issue. I had mounted C drive and created a workspace there. eg.

sudo mkdir /c

sudo mount — bind /mnt/c /c

mkdir /c/myspace&& cd /c/myspace

/c/myspace

I was executing the following command outside my workspace. You can copy or execute the command after cd into your workspace. Hope it helps.

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/v1.4.0/scripts/bootstrap.sh | bash

Community
  • 1
  • 1
Shweta Gupta
  • 726
  • 2
  • 6
  • 12
0

Try following method also, stop the network, remove all previous values:

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

Restart your docker then re-run the network!

$cd ....fabric-samples/first-network
$./byfn.sh generate
$./byfn.sh up
0

Check home directory using

echo ~

Make sure fabric-samples folder is present in your home directory

cd ~
cd fabric-samples/first-network/
./byfn.sh -m down
./byfn.sh -m up