谁在杀死我的docker集装箱?

Mesos→完成的任务我沙盒在标准输出文件中,我可以看到killTask​​信号:

Received killTask for task sources.b4e2c8e6-5b42-11e7-aec0-024227901b13 

标准输出文件的完整捕捉如下。 即使在收到killTask信号后,我的进程仍在运行。 即我的过程不会自行终止。

 
 2017-06-27 14:16:08,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:16:18,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:16:28,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:16:38,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:16:48,337 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:16:58,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息1,到目前为止发送的字节数为188
 2017-06-27 14:17:08,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:17:18,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:17:28,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送appmonitor消息1,发送字节数188
 2017-06-27 14:17:38,334 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息1,到目前为止发送的字节数为188
 2017-06-27 14:17:48,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息1,到目前为止发送的字节数为188
 2017-06-27 14:17:58,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:18:08,334 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:18:18,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:18:28,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息2,到目前为止发送的字节数为376
 2017-06-27 14:18:38,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:18:48,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息2,发送的字节数376到目前为止
 2017-06-27 14:18:58,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:19:08,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息2,到目前为止发送的字节数为376
 2017-06-27 14:19:18,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息2,发送的字节数为376到目前为止
 2017-06-27 14:19:28,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:19:38,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:19:48,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:19:58,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送appmonitor消息2,发送字节数为376
 2017-06-27 14:20:08,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:20:18,334 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:20:28,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:20:38,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
 2017-06-27 14:20:48,332 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  - 发送的appmonitor消息2,到目前为止发送的字节数为376
收到任务源的killTask​​.b4e2c8e6-5b42-11e7-aec0-024227901b13
 2017-06-27 14:20:58,333 INFO [Timer-0] com.informatica.vds.transport.ws.WSClient  -  appmonitor发送的消息2,到目前为止发送的字节数为376

完整的stderr文件如下所示:

获取信息:{“cache_directory”:“\ / tmp \ / mesos \ / fetch \ / slaves \ / 632f9d21-ae71-4cca-95e4-63e2b3dbd78e-S0”,“I0627 19:42:51.959991 7613 fetcher.cpp:533]项目 “:[{” 行动 “:” BYPASS_CACHE “ ”URI“:{ ”caching“:假的, ”可执行文件“:假的, ”提取“:真 ”值“:” 文件:\ / \ / \ /等\ /docker.tar.gz “}}],” sandbox_directory “:” \ / VAR \ / lib中\ / mesos \ /从站\ / 632f9d21-ae71-4cca-95e4-63e2b3dbd78e-S0 \ /框架\ / 0e528b66-37aa -4d7a-933e-4638aabf494a-0000 \ /执行人\ /sources.b4e2c8e6-5b42-11e7-aec0-024227901b13 \ /运行\ / 219c102b-28AE-41d5-b98f-11829315119e“}
 I0627 19:42:51.963241 7613 fetcher.cpp:444]获取URI'file:///etc/docker.tar.gz'
 I0627 19:42:51.963279 7613 fetcher.cpp:285]直接进入沙箱目录
 I0627 19:42:51.963295 7613 fetcher.cpp:222]获取URI'file:///etc/docker.tar.gz'
 I0627 19:42:51.964923 7613 fetcher.cpp:207]复制资源'/etc/docker.tar.gz'到'/ var / lib / mesos / slaves / 632f9d21-ae71-4cca -95e4-63e2b3dbd78e-S0 / frameworks / 0e528b66-37aa-4d7a-933e-4638aabf494a-0000 /执行器/ sources.b4e2c8e6-5b42-11e7-aec0-024227901b13 /运行/ 219c102b-28AE-41d5-b98f-11829315119e / docker.tar.gz”
 I0627 19:42:52.070482 7613 fetcher.cpp:123] Extracted'/ var / lib / mesos / slaves / 632f9d21-ae71-4cca-95e4-63e2b3dbd78e-S0 / frameworks / 0e528b66-37aa-4d7a-933e-4638aabf494a-0000 /执行者/ sources.b4e2c8e6-5b42-11e7-aec0-024227901b13 / runs / 219c102b-28ae-41d5-b98f-11829315119e / docker.tar.gz'到'/ var / lib / mesos / slaves / 632f9d21-ae71-4cca-95e4 -63e2b3dbd78e-S0 /框架/ 0e528b66-37aa-4d7a-933e-4638aabf494a-0000 /执行器/ sources.b4e2c8e6-5b42-11e7-aec0-024227901b13 /运行/ 219c102b-28AE-41d5-b98f-11829315119e”
 I0627 19:42:52.070533 7613 fetcher.cpp:582]从'/ var / lib / mesos / slaves / 632f9d21-ae71-4cca-95e4-63e2b3dbd78e-S0' /frameworks/0e528b66-37aa-4d7a-933e-4638aabf494a-0000/executors/sources.b4e2c8e6-5b42-11e7-aec0-024227901b13/runs/219c102b-28ae-41d5-b98f-11829315119e/docker.tar.gz”
 I0627 19:42:56.096325 7643 exec.cpp:162]版本:1.3.0
 I0627 19:42:56.101958 7647 exec.cpp:237]在代理程序上注册的执行程序632f9d21-ae71-4cca-95e4-63e2b3dbd78e-S0
警告:您的内核不支持交换限制function,或者未安装cgroup。 内存有限,无需交换。
   %总计%接收%Xferd平均速度时间时间时间当前
                                  Dload上传总花销左转速度

   0 0 0 0 0 0 0 0  - : - : -   - : - : -   - : - : -  0
 100 221 100 138 100 83 8657 5207  - : - : -   - : - : -   - : - : -  9200
 E0627 19:51:03.219312 7652 process.cpp:951]无法接受套接字:将来丢弃

消息您的内核不支持交换限制function,或者cgroup未安装。 内存有限,无需交换。 并且无法接受套接字:未来的丢弃似乎是扼杀我的容器的罪魁祸首。

我的问题是谁在5到10分钟后一次又一次地杀死我的容器?

我也更新了/etc/default/grub文件

 GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1" 

并重新启动我的系统,但没有进展。

对这个问题的任何见解。

我的Ubuntu VMWareconfiguration如下:

  1. 核心分配3
  2. 内存:6GB
  3. 硬盘:32 GB
  4. 几分钟后,我仍然只能运行一个容器。

[编辑:添加stderr文件的内容从/var/lib/mesos/slaves/29df799b-4797-41df-a005-465f211d286b-S0/frameworks/0e528b66-37aa-4d7a-933e-4638aabf494a-0000 executors/sources.a634642c-5bbc-11e7-ba8b-024239f32c24/runs/1bda209c-c2b8-4bb5-a41b-26361e00a284 ]

添加另一个作业的stderr文件内容。

获取信息:{“cache_directory”:“\ / tmp \ / mesos \ / fetch \ / slaves \ / 29df799b-4797-41df-a005-465f211d286b-S0”,I0628 10:15:45.951104 4357 fetcher.cpp:533]项目 “:[{” 行动 “:” BYPASS_CACHE “ ”URI“:{ ”caching“:假的, ”可执行文件“:假的, ”提取“:真 ”值“:” 文件:\ / \ / \ /等\ /docker.tar.gz “}}],” sandbox_directory “:” \ / VAR \ / lib中\ / mesos \ /从站\ / 29df799b-4797-41df-a005-465f211d286b-S0 \ /框架\ / 0e528b66-37aa -4d7a-933e-4638aabf494a-0000 \ /执行人\ /sources.a634642c-5bbc-11e7-ba8b-024239f32c24 \ /运行\ / 1bda209c-c2b8-4bb5-a41b-26361e00a284" }
 I0628 10:15:45.953835 4357 fetcher.cpp:444]提取URI'file:///etc/docker.tar.gz'
 I0628 10:15:45.953881 4357 fetcher.cpp:285]直接进入沙箱目录
 I0628 10:15:45.953974 4357 fetcher.cpp:222]获取URI'file:///etc/docker.tar.gz'
 I0628 10:15:45.956663 4357 fetcher.cpp:207]复制资源'/etc/docker.tar.gz'到'/ var / lib / mesos / slaves / 29df799b-4797-41df-a005-465f211d286b-S0 / frameworks / 0e528b66-37aa-4d7a-933e-4638aabf494a-0000 /执行器/ sources.a634642c-5bbc-11E7-ba8b-024239f32c24 /运行/ 1bda209c-c2b8-4bb5-a41b-26361e00a284 / docker.tar.gz”
 I0628 10:15:46.0​​61069 4357 fetcher.cpp:123] Extracted'/ var / lib / mesos / slaves / 29df799b-4797-41df-a005-465f211d286b-S0 / frameworks / 0e528b66-37aa-4d7a-933e-4638aabf494a-0000 /执行者/ sources.a634642c-5bbc-11e7-ba8b-024239f32c24 / runs / 1bda209c-c2b8-4bb5-a41b-26361e00a284 / docker.tar.gz'到'/ var / lib / mesos / slaves / 29df799b-4797-41df-a005 -465f211d286b-S0 /框架/ 0e528b66-37aa-4d7a-933e-4638aabf494a-0000 /执行器/ sources.a634642c-5bbc-11E7-ba8b-024239f32c24 /运行/ 1bda209c-c2b8-4bb5-a41b-26361e00a284'
 I0628 10:15:46.0​​61148 4357 fetcher.cpp:582]从'/ var / lib / mesos / slaves / 29df799b-4797-41df-a005-465f211d286b-S0' /frameworks/0e528b66-37aa-4d7a-933e-4638aabf494a-0000/executors/sources.a634642c-5bbc-11e7-ba8b-024239f32c24/runs/1bda209c-c2b8-4bb5-a41b-26361e00a284/docker.tar.gz”
 I0628 10:15:49.898803 4389 exec.cpp:162]版本:1.3.0
 I0628 10:15:49.903390 4390 exec.cpp:237]在代理上注册的执行程序29df799b-4797-41df-a005-465f211d286b-S0
警告:您的内核不支持交换限制function,或者未安装cgroup。 内存有限,无需交换。
   %总计%接收%Xferd平均速度时间时间时间当前
                                  Dload上传总花销左转速度

   0 0 0 0 0 0 0 0  - : - : -   - : - : -   - : - : -  0
 100 221 100 138 100 83 5385 3239  - : - : -   - : - : -   - : - : -  11500
 W0628 10:15:49.903390 4389 logging.cpp:91] RAW:来自用户0的进程3287的接收信号SIGTERM; 退出

目前在/var/lib/mesos-master.ERROR文件中没有创build新的日志/var/log/mesos-master.WARNING文件的内容:

日志文件创build于:2017/06/28 10:04:56
在机器上运行:ubuntu
日志行格式:[IWEF] mmdd hh:mm:ss.uuuuuu threadid file:line] msg
 W0628 10:04:56.387049 3193 authenticator.cpp:512]没有提供凭证,validation请求将被拒绝
 W0628 10:14:56.617103 3221 master.cpp:2011]代理632f9d21-ae71-4cca-95e4-63e2b3dbd78e-S0(ubuntu)在主站故障切换后10分钟内未重新注册; 标志着它无法访问

/var/log/mesos-slave.WARNING文件的内容与mesos-slave.ERROR文件的内容相同。 /var/log/mesos-slave.ERROR文件的内容:

日志文件创build于:2017/06/28 10:05:00
在机器上运行:ubuntu
日志行格式:[IWEF] mmdd hh:mm:ss.uuuuuu threadid file:line] msg
 E0628 10:05:00.712286 3287 shell.hpp:107]命令'hadoop version 2&1'失败; 这是输出:
 sh:1:hadoop:找不到
 E0628 10:24:45.502921 3326 slave.cpp:4496]正在运行任务sources.a634642c-5bbc的执行程序“sources.a634642c-5bbc-11e7-ba8b-024239f32c24”的容器1bda209c-c2b8-4bb5-a41b-26361e00a284的资源更新失败-11e7-ba8b-024239f32c24关于terminal任务的状态更新,销毁容器:无法确定cpu为'cpu'子系统:无法读取/ proc / 4469 / cgroup:无法打开文件:没有这样的文件或目录
 E0628 10:33:45.789072 3327 slave.cpp:4496]无法更新执行程序源的容器858170ce-0775-48be-8c85-3a1dbf320569的资源.e7e069ed-5bbd-11e7-ba8b-024239f32c24'正在运行任务sources.e7e069ed-5bbd -11e7-ba8b-024239f32c24关于terminal任务的状态更新,销毁容器:未能确定cpu为'cpu'子系统:无法读取/ proc / 5215 / cgroup:无法打开文件:没有这样的文件或目录

我观察到这个消息:

 Failed to read /proc/5215/cgroup: Failed to open file: No such file or directory 

只有当容器/任务被杀死的时候才会来。 而这些文件存在当前正在运行的容器。 谢谢。

马拉松似乎依靠用户来实施健康检查。 即如果我们在应用程序configuration中提供健康检查,我们必须执行它。 我删除了在应用程序configuration中提供的所有健康检查。 之后,马拉松将应用程序的健康状况显示为未知数,但现在马拉松(特别是mesos-slave)不会杀死任务。