hyperledger-fabric byfn.sh -m failed with script/scripts.sh not found - docker

I am running the byfn.sh script within docker container on windows 10.
Docker version 18.03.0-ce, build 0520e24302
I am getting the script.sh not found error message, please help.
$ ./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-04-28 20:28:24.254 UTC [main] main -> INFO 001 Exiting.....
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
Starting peer1.org2.example.com ... done
Starting peer0.org2.example.com ... done
Starting peer1.org1.example.com ... done
Starting peer0.org1.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

Resolved the issue by copying the entire fabric-samples directory to c:\users\ directory.
Having the fabric-samples directory anywhere else on c:\ drive gives the error. Perhaps an explicit path needs to be defined somewhere if placing fabric-samples in any location other than c:\users\

I figured that the volumes from the docker container under Windows are not correctly mounted (not at all). But I don't know how to fix it... I'll get back if I have more information on this issue or even a solution.

Related

process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown (Docker))

I'm trying to deploy a docker container to perform some testings with gitlab runners but when I'm doing the docker-compose up command I get the following output:
admin#runners-test:~/runner-test$ sudo docker-compose up -d
Starting gitlab-runner ... error
ERROR: for gitlab-runner Cannot start service gitlab-runner: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown
ERROR: for gitlab-runner Cannot start service gitlab-runner: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown
ERROR: Encountered errors while bringing up the project.
Abd this is the output of journalctl:
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.560275437Z" level=error msg="stream copy error: reading from a closed fifo"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.577270402Z" level=error msg="stream copy error: reading from a closed fifo"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.675282811Z" level=error msg="0cd3bbb779a947012c9059921f092b569eb088bb2fe0bf99a8ae3266ec43abbd cleanup: failed to delete container from containerd: no such container"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.675625496Z" level=error msg="Handler for POST /v1.25/containers/0cd3bbb779a947012c9059921f092b569eb088bb2fe0bf99a8ae3266ec43abbd/start returned error: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown"
And the docker-compose file:
version: '3'
services:
gitlab-runner:
container_name: gitlab-runner
image: 'gitlab/gitlab-runner:latest'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config:/etc/gitlab-runner
restart:
unless-stopped
This error occurs with any container I try to lift, even doing a simple docker run hello-world...
I also take a look to this post on proxmox forum but I don't know how to add kernel command line parameters for a lxc container, I'v been trying editing the /etc/default/grub file but update-grub command doesn't work as I want inside the lxc, I get the following output:
admin#runners-test:/$ sudo update-grub
[sudo] password for admin:
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/mapper/pve-vm--1010118--disk--0'.
I'm really stuck with this, so any kind of help would be welcome :) Thanks!
I referenced many other links when finally discovering doing a (on CentOS) update did the trick. So:
yum update -y
reboot
After the reboot, the system came back online and I proceeded to run my docker container, in this case a docker registry:
[root#server ~]# docker run -d --name registry registry:2
c40941bf42c853709bcca05bad4e8914df1f4932a355607f37b55f7e0ed01e60
[root#server ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
c40941bf42c8 registry:2 "/entrypoint.sh /e..." 3 seconds ago Up 2 seconds 5000/tcp
The docker container booted up fine.
So, also here are reference pages I checked out, and I did not have to change anything in /boot/boot.txt as this one references, but is good info:
https://my-take-on.tech/2021/05/07/fix-docker-cgroup-errors-after-systemd-248-update/
and this one, which after I read it, it had me finally trying to do a yum update for fix:
docker-compose throws errors by starting mariadb for an private nextcloud installation

Docker installation of WoW AzerothCore Private server fails at Geographic input

i do hope someone will assist me in generating my own wow private server...
I'm trying to install on the following:
Synology DS718+
Docker
I'm following this guide:
https://www.azerothcore.org/wiki/Install-with-Docker
once i get to step: 2) Compile AzerothCore
and insert the command into docker, I end up with the following:
Geographic Area Selection
Yes I'm aware I've typed an "a" to the question, but I've also tried with answering with all the numbers.. been at it for a few days..
What ever i input into this selection the script doesnt continue, however long i wait..
I can escape it with the "CTRL+C" command
Doing so ( i guess) i why my build fails, as running the 3rd step isnt able to run the Auth + World server.
The error i get here are:
Current default time zone: 'Etc/UTC'
Local time is now: Fri Oct 16 12:50:21 UTC 2020.
Universal Time is now: Fri Oct 16 12:50:21 UTC 2020.
Removing intermediate container 6e84c22a028e
---> c6bdb6f32f72
Step 6/7 : HEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=3 CMD netstat -lnpt | grep :3724 || exit 1
---> Running in 011b3ff39de5
Removing intermediate container 011b3ff39de5
---> 724e5c11cc0b
Step 7/7 : CMD ["/azeroth-server/bin/authserver"]
---> Running in 3a2b67a9802b
Removing intermediate container 3a2b67a9802b
---> ed4d11460ee9
Successfully built ed4d11460ee9
Successfully tagged azerothcore/authserver:latest
Creating azerothcore-wotlk_ac-database_1 ... done
Creating azerothcore-wotlk_ac-worldserver_1 ...
Creating azerothcore-wotlk_ac-authserver_1 ... error
Creating azerothcore-wotlk_ac-worldserver_1 ... error
r\": stat /azeroth-server/bin/authserver: no such file or directory": unknown
ERROR: for azerothcore-wotlk_ac-worldserver_1 Cannot start service ac-worldserver: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/azeroth-server/bin/worldserver\": stat /azeroth-server/bin/worldserver: no such file or directory": unknown
ERROR: for ac-authserver Cannot start service ac-authserver: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/azeroth-server/bin/authserver\": stat /azeroth-server/bin/authserver: no such file or directory": unknown
ERROR: for ac-worldserver Cannot start service ac-worldserver: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/azeroth-server/bin/worldserver\": stat /azeroth-server/bin/worldserver: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.
If more info (and what info) is required, please do let me know

How to fix a malfunctioning docker container?

I currently have a Docker container that runs NGINX for me. While trying to learn how to set up a proxy pass example I created a setting that crashes this container and I can no longer start the container.
Creating a new NGINX container is not a big deal, but I would like to use this example for a learning experience.
Is it possible to start up this stopped container with a different entree point rather than having it start NGINX?
I've read that I have to commit the broken container into an image and then can start up a new container from this image which I have been able to do, but this seems rather cumbersome.
If the above is the only method than I might as well just create a new container.
I encountered a similar problem, which can be fixed in the following ways:
Method 1: based on docker cp, copy the file contents of the damaged container to the current environment (even if the container cannot be started);
Method 2: based on docker commit resubmit the damaged container as another image, and then start the additional entry point entry;
Note: the above methods are just a few tricks to use during debugging or development, and eventually we should write the related operations into the Dockerfile configuration or docker-compose.yml configuration.
Fix Progress:
Because I temporarily modified the ./php-fpm.d/www.conf configuration in my PHP-FPM
container, the container could not be started:
$ docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------
phpfpm_fpm_1 docker-php-entrypoint php-fpm Restarting
phpfpm_nginx_1 nginx -g daemon off; Up 80/tcp, 0.0.0.0:86->86/tcp
Check related error information by docker-compose log-f:
fpm_1 | [03-Dec-2019 03:57:50] ERROR: Unable to create or open slowlog(/usr/local/log/www.log.slow): No such file or directory (2)
fpm_1 | [03-Dec-2019 03:57:50] ERROR: Unable to create or open slowlog(/usr/local/log/www.log.slow): No such file or directory (2)
fpm_1 | [03-Dec-2019 03:57:50] ERROR: failed to post process the configuration
fpm_1 | [03-Dec-2019 03:57:50] ERROR: failed to post process the configuration
fpm_1 | [03-Dec-2019 03:57:50] ERROR: FPM initialization failed
fpm_1 | [03-Dec-2019 03:57:50] ERROR: FPM initialization failed
fpm_1 | [03-Dec-2019 03:58:51] ERROR: Unable to create or open slowlog(/usr/local/log/www.log.slow): No such file or directory (2)
fpm_1 | [03-Dec-2019 03:58:51] ERROR: Unable to create or open slowlog(/usr/local/log/www.log.slow): No such file or directory (2)
fpm_1 | [03-Dec-2019 03:58:51] ERROR: failed to post process the configuration
fpm_1 | [03-Dec-2019 03:58:51] ERROR: failed to post process the configuration
fpm_1 | [03-Dec-2019 03:58:51] ERROR: FPM initialization failed
fpm_1 | [03-Dec-2019 03:58:51] ERROR: FPM initialization failed
Check the configuration information manually debugged in the container by docker diff container-id:
$ docker ps -a|grep php
5dfe26f00059 tkstorm/phpngx "nginx -g 'daemon of…" 2 weeks ago Up 41 hours 80/tcp, 0.0.0.0:86->86/tcp phpfpm_nginx_1
6f8a2044ba36 tkstorm/phpfpm "docker-php-entrypoi…" 2 weeks ago Restarting (78) 7 seconds ago phpfpm_fpm_1
Copy the wrong ./php-fpm.d/www.conf configuration that damaged the container to the local directory and fix it:
$ docker cp phpfpm_fpm_1:/usr/local/etc/php-fpm.d/www.conf fix-www.conf
$ vi fix-www.conf
...
slowlog = /var/log/$pool.log.slow
...
Copy the repaired configuration to the damaged container again:
// after fix up
$ docker cp fix-www.conf phpfpm_fpm_1:/usr/local/etc/php-fpm.d/www.conf
Restart the container:
$ docker restart phpfpm_fpm_1
// it' fix ok
$ docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------
phpfpm_fpm_1 docker-php-entrypoint php-fpm Up 9000/tcp
phpfpm_nginx_1 nginx -g daemon off; Up 80/tcp, 0.0.0.0:86->86/tcp

Live migration of a jboss/wildfly container with CRIU failed

I've tried to live migrate a wildfly-container to another host like described here. The example with the np container works well. When I replace the example with a simple jboss/wildfly container, I just received this error when criu tries to restore the container on the other host :
Error response from daemon: Cannot restore container <CONTAINER-ID>: criu failed: type NOTIFY errno 0
Error: failed to restore one or more containers
Because I didn't found a solution to this error, I've compiled the linux kernel like described on the criu website and here.
After that sudo criu check prints:
Warn (criu/libnetlink.c:54): ERROR -2 reported by netlink
Warn (criu/libnetlink.c:54): ERROR -2 reported by netlink
Warn (criu/sockets.c:711): The current kernel doesn't support packet_diag
Warn (criu/libnetlink.c:54): ERROR -2 reported by netlink
Warn (criu/sockets.c:721): The current kernel doesn't support netlink_diag
Info prctl: PR_SET_MM_MAP_SIZE is not supported
Looks good.
criu --version
Version: 2.11
docker --version
Docker version 1.6.2, build 7c8fca2
Checkpoint/Restore for an example shell script example worked very well. But when I want to checkpoint a container
docker run -d --name looper busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
with
criu dump -t $PID --images-dir /tmp/looper
I receive this output
Error (criu/sockets.c:132): Diag module missing (-2)
Error (criu/sockets.c:132): Diag module missing (-2)
Error (criu/sockets.c:132): Diag module missing (-2)
Error (criu/mount.c:701): mnt: 87:./etc/hosts doesn't have a proper root mount
Error (criu/cr-dump.c:1641): Dumping FAILED.`
I can't find some solutions with these errors. Is there any known solution to live migrate a wildfly-container?
Thanks in advance

Packer docker build exits code 137 when running runit cookbook

I'm trying to use Packer to build a docker image of the webapp I'm working on. Whenever I run packer build, when it gets to the step that it runs the runit recipe, I would get Build 'docker' errored: Error executing Chef: Non-zero exit status: 137
I looked into 137, and found out this is the exit code commonly associated with a kill -9. In most cases this would imply that the system is running critically low on memory, and the system is attempting to compensate.
I tried to find the smallest possible reproduction, and I came up with this packer configuration:
{
"builders":[{
"type": "docker",
"pull": false,
"image": "silkstart/basic_server",
"export_path": "image.tar",
"run_command":[
"-d",
"-i",
"-t",
"--memory-reservation",
"1G",
"{{.Image}}",
"/bin/bash"
]
}],
"provisioners":[
{
"type": "chef-solo",
"cookbook_paths": ["cookbooks", "vendor/cookbooks"],
"data_bags_path": "data_bags",
"roles_path": "roles",
"environments_path": "environments",
"run_list": [
"recipe[runit]"
]
}
],
"post-processors": [
{
"type": "docker-import",
"repository": "silkstart/docker_test",
"tag": "0.1"
}
]
}
When I run packer build on this configuration, this is my output:
TMPDIR=/opt/shared packer build packer_files/docker_test.json
docker output will be in this color.
==> docker: Creating a temporary directory for sharing data...
==> docker: Starting docker container...
docker: Run command: docker run -v /opt/shared/packer-docker484290992:/packer-files -d -i -t --memory-reservation 1G silkstart/basic_server /bin/bash
docker: Container ID: 1f87b0cf1fe71f07b580ae6b18415a79c23a1a32a40f5f0366be90f160977a50
==> docker: Provisioning with chef-solo
docker: Installing Chef...
docker: % Total % Received % Xferd Average Speed Time Time Time Current
docker: Dload Upload Total Spent Left Speed
docker: 100 20022 100 20022 0 0 45092 0 --:--:-- --:--:-- --:--:-- 45196
docker: Getting information for chef stable for ubuntu...
docker: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=ubuntu&pv=14.04&m=x86_64
docker: to file /tmp/install.sh.23/metadata.txt
docker: trying curl...
docker: url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/14.04/x86_64/chef_12.6.0-1_amd64.deb
docker: md5 5cfc19d5a036b3f7860716bc9795a85e
docker: sha256 e0b42748daf55b5dab815a8ace1de06385db98e29a27ca916cb44f375ef65453
docker: version 12.6.0downloaded metadata file looks valid...
docker: downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/14.04/x86_64/chef_12.6.0-1_amd64.deb
docker: to file /tmp/install.sh.23/chef_12.6.0-1_amd64.deb
docker: trying curl...
docker: Comparing checksum with sha256sum...
docker:
docker: WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
docker:
docker: You are installing an omnibus package without a version pin. If you are installing
docker: on production servers via an automated process this is DANGEROUS and you will
docker: be upgraded without warning on new releases, even to new major releases.
docker: Letting the version float is only appropriate in desktop, test, development or
docker: CI/CD environments.
docker:
docker: WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
docker:
docker: Installing chef
docker: installing with dpkg...
docker: Selecting previously unselected package chef.
docker: (Reading database ... 17195 files and directories currently installed.)
docker: Preparing to unpack .../chef_12.6.0-1_amd64.deb ...
docker: Unpacking chef (12.6.0-1) ...
docker: Setting up chef (12.6.0-1) ...
docker: Thank you for installing Chef!
docker: Creating directory: /tmp/packer-chef-solo
docker: Creating directory: /tmp/packer-chef-solo/cookbooks-0
docker: Creating directory: /tmp/packer-chef-solo/cookbooks-1
docker: Creating directory: /tmp/packer-chef-solo/roles
docker: Creating directory: /tmp/packer-chef-solo/data_bags
docker: Creating directory: /tmp/packer-chef-solo/environments
docker: Creating configuration file 'solo.rb'
docker: Creating JSON attribute file
docker: Executing Chef: sudo chef-solo --no-color -c /tmp/packer-chef-solo/solo.rb -j /tmp/packer-chef-solo/node.json
docker: [2016-01-29T06:42:48+00:00] INFO: Forking chef instance to converge...
docker: [2016-01-29T06:42:48+00:00] INFO: *** Chef 12.6.0 ***
docker: [2016-01-29T06:42:48+00:00] INFO: Chef-client pid: 207
docker: [2016-01-29T06:42:50+00:00] INFO: Setting the run_list to ["recipe[runit]"] from CLI options
docker: [2016-01-29T06:42:50+00:00] INFO: Run List is [recipe[runit]]
docker: [2016-01-29T06:42:50+00:00] INFO: Run List expands to [runit]
docker: [2016-01-29T06:42:50+00:00] INFO: Starting Chef Run for 1f87b0cf1fe7
docker: [2016-01-29T06:42:50+00:00] INFO: Running start handlers
docker: [2016-01-29T06:42:50+00:00] INFO: Start handlers complete.
docker: [2016-01-29T06:42:52+00:00] INFO: Processing service[runit] action nothing (runit::default line 20)
docker: [2016-01-29T06:42:52+00:00] INFO: Processing execute[start-runsvdir] action nothing (runit::default line 24)
docker: [2016-01-29T06:42:52+00:00] INFO: Processing execute[runit-hup-init] action nothing (runit::default line 33)
docker: [2016-01-29T06:42:52+00:00] INFO: Processing apt_package[runit] action install (runit::default line 64)
docker: [2016-01-29T06:42:55+00:00] INFO: Processing cookbook_file[/var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] action create (dynamically defined)
docker: [2016-01-29T06:42:55+00:00] INFO: cookbook_file[/var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] created file /var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed
docker: [2016-01-29T06:42:55+00:00] INFO: cookbook_file[/var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] updated file contents /var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed
docker: [2016-01-29T06:42:55+00:00] INFO: apt_package[runit] pre-seeding package installation instructions
==> docker: Killing the container: 1f87b0cf1fe71f07b580ae6b18415a79c23a1a32a40f5f0366be90f160977a50
Build 'docker' errored: Error executing Chef: Non-zero exit status: 137
I'm not entirely sure what is causing the code 137, and any help would be appreciated.
Update 1
I'm including a gist of the full debug output from Chef. It's much more verbose, mainly due it would seem to all of the attempts Ohai makes to get information.
https://gist.github.com/jrstarke/4c5f3b432aaee70c7f77
No references in here seem to suggest an out of memory error, at least on the docker host.
After much much digging, I found the problem. The underlying problem, and the solution were both found on an issue in cloudfoundry-incubator/garden-linux.
Apparently as part of the setup process one of the post init scripts for runit executes a kill -s HUP 1. Why I'm not entirely sure, but as they noted there, doing a trap '' HUP right before my apt-get install runit and a trap HUP afterwards totally solved my problem.
Check the OOM log on the host machine. Also you can use the execute_command configuration value to turn the log level to debug.
This answer seemed to work for me: https://stackoverflow.com/a/42398166/2878244
I had to increase the memory resources assigned to docker by going to the Docker Tab > Preferences > Advanced

Resources