Hyperledger-Fabric: v2.3.3
Peer docker image: tag 2.3.3
Error on peer logs after committing chaincode:
ERRO 036 start-could not start container: API error (400): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "chaincode": executable file not found in $PATH: unknown
WARN 037 could not launch chaincode 'test_v1_v1:65f5b95ca7ff438e02a86aea4205bcd697a2afa0f4e37c314d3011667357fe50': error starting container: error starting container: API error (400): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "chaincode": executable file not found in $PATH: unknown
docker ps -a shows that chaincode container status: Created.
I tried restarting peers and orderer, but same error
*Note: Comment if I should provide any specific configuration or anything to understand the problem.
The problem was that the package name in chaincode file was not "main" (I thought that we have to name it as parent directory).
So, the binary was not getting generated after the chaincode was committed. As a result when the peer was trying to launch/run chaincode container it was saying that I don't have binary/executable file to run.
After changing package name to "main" and doing packaging, installation and commit process the chaincode container started.
*NOTE: This is my understanding of the problem, please let me know if anything written above is misconception/ wrong.
Related
while starting containers by the command "sudo ./fabricNetwork.sh up" where fabricNetwork.sh is the shell script for starting containers I get the following error for the container "chaincode"
"Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
Error: failed to start containers: chaincode"
how to resolve this error
I tried changing the shebang line at the beginning of shell script from "#!/bin/bash" to "#!/bin/sh" but it gave me the error "./fabricNetwork.sh: 8: ./fabricNetwork.sh: Syntax error: "(" unexpected". Any ideas how to resolve the error.
That error message looks like it is coming from the container itself, rather than your shell script. I'm not sure if it is wise to use sudo on your script, according to different sources that I have read over the years. It is better if the owner of the shell script is added to the docker group, if you are running the script on Ubuntu.
since today i have got an error message with various docker commands. Unfortunately I don't really know what to do with it. Does anyone have any idea what the problem could be and how I fix it?
Error:
OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: process_linux.go:95: starting setns process caused: fork/exec /proc/self/exe: resource temporarily unavailable: unknown
Another Error:
ERROR: for hosting_mail_1 Cannot start service mail: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/5fabf9edf67fbd6455bdc955c56c063683aa78e8e31514660661799aaa867391/log.json: no such file or directory): runc did not terminate successfully: unknown
ERROR: for mail Cannot start service mail: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/5fabf9edf67fbd6455bdc955c56c063683aa78e8e31514660661799aaa867391/log.json: no such file or directory): runc did not terminate successfully: unknown
ERROR: Encountered errors while bringing up the project.
I don't know if you solved your problem finally, but this really looks like bad file system authorization that may have been corrupted from an update on the file systems.
Regarding the error : container_linux.go:370:,/run/containerd/io.containerd.runtime.v2.task/moby/5fabf9edf67fbd6455bdc955c56c063683aa78e8e31514660661799aaa867391/log.json
I can see that :
docker manage to initiate a volume ID
did not manage to mount that volume on the disk
0/ Check docker basic command
docker ps
docker images
docker pull ubuntu:latest
If one of these commands is failing, you are up to review docker installation, seems that maybe docker is not installed properly.
1/
To check if you need to completely re-install docker, you may try the following basic command
docker run --name checkDocker -it ubuntu:latest bash
If this is not displaying any docker shell, then you have a problem on running a container, not necessarly docker installation.
2/
Check your docker volumes and rights, I don't have your installation setup, but It seems you are using docker-compose and maybe there is some conflicts when mounting the volume of your containers with specific rights and the host's rights and user id
3/
If you are ending up here you should follow that work around of re-installation, which would be the fatest solution to restore your application if you have backup (hope you have )
This question already has answers here:
Cannot start docker container In docker CE on oracle linux
(5 answers)
Closed 3 years ago.
I am trying to build an agent on the linux machine using docker. Everything was working fine and i was able to create the agent. But suddenly it was showing offline. When i tried to recreate the agent it was throwing below error:-
ERROR: for build-agent_dl-build-agent_1 Cannot start service dl-build-agent: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown
ERROR: for dl-build-agent Cannot start service dl-build-agent: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown
ERROR: Encountered errors while bringing up the project.
even if i am trying to run a simple docker command 'docker run hello-world' i am getting below error,
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown.
ERRO[0000] error waiting for container: context cancelled
Any suggestions?
Below command solved my issue,
sudo semanage permissive -a container_runtime_t
Please follow below link for more details,
Cannot start docker container In docker CE on oracle linux
Thanks #leopal for suggestion.
I am able to generate the genesis block but when i try to start the peer to peer test network by using "UP" command it gives an error that execution failed as it cannot find the file scripts/script.sh.
I already added the path of my directory in the Virtual Machine of the docker toolbox.
note: I am using docker toolbox on windows 10: home and working with hyperledger fabric.
OCI runtime exec failed: exec failed: container_linux.go:345: starting
container process caused "exec: \"scripts/script.sh\": stat
scripts/script.sh: no such file or directory": unknown
ERROR !!!! Test failed
I'm using meteor-up to deploy to docker instances inside an LXD container. When it attempts to bring up a MongoDB docker instance, it fails with the following error:
docker: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "process_linux.go:368: container init caused \"rootfs_linux.go:57: mounting \\\"proc\\\" to rootfs \\\"/var/lib/docker/vfs/dir/20a621a73755db3f4030bc67bbf7ff9540bd1d63bb348d8be440d8ca63d3c922\\\" at \\\"/proc\\\" caused \\\"permission denied\\\"\"".
I've tried deploying as the ubuntu user to my LXD container, and as root, and that hasn't helped. There's obviously some permissions issue here, but I don't know where to start debugging this problem.
According to https://discuss.linuxcontainers.org/t/having-trouble-using-docker/383 it sounds like you might need to set security.nesting=true. Stop the container (lxc stop deploy-container), configure nesting on (lxc config set deploy-container security.nesting true as per https://insights.ubuntu.com/2015/10/30/nested-containers-in-lxd) and lxc start deploy-container.
For Proxmox users: https://www.youtube.com/watch?v=79KiCBNbsbg
Enable Nesting feature on the container to fix the following error
ERROR: for mysql-8.0 Cannot start service mysql-8.0:
failed to create shim: OCI runtime create failed:
container_linux.go:380: starting container process caused: process_linux.go:545:
container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at
"/proc" caused: mount through procfd: permission denied: unknown
But other users Proxmox users say to enable keyctl too.
If you still have errors you may need to remove domain_name and hostname from the docker-compose config to fix the following errors as said here.
ERROR: for mariadb10-4 Cannot start service mariadb10-4: failed to create shim: OCI runtime create failed: container_linux.go:380:
starting container process caused: process_linux.go:545:
container init caused: write sysctl key kernel.domainname:
open /proc/sys/kernel/domainname: permission denied: unknown