Marathon创建Application,指定容器名后,Application状态一直为Staged,如何解决?


Marathon创建Application,指定容器名后,Application状态一直为Staged,但登录对应的docker host,docker容器运行却是正常的。
json文件非常简单,通过parameters的name来指定容器的名称,如下:
{
"id": "/mybusybox",
"cmd": "sleep 10000",
"cpus": 1,
"mem": 1024,
"disk": 0,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
  "forcePullImage": false,
  "image": "busybox",
  "parameters": [
    {
      "key": "name",
      "value": "kdc"
    }
  ],
  "privileged": false
},
"volumes": [],
"portMappings": []
},
"env": {
},
"labels": {
"HAPROXY_GROUP": "external"
},
"networks": [
{
  "mode": "container/bridge"
}
],
"portDefinitions": []
}

如果去掉容器名,那么Application非常正常,而一旦加上容器名,Application状态就出错了。

error.png


附上marathon的日志信息:
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,465] INFO  [/mybusybox]: new app detected (mesosphere.marathon.upgrade.GroupVersioningUtil$:ForkJoinPool-3-worker-3)
Jan 22 19:40:45 dcos-master marathon[6751]: * Start(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=0)
Jan 22 19:40:45 dcos-master marathon[6751]: * Scale(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=1)
Jan 22 19:40:45 dcos-master marathon[6751]: * Start(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=0)
Jan 22 19:40:45 dcos-master marathon[6751]: * Scale(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=1)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,485] INFO  Starting runSpec /mybusybox (mesosphere.marathon.SchedulerActions:marathon-akka.actor.default-dispatcher-16)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,485] INFO  Already running 0 instances of /mybusybox. Not scaling. (mesosphere.marathon.SchedulerActions:ForkJoinPool-3-worker-43)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,486] INFO  Successfully started 0 instances of /mybusybox (mesosphere.marathon.core.deployment.impl.AppStartActor:marathon-akka.actor.default-dispatcher-16)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,487] INFO  Started instanceLaunchActor for /mybusybox version 2018-01-22T11:40:45.463Z with initial count 1 (mesosphere.marathon.core.launchqueue.impl.TaskLauncherActor:marathon-akka.actor.default-dispatcher-51)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,487] INFO  activating matcher ActorOfferMatcher(Actor[akka://marathon/user/launchQueue/1/83-mybusybox#1887835656]). (mesosphere.marathon.core.matcher.manager.impl.OfferMatcherManagerActor:marathon-akka.actor.default-dispatcher-51)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,493] INFO  No tasks left to launch. Stop receiving offers for /mybusybox, 2018-01-22T11:40:45.463Z (mesosphere.marathon.core.launchqueue.impl.TaskLauncherActor:marathon-akka.actor.default-dispatcher-29)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,493] INFO  removing matcher ActorOfferMatcher(Actor[akka://marathon/user/launchQueue/1/83-mybusybox#1887835656]) (mesosphere.marathon.core.matcher.manager.impl.OfferMatcherManagerActor:marathon-akka.actor.default-dispatcher-43)
Jan 22 19:40:45 dcos-master marathon[6751]: [2018-01-22 19:40:45,494] INFO  Processing LaunchEphemeral(Instance(instance [mybusybox.marathon-1577f03b-ff69-11e7-bb96-5a34b642040e],AgentInfo(109.105.115.51,Some(8f7b84bd-3acd-4d8d-a36c-14aadaa5cc0e-S2),Vector()),InstanceState(Created,2018-01-22T11:40:45.493Z,None,None),Map(task [mybusybox.1577f03b-ff69-11e7-bb96-5a34b642040e] -> LaunchedEphemeral(task [mybusybox.1577f03b-ff69-11e7-bb96-5a34b642040e],2018-01-22T11:40:45.463Z,Status(2018-01-22T11:40:45.493Z,None,None,Created,NetworkInfo(109.105.115.51,List(),List())))),2018-01-22T11:40:45.463Z,UnreachableEnabled(300 seconds,600 seconds))) for instance [mybusybox.marathon-1577f03b-ff69-11e7-bb96-5a34b642040e] (mesosphere.marathon.core.launcher.impl.OfferProcessorImpl:ForkJoinPool-3-worker-23)


ps:
Marathon版本为1.5.0-SNAPSHOT-713-g14280a6
DC/OS版本为1.10.0
已邀请:

wisen

赞同来自:


换个镜像。用nginx或者tomcat。

要回复问题请先登录注册