不能用网络主机在马拉松上运行docker容器?

iqih9akk  于 2021-06-21  发布在  Mesos
关注(0)|答案(0)|浏览(323)

我试图在marathon上运行一些cassandra示例(docker容器)。
以下描述非常有效:

{
    "id": "cassandra",
    "constraints": [["hostname", "CLUSTER", "docker-sl-vm"]],
    "container": {
        "type": "DOCKER",
        "docker": {
            "image": "cassandra:latest",
            "network": "BRIDGE",
            "portMappings": [ {"containerPort": 9042,"hostPort": 0,"servicePort": 9042,"protocol": "tcp"} ]
        }
    },
    "env": {
        "CASSANDRA_SEED_COUNT": "1"
    },
    "cpus": 0.5,
    "mem": 512.0,
    "instances": 1,
    "backoffSeconds": 1,
    "backoffFactor": 1.15,
    "maxLaunchDelaySeconds": 3600
}

但是,我遵循的教程使用了以下描述:

{
    "id": "cassandra-seed",
    "constraints": [
        [
            "hostname",
            "UNIQUE"
        ]
    ],
    "ports": [
        7199,
        7000,
        7001,
        9160,
        9042
    ],
    "requirePorts": true,
    "container": {
        "type": "DOCKER",
        "docker": {
            "image": "cassandra:latest",
            "network": "HOST",
            "privileged": true
        }
    },
    "env": {
        "CASSANDRA_SEED_COUNT": "1"
    },
    "cpus": 0.5,
    "mem": 512,
    "instances": 2,
    "backoffSeconds": 1,
    "backoffFactor": 1.15,
    "maxLaunchDelaySeconds": 3600,
    "healthChecks": [
        {
            "protocol": "TCP",
            "gracePeriodSeconds": 30,
            "intervalSeconds": 30,
            "portIndex": 4,
            "timeoutSeconds": 60,
            "maxConsecutiveFailures": 30
        }
    ],
    "upgradeStrategy": {
        "minimumHealthCapacity": 0.5,
        "maximumOverCapacity": 0.2
    }
}

问题
如果我尝试不使用第二个马拉松描述,它需要永远不会加载。它只是在部署时卡住了,在调试部分没有给我任何错误。
附:我正在把mesos集群运行到一个virtualbox ubuntu可信的客户机中。
更新========================================
我删除了日志,并试图再次运行它。日志结果如下:mesos-slave.docker-sl-vm.invalid-user.log.info.20151110-130520.2713的内容

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题