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": ,
  "privileged": false
},
"volumes": [],
"portMappings": []
},
"env": {
},
"labels": {
"HAPROXY_GROUP": "external"
},
"networks": ,
"portDefinitions": []
}

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

error.png


附上marathon的日志信息:
Jan 22 19:40:45 dcos-master marathon:  INFO  : new app detected (mesosphere.marathon.upgrade.GroupVersioningUtil$:ForkJoinPool-3-worker-3)
Jan 22 19:40:45 dcos-master marathon: * Start(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=0)
Jan 22 19:40:45 dcos-master marathon: * Scale(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=1)
Jan 22 19:40:45 dcos-master marathon: * Start(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=0)
Jan 22 19:40:45 dcos-master marathon: * Scale(App(/mybusybox, image="109.105.115.109:5000/busybox", cmd="sleep 10000"List())), instances=1)
Jan 22 19:40:45 dcos-master marathon:  INFO  Starting runSpec /mybusybox (mesosphere.marathon.SchedulerActions:marathon-akka.actor.default-dispatcher-16)
Jan 22 19:40:45 dcos-master marathon:  INFO  Already running 0 instances of /mybusybox. Not scaling. (mesosphere.marathon.SchedulerActions:ForkJoinPool-3-worker-43)
Jan 22 19:40:45 dcos-master marathon:  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:  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:  INFO  activating matcher ActorOfferMatcher(Actor). (mesosphere.marathon.core.matcher.manager.impl.OfferMatcherManagerActor:marathon-akka.actor.default-dispatcher-51)
Jan 22 19:40:45 dcos-master marathon:  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:  INFO  removing matcher ActorOfferMatcher(Actor) (mesosphere.marathon.core.matcher.manager.impl.OfferMatcherManagerActor:marathon-akka.actor.default-dispatcher-43)
Jan 22 19:40:45 dcos-master marathon:  INFO  Processing LaunchEphemeral(Instance(instance ,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  -> LaunchedEphemeral(task ,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  (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。

要回复问题请先登录注册