首页 > 解决方案 > 无法在 Mesosphere DC/OS 上旋转 dockerized cassandra 集群

问题描述

谁能想到使用 Docker 在 Mesosphere DC/OS 上创建 Cassandra 集群?

问题是 Cassandra 容器每隔几秒钟就会启动一次。

Marathon 似乎无法获取新创建容器的健康状态,因为它不断地创建新容器。在 DC/OS GUI 服务调试中,它显示

State: TASK_FAILED
Message: Container terminated with signal Broken pipe

在检查机器时,容器已启动并运行,并且每隔一两分钟就会重复创建新容器。

为什么 marathon 没有从它已经成功启动的容器中得到正确的响应,以便它可以停止创建一个新的?

我正在共享该服务的当前 JSON 配置。卡桑德拉.json

{
 "id": "/cassandra",
 "acceptedResourceRoles": [
   "*"
 ],
 "backoffFactor": 1.15,
 "backoffSeconds": 1,
 "container": {
   "portMappings": [
     {
       "containerPort": 8000,
       "hostPort": 0,
       "protocol": "tcp",
       "servicePort": 10003,
       "name": "main"
     }
   ],
   "type": "DOCKER",
   "volumes": [],
   "docker": {
     "image": "cassandra:3.9",
     "forcePullImage": false,
     "privileged": false,
     "parameters": []
   }
 },
 "cpus": 3,
 "disk": 10000,
 "instances": 1,
 "maxLaunchDelaySeconds": 300,
 "mem": 6000,
 "gpus": 0,
 "networks": [
   {
     "mode": "container/bridge"
   }
 ],
 "requirePorts": false,
 "upgradeStrategy": {
   "maximumOverCapacity": 1,
   "minimumHealthCapacity": 1
 },
 "killSelection": "YOUNGEST_FIRST",
 "unreachableStrategy": {
   "inactiveAfterSeconds": 0,
   "expungeAfterSeconds": 0
 },
 "fetch": [],
 "constraints": []
}
DC/OS open source version 1.13
Marathon Version 1.8.194

如果有人知道发生了什么,请帮忙?如果需要,我可以分享更多细节。

标签: dockercassandramarathondcos

解决方案


推荐阅读