$ ./byfn.sh -m up
.
Starting with channel 'mychannel' and CLI timeout of '10'
Continue (y/n)? y
proceeding ...
Starting peer1.org2.example.com ...
Starting peer1.org1.example.com ...
Starting peer0.org1.example.com ...
Starting peer0.org2.example.com ...
Starting peer0.org1.example.com ... done
Starting cli ... done
/bin/bash: ./scripts/script.sh: No such file or directory
/bin/bash: ./scripts/script.sh: No such file or directory
/bin/bash: ./scripts/script.sh: No such file or directory
/bin/bash: ./scripts/script.sh: No such file or directory
/bin/bash: ./scripts/script.sh: No such file or directory
I get the above error on building up my first network ?
Kindly help.
(assuming fabric-samples folder is downloaded and the latest version 0.1.1 is installed, and no changes are made to any file)
Related
I need to extract the filesystem of a debian image onto the host, modify it, then repackage it back into a docker image. I'm using the following commands:
docker export container_name > archive.tar
tar -xf archive.tar -C debian/
modifying the file system here
tar -cpjf archive-modified.tar debian/
docker import archive-modified.tar debian-modified
docker run -it debian-modified /bin/bash
After I try to run the new docker image I get the following error:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown.
ERRO[0000] error waiting for container: context canceled
I've tried the above steps without modifying the file system at all and I get the same behavior. I've also tried importing the output of docker export directly, and this works fine. This probably means I'm creating the new tar archive incorrectly. Can anyone tell me what I'm doing wrong?
Take a look at the archive generated by docker export:
# tar tf archive.tar | sort | head
bin/
bin/bash
bin/cat
bin/chgrp
bin/chmod
bin/chown
bin/cp
bin/dash
bin/date
bin/dd
And then at the archive you generate with your tar -cpjf ... command:
# tar tf archive-modified.tar | sort | head
debian/
debian/bin/
debian/bin/bash
debian/bin/cat
debian/bin/chgrp
debian/bin/chmod
debian/bin/chown
debian/bin/cp
debian/bin/dash
debian/bin/date
You've moved everything into a debian/ top-level directory, so there is no /bin/bash in the image (it would be /debian/bin/bash, and probably wouldn't work anyway because your shared libraries aren't in the expected location, either.
You probably want to create the updated archive like this:
# tar -cpjf archive-modified.tar -C debian/ .
I am running a docker-compose test; part of my stack that will perform the actual tests is the following service
tester:
image: tutum/curl:latest
volumes:
- ./ci/wait-for-it.sh:/usr/local/bin/wait-for-it.sh
- ./webhooks:/app/webhooks
depends_on:
- sut
command: ["wait-for-it.sh", "sut:8080", "-t", "240", "--", "sh", "pytest /app/webhooks"]
The command fails as follows:
ERROR: for 0114c9206690_alerta-_tester_1 Cannot start service tester: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"wait-for-it.sh\": executable file not found in $PATH": unknown
ERROR: for tester Cannot start service tester: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"wait-for-it.sh\": executable file not found in $PATH": unknown
The file being mounted does exist:
▶ ls docker-compose.test.yaml
docker-compose.test.yaml
Workspace/systems-utils/ alerta_dev_infra ✗ 1d ⚑ ◒
▶ ls ./ci/wait-for-it.sh
./ci/wait-for-it.sh
What is more, when trying to bind mount a non-existent file, instead of getting a mount-related error, i get the same error as above
tester:
image: tutum/curl:latest
volumes:
- ./ci/foofile.sh:/usr/local/bin/wait-for-it.sh
- ./webhooks:/app/webhooks
depends_on:
- sut
command: ["wait-for-it.sh", "sut:8080", "-t", "240", "--", "sh", "pytest /app/webhooks"]
$ docker-compose -f docker-compose.test.yaml up -d
ERROR: for tester Cannot start service tester: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"wait-for-it.sh\": executable file not found in $PATH": unknown
ERROR: Encountered errors while bringing up the project.
What am I missing?
edit: Regarding the PATH issue mentioned, here it is:
▶ docker run -it tutum/curl:latest printenv
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=1f3090676fa0
TERM=xterm
HOME=/
What is more, the tester service configuration is the exact same as in this project which runs perfectly.
As for the permissions issue:
Workspace/systems-utils/alerta-workable alerta_dev_infra ✗ 1d ⚑ ◒ ⍉
▶ ls -al ./ci/wait-for-it.sh
-rwxr-xr-x 1 pkaramol staff 5.1K Sep 6 22:02 ./ci/wait-for-it.sh
The error message is pretty self-explanatory - wait-for-it.sh is not on $PATH.
You need either add /usr/local/bin to $PATH or change command to
command: ["/usr/local/bin/wait-for-it.sh", "sut:8080", "-t", "240", "--", "sh", "pytest /app/webhooks"]
See also accepted answer to this question for why /usr/local/bin might not be in path.
Looks like it could not find "executable file in $PATH"
So let's try to set executable permissions on ./ci/wait-for-it.sh file:
$ chmod +x ./ci/wait-for-it.sh
My docker-compose.yml looks like this:
version: '3'
services:
phab:
build:
context: .
args:
- PHAB_BASE_URI=https://phab.example.com
- PHAB_REPO_PATH=/var/repo
- PHAB_TIMEZONE=Europe/Berlin
- PHP_POST_MAX_SIZE=32MB
ports:
- "127.0.0.1:8012:80"
volumes:
- ./.data/repos:/var/repo
- ./.data/mysql:/var/lib/mysql/
If I try to rebuild after I started the container, I get
$ docker-compose build
Building phab
ERROR: Error processing tar file(exit status 1): unexpected EOF
This appears to be due to the .data directory. The only "cure" I found was either deleting the directory or moving it outside of the project directory. Renaming the directory to eg. .data1 does not fix it.
$ sudo mv .data .data1
$ docker-compose build
Building phab
ERROR: Error processing tar file(exit status 1): unexpected EOF
$ sudo mv .data1 ..
$ docker-compose build
Building phab
Step 1/27 : FROM tutum/lamp:latest
---> 3d49e175ec00
Step 2/27 : RUN apt-get update && apt-get install -y php5-curl php5-mysqlnd php5-gd python3-pygments
---> Using cache
[ ... ]
I am using docker-compose 1.18.0, build 8dd22a9 abd Docker 18.06.0-ce, build 0ffa825 on Debian 9.5.
I have seen the question Docker ERROR: Error processing tar file(exit status 1): unexpected EOF. However just flushing the /var/lib/docker directory does not appear as an option to me. Pruning unused images and even removing the base image before the build does not fix the issue.
I had the same issue. The following steps solved it:
1.) Stop Docker Service.
systemctl stop docker
2.) Backup /var/lib/docker.
3.) Remove /var/lib/docker.
sudo rm -rf /var/lib/docker
4.) Start Docker Service.
systemctl start docker
Try upgrading to 18.09 which was just released yesterday. The "unexpected EOF" during a build looks like a known issue with 18.06: https://github.com/moby/moby/pull/37771
remove files generated by other container, like "db_data", "mysql_data", etc
I am new in the community, I am working with concourse and I have the next issue running a yml file in terminal using fly:
command $: sudo fly -t ci execute -c task.yml
I get the following error:
initializing Backend error: Exit status: 500, message:
{"Type":"","Message":"runc exec: exit status 1: exec failed: container_linux.go:348: starting container process caused \"chdir to cwd (\"/root\") set in config.json failed: permission denied\"\n","Handle":"","ProcessID":""}
Please help if anyone can help me!
I am new to blockchain and i was going through the tutorial http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html and doing it. I completed the pre-requisites and download of the samples and binaries. I was able to run ./byfn.sh -m generate successfully. But when I was running ./byfn.sh -m up I got the error:
/bin/bash: ./scripts/script.sh: No such file or directory
Below is the complete log
proceeding ...
Starting peer0.org2.example.com ...
Starting peer0.org1.example.com ...
Starting orderer.example.com ...
Starting peer1.org2.example.com ...
Starting peer0.org2.example.com
Starting peer1.org1.example.com ...
Starting peer0.org1.example.com
Starting orderer.example.com
Starting peer1.org2.example.com
Starting orderer.example.com ... done
cli is up-to-date
/bin/bash: ./scripts/script.sh: No such file or directory
I am running it on windows 7 and on Docker Quick start terminal. Waiting for the help... Thanks in advance.
My issue got resolved by following Gari Singh suggestion.
What is the full path the the fabric-samples directory? The usual issue here is that you do not clone the fabric-samples repository into a folder shared with Docker Toolbox. Typically you need to make sure that you clone fabric-samples somewhere under C:\Users on Windows – Gari Singh
Thanks for the help... :)
Make sure all prerequisites are installed:
Go is installed and $GOPATH variable is set.
Npm is installed. Run npm -v to check.
Python is installed. Run python --version to check.
If everything looks fine, try to debug which command within ./scripts/script.sh is failing and fix/install a missing dependency.