简体   繁体   中英

“exec: \”scripts/script.sh\": stat scripts/script.sh: no such file or directory

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

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.

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 .

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!

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM