Docker mesosphere/chronos container fails immediately after launch

允我心安 提交于 2019-12-13 18:25:31

问题


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.

  • Unable to run Chronos image on Marathon #3

  • Struggling with basic Chronos setup


回答1:


Self-resolved.

It was a kind of version problem.

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



来源:https://stackoverflow.com/questions/30472224/docker-mesosphere-chronos-container-fails-immediately-after-launch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!