2016-10-20 5 views
2

내 컨테이너가 다음 오류로 인해 자동으로 다시 시작되는 횟수가 여러 번 있습니다. 컨테이너가 ec2 인스턴스의 요리사와 함께 실행됩니다. 다음은 로그라고한다Docker ContainerID 사용할 수 없음

time="2016-10-19T23:23:36.382529790Z" level=info msg="GET /v1.16/containers/container1/json" 
time="2016-10-19T23:23:36.382715521Z" level=error msg="Handler for GET /v1.16/containers/container1/json returned error: no such id: container1" 
time="2016-10-19T23:23:36.382746955Z" level=error msg="HTTP Error" err="no such id: container1" statusCode=404 
time="2016-10-19T23:23:36.383675061Z" level=info msg="GET /v1.16/containers/container1/json" 
time="2016-10-19T23:23:36.383781507Z" level=error msg="Handler for GET /v1.16/containers/container1/json returned error: no such id: container1" 
time="2016-10-19T23:23:36.383807920Z" level=error msg="HTTP Error" err="no such id: container1" statusCode=404 
time="2016-10-19T23:23:36.384686602Z" level=info msg="GET /v1.16/containers/container1/json" 

> 도커 버전

docker version 
Client: 
Version:  1.9.1 
API version: 1.21 
Go version: go1.4.2 
Git commit: a34a1d5/1.9.1 
Built: 
OS/Arch:  linux/amd64 

Server: 
Version:  1.9.1 
API version: 1.21 
Go version: go1.4.2 
Git commit: a34a1d5/1.9.1 
Built: 
OS/Arch:  linux/amd64 
> 도커 정보

docker info 
Containers: 1 
Images: 50 
Server Version: 1.9.1 
Storage Driver: devicemapper 
Pool Name: docker-202:1-263798-pool 
Pool Blocksize: 65.54 kB 
Base Device Size: 107.4 GB 
Backing Filesystem: 
Data file: /dev/loop0 
Metadata file: /dev/loop1 
Data Space Used: 5.981 GB 
Data Space Total: 107.4 GB 
Data Space Available: 40.37 GB 
Metadata Space Used: 4.989 MB 
Metadata Space Total: 2.147 GB 
Metadata Space Available: 2.142 GB 
Udev Sync Supported: true 
Deferred Removal Enabled: false 
Deferred Deletion Enabled: false 
Deferred Deleted Device Count: 0 
Data loop file: /var/lib/docker/devicemapper/devicemapper/data 
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata 
Library Version: 1.02.93-RHEL7 (2015-01-28) 
Execution Driver: native-0.2 
Logging Driver: json-file 
Kernel Version: 4.1.13-19.30.amzn1.x86_64 
Operating System: Amazon Linux AMI 2015.09 
CPUs: 1 
Total Memory: 3.679 GiB 
Name: container1 
ID: ARKR:MFOG:UO6J:LRZS:336R:TNTE:QTIA:64GD:B6HD:CRU6:G2YE:AWLZ 
Username: test 
Registry: https://index.docker.io/v1/ 
WARNING: bridge-nf-call-iptables is disabled 
WARNING: bridge-nf-call-ip6tables is disabled 
다음

은/var/log/messages 파일

의 로그입니다
Oct 19 10:15:04 ip-10-2-130-44 kernel: [14529077.356962] veth98ee000: renamed from eth0 
Oct 19 10:15:04 ip-10-2-130-44 kernel: [14529077.368372] docker0: port 1(veth85fc3ec) entered disabled state 
Oct 19 10:15:04 ip-10-2-130-44 kernel: [14529077.400306] docker0: port 1(veth85fc3ec) entered disabled state 
Oct 19 10:15:04 ip-10-2-130-44 kernel: [14529077.411398] device veth85fc3ec left promiscuous mode 
Oct 19 10:15:04 ip-10-2-130-44 kernel: [14529077.413684] docker0: port 1(veth85fc3ec) entered disabled state 
Oct 19 10:15:04 ip-10-2-130-44 kernel: [14529077.491597] XFS (dm-1): Unmounting Filesystem 
Oct 19 10:15:07 ip-10-2-130-44 ntpd[3332]: Deleting interface #972 veth85fc3ec, fe80::1cd7:99ff:fe84:1495#123, interface stats: received=0, sent=0, droppedd 
=0, active_time=29844 secs 
Oct 19 10:15:16 ip-10-2-130-44 kernel: [14529088.927071] XFS (dm-1): Mounting V4 Filesystem 
Oct 19 10:15:16 ip-10-2-130-44 kernel: [14529088.935124] XFS (dm-1): Ending clean mount 

이전에이 오류가 발생했습니다. 필요한 추가 정보가 있으면 알려주십시오.

답변

1

이 정확한 오류가 발생했으며 컨테이너에 대한 JSON 구성과 관련된 문제가 발생할 때마다 발생합니다. 필자의 경우 add-host 항목에 typo가 있는데 여기에 'a : b'대신 'a :: b'를 추가했습니다. 그것을 이해하는 데 1 시간이 걸렸습니다.

0

이 오류를 재현 할 수있었습니다. 도커 호스트에없는 컨테이너를 쿼리하면 statusCode = 404 오류가 발생합니다.

# curl <dockerMachineIP>:2376/v1.21/containers/<validContainerName>/json은 컨테이너에 대한 모든 세부 정보를 제공합니다.

유효하지 않은 컨테이너 ID로 말려 있으면 statusCode = 404 오류가 발생합니다.