Docker 1.9容器突然停止

前端之家收集整理的这篇文章主要介绍了Docker 1.9容器突然停止前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我有一个托管Java应用程序的docker容器.但很多时候我看到应用程序已关闭且docker未运行.

在/var/log/daemon.log中,我只看到以下信息,没有错误

Oct 10 10:54:58 or4 docker[18366]: time="2016-10-10T10:54:58.875341257+05:30" level=info msg="POST /v1.21/containers/c1a64d308f45/stop?t=10"
Oct 10 10:54:59 or4 systemd-sysctl[100591]: Overwriting earlier assignment of net/ipv4/tcp_tw_recycle in file '/etc/sysctl.d/99-sysctl.conf'.

以下是docker logs< container id>的输出.

2016-10-10 10:53:57,242 WARN received SIGTERM indicating exit request
2016-10-10 10:53:57,243 INFO waiting for orchestrator to die
2016-10-10 10:53:57,243 INFO stopped: orchestrator (terminated by SIGTERM)
2016-10-10 11:31:21,137 CRIT Supervisor running as root (no user in config file)
2016-10-10 11:31:21,137 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2016-10-10 11:31:21,170 INFO RPC interface 'supervisor' initialized
2016-10-10 11:31:21,170 WARN cElementTree not installed,using slower XML parser for XML-RPC
2016-10-10 11:31:21,171 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-10-10 11:31:21,171 INFO supervisord started with pid 1
2016-10-10 11:31:22,174 INFO spawned: 'orchestrator' with pid 6
2016-10-10 11:31:23,863 INFO success: orchestrator entered RUNNING state,process has stayed up for > than 1 seconds (startsecs)
2016-10-10 14:31:43,490 WARN received SIGTERM indicating exit request
2016-10-10 14:31:43,491 INFO waiting for orchestrator to die
2016-10-10 14:31:43,491 INFO stopped: orchestrator (terminated by SIGTERM)
2016-10-10 14:50:10,217 CRIT Supervisor running as root (no user in config file)
2016-10-10 14:50:10,217 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2016-10-10 14:50:10,258 INFO RPC interface 'supervisor' initialized
2016-10-10 14:50:10,258 WARN cElementTree not installed,using slower XML parser for XML-RPC
2016-10-10 14:50:10,258 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-10-10 14:50:10,258 INFO supervisord started with pid 1
2016-10-10 14:50:11,261 INFO spawned: 'orchestrator' with pid 6
2016-10-10 14:50:13,103 INFO success: orchestrator entered RUNNING state,process has stayed up for > than 1 seconds (startsecs)
2016-10-10 14:57:48,522 WARN received SIGTERM indicating exit request
2016-10-10 14:57:48,522 INFO waiting for orchestrator to die
2016-10-10 14:57:48,523 INFO stopped: orchestrator (terminated by SIGTERM)
2016-10-10 15:43:04,028 CRIT Supervisor running as root (no user in config file)
2016-10-10 15:43:04,028 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2016-10-10 15:43:04,059 INFO RPC interface 'supervisor' initialized
2016-10-10 15:43:04,059 WARN cElementTree not installed,using slower XML parser for XML-RPC
2016-10-10 15:43:04,059 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-10-10 15:43:04,059 INFO supervisord started with pid 1
2016-10-10 15:43:05,061 INFO spawned: 'orchestrator' with pid 6
2016-10-10 15:43:06,561 INFO success: orchestrator entered RUNNING state,process has stayed up for > than 1 seconds (startsecs)

下面是docker文件.

FROM nocindia/java:java8-mvn3.2.5
MAINTAINER "a@a.com"

RUN ln -fns /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

RUN apt-get update && apt-get install -y unzip imagemagick mediainfo

ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV SERVICEMIX_VERSION_MAJOR=F
ENV SERVICEMIX_VERSION_MINOR=I 
ENV SERVICEMIX_VERSION_PATCH=L.M2 
ENV SERVICEMIX_VERSION=${SERVICEMIX_VERSION_MAJOR}.${SERVICEMIX_VERSION_MINOR}.${SERVICEMIX_VERSION_PATCH} 
RUN wget http://www-us.apache.org/dist/servicemix/servicemix-${SERVICEMIX_VERSION_MAJOR}/${SERVICEMIX_VERSION}/apache-servicemix-${SERVICEMIX_VERSION}.zip && \
    unzip -d /opt apache-servicemix-${SERVICEMIX_VERSION}.zip && \
    rm -f apache-servicemix-${SERVICEMIX_VERSION}.zip; 

#  For Karaf Web Console
EXPOSE 8181 

# Orchestrator service running inside karaf
EXPOSE XXXX

# For connecting to karaf console remotely via Karaf client
EXPOSE AAAA

# running mvn tests
EXPOSE BBBBB

# running file upload service
EXPOSE DDDDD

# remove the unwanted files which saves some MB's
RUN apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y \
        && cp -R /usr/share/locale/en\@* /tmp/ && rm -rf /usr/share/locale/* && mv /tmp/en\@* /usr/share/locale/ \
        && rm -rf /var/cache/debconf/*-old && rm -rf /usr/share/doc/*

ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

ADD timezone /etc/timezone

CMD ["/usr/bin/supervisord"]

AAAA,XXXX等是占位符.

有人可以解释一下可能出现的问题,我该如何调试此问题?

环境:-

> Docker 1.9
> Debian 8 64位

最佳答案
问题不在于Docker或其任何配置.外部进程定期重新启动docker,而docker又重新启动了docker中运行的orchestrator进程.
原文链接:https://www.f2er.com/docker/437119.html

猜你在找的Docker相关文章