How to check the reason why docker container stopped

angryTom
Release: 2020-03-31 18:00:22
Original
10854 people have browsed it

Docker How to troubleshoot the error when the container service stops? During the use of the container, if the service cannot be used, you need to troubleshoot the errors in the container and repair the operation.

How to check the reason why docker container stopped

How to check the reason why the docker container stopped

1. Docker ps -a queries the starting container instance Status, first determine whether the container is started

2. Docker port Check the port. If it is a rest interface, you can manually simulate the parameter call. Do not test the RPC interface

3. Docker logs Check the business log , determine whether it is a business abnormality

4. Docker is generally a microservice. In this case, you can check the monitoring information of the microservice monitoring center

5. If there is a call chain similar to Zipkin, it is Even better, you can see the calling information of the business process.

For example, docker error troubleshooting: Unable to enter the container. You can enter the self-built centos7 base, but you cannot enter the mysql distributed by rancher.

#docker exec -it 3c1d bashrpc 
error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container 
process caused "process_linux.go:110: decoding init error from pipe caused \"
read parent: connection reset by peer\""
Copy after login

The reason for the error is that the new version 1.13.1-84 can be used normally after being reduced to 1.13.1-75.

For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.

The above is the detailed content of How to check the reason why docker container stopped. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template