Tag Archives: docker

Docker Create tomcat Error standard_init_linux.go:211: exec user process caused “no such file or directory”

Using the command before Tomcat creates a container

docker pull tomcat
docker run -it -P tomcat

Report the following error: Standard_ init_ linux.go:211 : exec user process caused “no such file or directory”

Solution:

Use other Tomcat images to create Tomcat container and run it successfully

docker run -d --name tomcat -p 8888:8080 registry.cn-hangzhou.aliyuncs.com/youdao/tomcat

Speculation: before using the docker hub with the highest number of stars, there was a problem, indicating that this kind of file and directory could not be found. Maybe the image was damaged when downloading

If we use the new container to download and run, it’s OK

Personal test!!! This error is the download image is damaged! The docker needs to be unloaded clearly. Remember to clear all the associated file directories

[neo4j] error report when visiting neo4j in spring boot project

Spring boot project uses spring-data-neo4j to connect with neo4j. It can start and access the database normally when running locally all the time. If you write dockerfile well and run on the server with docker compose, you will report an error, such as:

Caused by: java.lang.NullPointerException: null
    at org.neo4j.ogm.MetaData.entityType(MetaData.java:280) 

The reasons are as follows:
https://github.com/spring-projects/spring-boot/issues/6709

stay pom.xml To solve the problem, add dependency to

 <!--Not adding this package to run in docker will report an error-->
 <!--https://github.com/spring-guides/gs-accessing-data-neo4j/issues/19-->
        <dependency>
            <groupId>io.github.lukehutch</groupId>
            <artifactId>fast-classpath-scanner</artifactId>
            <version>3.1.13</version>
        </dependency>

[docker] error in deleting image: image is referenced in multiple repositories

Error in deleting according to image ID:

[root@master-gxf zipkin-ui]# docker rmi 66ce95468449
Error response from daemon: conflict: unable to delete 66ce95468449 (must be forced) - image is referenced in multiple repositories

Docker images finds that the same image ID is tagged into multiple different warehouses

[root@master-gxf zipkin-ui]# docker images
REPOSITORY                                 TAG                 IMAGE ID            CREATED             SIZE
blanchedingding/zipkin-ui                  logvisualization    66ce95468449        23 minutes ago      78.8MB
doraemon/zipkin-ui                         logvisualization    66ce95468449        23 minutes ago      78.8MB
zipkin-ui                                  latest              66ce95468449        23 minutes ago      78.8MB

Use R epository:tag You can delete it in the following way:

[root@master-gxf zipkin-ui]# docker rmi doraemon/zipkin-ui:logvisualization
Untagged: doraemon/zipkin-ui:logvisualization
[root@master-gxf zipkin-ui]# docker images
REPOSITORY                                 TAG                 IMAGE ID            CREATED             SIZE
blanchedingding/zipkin-ui                  logvisualization    66ce95468449        25 minutes ago      78.8MB
zipkin-ui                                  latest              66ce95468449        25 minutes ago      78.8MB

The docker installation es reported an error of failed; error = – cannot allocate memory ‘(errno = 12)

The solution executes the following command to allocate memory initially. The reason for the error is that the memory is not enough.
the ES image I downloaded is 5.6.8. Modify the version number according to my own situation
docker run - D - P 9200:9200 - P 9300:9300 -- name = es_ " -e ES_ JAVA_ OPTS="-Xms256m -Xmx256m" elas ticsearch:5.6.8
after the command is executed, the pro test is available

Docker delete error response from daemon: Conflict: unable to delete xxxxx solution

An error is reported when the docker image is deleted. After docker images , the output is as follows:

REPOSITORY                             TAG                        IMAGE ID            CREATED             SIZE
nvidia/cuda                            9.0-base                   74f5aea45cf6        6 weeks ago         134MB
paddlepaddle/paddle                    1.1.0-gpu-cuda8.0-cudnn7   b3cd25f64a2a        8 weeks ago         2.76GB
hub.baidubce.com/paddlepaddle/paddle   1.1.0-gpu-cuda8.0-cudnn7   b3cd25f64a2a        8 weeks ago         2.76GB
paddlepaddle/paddle                    1.1.0-gpu-cuda9.0-cudnn7   0df4fe3ecea3        8 weeks ago         2.89GB
hub.baidubce.com/paddlepaddle/paddle   1.1.0-gpu-cuda9.0-cudnn7   0df4fe3ecea3

The first image is successfully deleted by docker RMI 74f5aea45cf6 directly. However, the latter two images appear in pairs, and the direct docker RMI deletion fails. The error message is as follows:

Error response from daemon:
conflict: unable to delete b3cd25f64a2a (must be forced) - image 
is referenced in multiple repositories

Solution:

First, specify a name when docker RMI , instead of image ID , and then execute docker RMI - f image ID J

docker rmi paddlepaddle/paddle:1.1.0-gpu-cuda8.0-cudnn7
docker rmi -f b3cd25f64a2a

Docker command error during connect: get http://2F2F.2Fpipe2Fdocker_ engine/v1.36/containers/json: open//.

Error during connect: get http://% 2F% 2F.% 2fpipe% 2fdocker_ engine/v1.36/containers/json: open //./pipe/docker_ Engine: the system cannot find the file specified. In the default configuration on windows, the docker client must be run upgraded to connect. This error may also indicate that the docker day is not running.
the error message is as follows:

resolvent

1. Execute command: docker machine env default

2. Method 1: copy the displayed command for execution

after execution, execute docker PS and other commands, and you can use it normally
3. Method 2: only the last REM @ for/F "tokens = *"% I in ('docker machine env default ') do @% I The command is executed without REM, that is, @ for/F "tokens = *"% I in ('docker machine env default ') do @% I

after execution, the docker command can be used normally, and the environment variable needs to be set first for each new CMD window.
Note: when using method 2 in bat script, if you directly put for statement into bat script to run, an error will be reported. Change % I in the command to %% I . For details, please refer to my other article, bat script execution for error reporting

The docker runtime container reported an error: error response from daemon: OCI runtime create failed

Today, when the virtual machine runs docker image, it always reports an error (the specific reason for the error remains to be analyzed). After checking the system kernel and operating system version, no result is found.

[ root@bogon ~]# cat /etc/redhat-release

CentOS Linux release 7.2.1511 (Core)

[ root@bog [ root@bogon ~]# docker version
Client:
Version: 17.12.1-ce
API version: 1.35
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:15:20 2018
OS/Arch: linux/amd64

Server:
Engine:
Version: 17.12.1-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:17:54 2018
OS/Arch: linux/amd64

Experimental: false

Error information:

[ root@bogon yum.repos .d]# docker run -it centos echo haha

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/ io.containerd.runtime .v1.linux/moby/6602807a7f1a03689a847741b0a10171788f7bed2aa92a4dff35c429b02248d1/ log.json : no such file or directory): docker-runc did not terminate sucessfully: docker-runc: symbol lookup error: docker-runc: undefined symbol: seccomp_ version

resolvent:

Upgrade the system to 7.4

It takes a long time to execute Yum update and wait patiently.

[ root@bogon ~]# cat /etc/redhat-release

CentOS Linux release 7.4.1708 (Core)

[ root@bogon ~]# docker run -it centos echo haha

haha

Another solution is to install a lower version of docker, which is highly dependent on the version of the operating system. You must pay attention to it when installing!

Foreigners interpret it as follows:

RHEL 7.2 is no longer supported and Docker does not test their release against unsupported versions. You need to upgrade your OS, preferably to 7.4, to resolve this issue.

I’ve seen a few people with similar issues in the past few days that resolved this same error message by upgrading their OS. Some of the older packages no longer work with newer docker releases. One of those problems is an outdated libseccomp: https://github.com/moby/moby/issues/35906

Error: path not specified when the docker 1.7 file is uploaded to the container in CentOS

I tried to find many ways to transfer files to the docker container on the Internet, and found a bug in version 1.7

docker cp e0ce13a27784:/home/website/default  /appuweichao/credit_ passport/web/

Error: Path not specified

The error message “error: path not specified” has been fixed in docker 1.8.0.

Error: path not specified

Solution: copy from the host to the container’s Mount directory

First, get the real ID of the container

docker inspect -f ‘{{.Id}}’ c37ca9beb746

cp /home/yulong/Downloads/file.txt /var/lib/docker/devicemapper/mnt/c37ca9beb7463630eddca6259bd26620cc60d413ae4869e1e0f96a21ad602155/rootfs/mnt

/var/lib/docker/devicemapper/mnt/c37ca9beb7463630eddca6259bd26620cc60d413ae4869e1e0f96a21ad602155/rootfs/mnt

This folder is actually a local shared folder where the container is mounted

Here are the folders for all the containers

c37ca9beb7463630eddca6259bd26620cc60d413ae4869e1e0f96a21ad602155

After entering the terminal/MNT, you can see it below file.txt It’s a document

 

Docker builds the pit that Seata stepped on. can not connect to services-server

An error is reported when the system starts: can not connect to services server.
Always connect to the intranet IP by default, but my configuration file specifies the extranet.

2020-07-29 14:53:39.075 ERROR 20356 --- [           main] i.s.c.r.netty.NettyClientChannelManager  : 0101 can not connect to 172.19.231.5:8091 cause:can not register RM,err:can not connect to services-server.
 
io.seata.common.exception.FrameworkException: can not register RM,err:can not connect to services-server.
	at io.seata.core.rpc.netty.NettyClientChannelManager.doConnect(NettyClientChannelManager.java:210) ~[seata-all-1.3.0.jar:1.3.0]
	at io.seata.core.rpc.netty.NettyClientChannelManager.acquireChannel(NettyClientChannelManager.java:103) ~[seata-all-1.3.0.jar:1.3.0]
	at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:175) ~[seata-all-1.3.0.jar:1.3.0]

The configuration address of the mount directory is not easy to use, or it can’t be connected, and the error has been reported all the time

docker run -id --name seata-server -p 8091:8091 \
-v /java/seata/resources/file.conf:/seata-server/resources/file.conf \
-v /java/seata/resources/registry.conf:/seata-server/resources/registry.conf \
-v /java/seata/logs:/root/logs \
seataio/seata-server:1.3.0 /bin/bash

Finally, IP and final version should be specified at runtime to solve the problem

 docker run -id --name seata-server -p 8091:8091 \
> -e SEATA_IP=192.168.23.129 \
> -e SEATA_PORT=8091 \
> -v /java/seata/resources/file.conf:/seata-server/resources/file.conf \
> -v /java/seata/resources/registry.conf:/seata-server/resources/registry.conf \
> -v /java/seata/logs:/root/logs \
> seataio/seata-server:1.3.0

Docker install zookeeper 3.6.2

1. Install image

 docker pull zookeeper:3.6.2

2. Start ZK

 docker run --privileged=true -d --name zookeeper -p 2181:2181  \
 -v /home/workspace/zookeeper/data:/data \
 -v /home/workspace/zookeeper/logs:/datalog \
 -d zookeeper:3.6.2

3. Go to ZK image summary

 docker exec -it zookeeper /bin/bash

3. View ZK log

 docker logs -f zookeeper 

4. Validation and FAQs

Refer to my last article:

https://blog.csdn.net/qq_ 42390636/article/details/114986157

Error response from daemon: Get https://20.0.0.100/v2/: dial tcp 20.0.0.100:443: connect: connection

Error response from: get https://20.0.0.100/v2/ : dial tcp 20.0.0.100:443: connect: connection refused

The reason for this problem is that the docker registry uses HTTPS by default, but the private mirror is built
like HTTP service by default, so the following error occurs when interacting with the private mirror.

Solution:
you must first specify the address of the private warehouse — insure registry

[root@client ~]# vim /usr/lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry 20.0.0.10 --containerd=/run/containerd/containerd.sock

[root@client ~]# systemctl daemon-reload 
[root@client ~]# systemctl restart docker

Log in to harbor again: