本文介绍了Docker中间层/时间表容器在启动后立即失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正试图在Docker上推出Chronos,使用



从命令行



运行以下命令运行图像不能正常工作。

  docker run -p 8081:8081 -t mesosphere / chronos:latest / usr / bin / chronos  - -master zk://< master-hostname>:2181 / mesos --zk_hosts< master-hostname>:2181 --http_port 8081 

(我正在尝试使用单个ZK节点和一个Mesos主节点)



几秒钟后即会显示以下消息。并且没有Chronos的码头容器运行。

  / usr / bin / chronos:line 18:warning:setlocale:LC_ALL:can not change locale(en_US.UTF-8):没有这样的文件或目录
+ cmd =(run_jar)
+本地cmd
+ [[-s / etc / mesos / zk]]
+ [[-d / etc / chronos / conf]]
+记录的计时器run_jar --master zk://< master-hostname>:2181 / mesos --zk_hosts< master-hostname> ;: 2181 --http_port 8081
+ local'token = chronos [1]'
+ shift
+ exec
+ exec
++ exec logger -p user.info -t'chronos [1]'
++ exec logger -p user.notice -t'chronos [1]'

马拉松



我也试图在马拉松上推出Chronos容器。



马拉松的配置如下。

  {
id:chronos ,
container:{
docker:{
image:mesosphere / chronos:latest,
network:BRIDGE,
forcePullImage:true,
portMappings:[
{
containerPort:8081,
hostPort:0,
servicePort:31000,
protocol:tcp
}
]
},
type:DOCKER,
volumes:[]
},
shell:false,
ports:[
8081
],
args:[

zk://< master-hostname>:2181 / mesos,
--zk_hosts,
< master-hostname>:2181
--http_port,
8081,
],
cpus:1,
mem:1024,
:1
}

它还显示与命令行相同的消息。 / p>

环境



操作系统:CentOS 6.5



Docker:

 客户端版本:1.5.0 
客户端API版本:1.17
Go版本(客户端):go1.3.3
Git提交(客户端):a8a31ef / 1.5.0
操作系统/ Arch (客户端):linux / amd64
服务器版本:1.5.0
服务器API版本:1.17
转到版本(服务器):go1.3.3
Git提交(服务器):a8a31ef /1.5.0

ZooKeeper:



Mesos Master:



马拉松:



参考



我发现以下页面描述了类似的问题。但是他们没有多少帮助。







解决方案

自解决



这是一种版本问题。 >

当我使用指向相同版本的Mesos的Docker图像标签时,它的工作正常。


I am trying to launch Chronos in Docker, using mesosphere/chronos image.

From command line

Running following command to run the image doesn't work fine.

docker run -p 8081:8081 -t mesosphere/chronos:latest /usr/bin/chronos --master zk://<master-hostname>:2181/mesos --zk_hosts <master-hostname>:2181 --http_port 8081

(I am trying with a single ZK node and a single Mesos Master node)

It shows following messages soon after a few seconds. And no docker container of Chronos runs.

/usr/bin/chronos: line 18: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
+ cmd=(run_jar)
+ local cmd
+ [[ -s /etc/mesos/zk ]]
+ [[ -d /etc/chronos/conf ]]
+ logged chronos run_jar --master zk://<master-hostname>:2181/mesos --zk_hosts <master-hostname>:2181 --http_port 8081
+ local 'token=chronos[1]'
+ shift
+ exec
+ exec
++ exec logger -p user.info -t 'chronos[1]'
++ exec logger -p user.notice -t 'chronos[1]'

On Marathon

I also tried to launch Chronos container on Marathon.

Config for Marathon is as follows.

{
    "id": "chronos",
    "container": {
        "docker": {
            "image": "mesosphere/chronos:latest",
            "network": "BRIDGE",
            "forcePullImage": true,
            "portMappings": [
                {
                    "containerPort": 8081,
                    "hostPort": 0,
                    "servicePort": 31000,
                    "protocol": "tcp"
                }
            ]
        },
        "type": "DOCKER",
        "volumes": []
    },
    "shell": false,
    "ports": [
        8081
    ],
    "args": [
        "--master",
        "zk://<master-hostname>:2181/mesos",
        "--zk_hosts",
        "<master-hostname>:2181",
        "--http_port",
        "8081",
    ],
    "cpus": 1,
    "mem": 1024,
    "instances": 1
}

It also shows messages same as the case of command line.

Environments

OS: CentOS 6.5

Docker:

Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.3.3
Git commit (client): a8a31ef/1.5.0
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.3.3
Git commit (server): a8a31ef/1.5.0

ZooKeeper: jplock/zookeeper:3.4.5

Mesos Master: mesosphere/mesos-master:0.20.1

Marathon: mesosphere/marathon:v0.8.2-RC3

References

I found following pages describing similar problems. But they didn't help much.

解决方案

Self-resolved.

It was a kind of version problem.

As I use Docker image tags pointing same version of Mesos, it works fine.

这篇关于Docker中间层/时间表容器在启动后立即失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 14:06