Error: docker build failed: docker build is disabled - docker

i am running one command on ubuntu terminal i.e:
kubectl hlf chaincode install --path=./chaincode --config=networkConfig.yaml --language=golang --label=supply --user=admin --peer=org1-peer1.fabric
But i am getting error
Error: Transaction processing for endorser [128.199.29.209:30906]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker build is disabled
how should i enable docker build?

Related

Error libnvidia-ml.so.1: cannot open shared object file raised when running docker image with gpu

The error:
nvidia-container-cli: initialization error: load library
failed: libnvidia-ml.so.1: cannot open shared object file: no
such file or directory: unknown
I am trying to use nvidia/cuda image in docker hub to use GPU.
So I run the code below with --gpus all.
docker run -it --gpus all -v --name my-gpu nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
But this gives me error which is as below.
Unable to find image 'nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04' locally
11.7.0-cudnn8-devel-ubuntu22.04: Pulling from nvidia/cuda
d19f32bd9e41: Already exists
292e5e4dcc78: Already exists
f027458ef473: Already exists
ad9cd0a3350e: Already exists
4c0e748dfb24: Already exists
e40f2cbf6f5e: Pull complete
3ac150f167fe: Pull complete
dd80ebac36de: Pull complete
fd2716719ab6: Pull complete
e5ff1925518e: Pull complete
Digest: sha256:1055a2fa47b063336f578f390131efa4bb02fbfe095608481fd32b6fca9b8b32
Status: Downloaded newer image for nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
ERRO[0465] error waiting for container: context canceled
But if I run the same code with sudo, it works completely fine.
sudo docker run -it --gpus all --name my-container-03 nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
How can I make it run without sudo? I must not run with sudo in my case now.
It was solved when I installed docker desktop.

Chaincode container getting created but not starting

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.

Hyperledger Fabric Chaincode Installation Failed - no matching manifest for linux/arm64/v8

I am doing the Hyperledger Fabric Tutorial: Running a Fabric Application and I am at the Set up the Blockchain network section. I am using M1 MacBook Pro, and I need to deploy the chaincode using
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript
Unfortunately it failed with the result
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-nodeenv:2.3: no matching manifest for linux/arm64/v8 in the manifest list entries
Chaincode installation on peer0.org1 has failed
Deploying chaincode failed
I am very new to docker and hyperledger fabric, so I am unsure what I should do regarding docker failing to pull hyperledger/fabric-nodeenv:2.3, and the problem with linux/arm64/v8 not in the manifest list entries.
Note that I am using M1 MacBook Pro and this is my current machine and the operating system running on it:
Darwin Edmunds-MBP 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 x86_64
You can pull the image with linux platform first, before run command from the tutorial.
docker pull --platform linux/x86_64 hyperledger/fabric-nodeenv:2.3
I had the same issue and I tried to resolve the issue for days. Here is what you need to do:
Before you run:
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript
Run this command:
docker pull --platform linux/x86_64 hyperledger/fabric-javaenv:2.4
After that run the chaincode initialization command again.

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error

my docker starts giving error after a recent update. Existing containers works but I can not build or run any image.
A simple
docker run hello-world
gives me an error:
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/881b53be5cfe91d19577414c2f4a52dd06804624fe1d2189d06c1c3c13f2b4d1/log.json: no such file or directory): runc did not terminate successfully: unknown.
I tried all the tips that are suggested on the internet regarding this issue as restarting, building links, reinstall.....
My current docker version is 18.09.5, Ubuntu 19.04
Does anyone had a similar issue and solved it?
To check the issue by run docker in the debug mode.
stop docker with systemctl stop docker
run docker in debug mode dockerd --debug
start container with docker start container_name
Then check the output in docker debug console in 2.
In my case, it shows
ERRO[2020-07-07T23:15:02Z] stream copy error: reading from a closed fifo
ERRO[2020-07-07T23:15:02Z] stream copy error: reading from a closed fifo
And solve it by removing the container state folder with rm -rf /var/run/docker/runtime-runc/moby/docker_id
Then start your container.
Refer to: Solving Error response from daemon OCI runtime create failed container with id exists
Check the output of docker version and see if the client version and daemon version have gone out of sync.
Check the output of following commands which runc and which docker-runc. If the docker daemon version is 18.09, you should be having runc or else docker-runc.
I use debian 11 with docker 20.10.5, When I run docker run hello-world I got:
docker: Error response from daemon: OCI runtime create failed: unable
to retrieve OCI runtime error (open
/run/containerd/io.containerd.runtime.v2.task/moby/2957ad06a6bc7a4f7c7f3fca6b43bde1d6b27600df774f0e8052f4c736300759/log.json:
no such file or directory): runc did not terminate successfully: exit
status 139: unknown. ERRO[0010] error waiting for container: context
canceled
when I run runc command , I got "segmentation fault".
I solved it by apt reinstall runc.
I was trying to run docker as docker run ... my_external_script.py. Because my_external_script.py wasn't w/in the docker image I was getting the error. What I did was to set the scripts argument w/in my setup.py as scripts=["path/to/my_external_script.py"] and rebuild docker image. That solved the problem.

operation not permitted Error response from daemon: Cannot start container System error: operation not permitted

I have installed ArchLinux on docker in raspberryPi 2 and loaded basic image hello-world.
I am getting this error:
[root#alarmpi ~]# docker run hello-world
operation not permitted Error response from daemon: Cannot start container System error: operation not permitted
But I want to run mongo db image on docker of arch linux.

Resources