Marathon 以状态 1 退出

Marathon exited with status 1

我在 ubuntu 16.04 xenial .zookeeper 和 mesos-master 和 mesos-slave 上安装 mesosphere 运行 很好,在开始马拉松时我遇到了这个问题。 未找到必需选项'master'。我在/etc/marathon/conf中创建了文件夹。这些是我为马拉松比赛所遵循的步骤。

sudo mkdir -p /etc/marathon/conf
sudo cp /etc/mesos-master/hostname /etc/marathon/conf
sudo cp /etc/mesos/zk /etc/marathon/conf/master
sudo cp /etc/marathon/conf/master /etc/marathon/conf/zk
sudo nano /etc/marathon/conf/zk ,edit mesos to marathon in the end .

I am attaching the whole logs here,
    Jan 25 14:18:01 master01 cron[859]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)
    Jan 25 14:18:01 master01 cron[859]: (*system*popularity-contest) INSECURE MODE (group/other writable) (/etc/cron.d/popularity-contest)
    Jan 25 14:18:01 master01 cron[859]: (*system*php) INSECURE MODE (group/other writable) (/etc/cron.d/php)
    Jan 25 14:18:01 master01 cron[859]: (*system*anacron) INSECURE MODE (group/other writable) (/etc/cron.d/anacron)
    Jan 25 14:18:29 master01 systemd[1]: marathon.service: Service hold-off time over, scheduling restart.
    Jan 25 14:18:29 master01 systemd[1]: Stopped Scheduler for Apache Mesos.
    Jan 25 14:18:29 master01 systemd[1]: Starting Scheduler for Apache Mesos...
    Jan 25 14:18:29 master01 systemd[1]: Started Scheduler for Apache Mesos.
    Jan 25 14:18:29 master01 marathon[29366]: No start hook file found ($HOOK_MARATHON_START). Proceeding with the start script.
    Jan 25 14:18:30 master01 marathon[29366]: [scallop] Error: **Required option 'master' not found**
    Jan 25 14:18:30 master01 systemd[1]: marathon.service: Main process exited, code=exited, status=1/FAILURE
    Jan 25 14:18:30 master01 systemd[1]: marathon.service: Unit entered failed state.
    Jan 25 14:18:30 master01 systemd[1]: marathon.service: Failed with result 'exit-code'.

Breaking Changes / Packaging standardized

We now publish more normalized packages that attempt to follow Linux Standard Base Guidelines and use sbt-native-packager to achieve this. As a result of this and the many historic ways of passing options into marathon, we will only read /etc/default/marathon when starting up. This file, like /etc/sysconfig/marathon, has all marathon command line options as "MARATHON_XXX=YYY" which will translate to --xx=yyy. We no longer support /etc/marathon/conf which was a set of files that would get translated into command line arguments. In addition, we no longer assume that if there is no zk/master argument passed in, then both are running on localhost.

尝试在环境中保留配置。

cat << EOF > /etc/default/marathon
MARATHON_MASTER=zk://127.0.0.1:2181/mesos
MARATHON_ZK=zk://127.0.0.1:2181/marathon
EOF

记得用正确的 Zookeeper 位置替换 127.0.0.1:2181。

我使用的是 Ubuntu 14.04 在我的情况下 janisz 解决方案不起作用,因为我需要添加 export

cat << EOF > /etc/default/marathon
export MARATHON_MASTER=zk://127.0.0.1:2181/mesos
export MARATHON_ZK=zk://127.0.0.1:2181/marathon
EOF