Centos7 uses yum to install Marathon

The official provides two installation methods ( http://mesosphere.github.io/marathon/docs/ ), one is to download and decompress the compressed package, and the other is to use yum ( https://mesosphere.com/blog/mesosphere- package-repositories/ ).

There is no problem with the first one. After decompression, execute the script and start it with parameters:

./bin/start --master zk://127.0.0.1:2181/mesos --zk zk://127.0.0.1:2181/marathon

The second only needs to execute the command:

sudo rpm -Uvh http://repos.mesosphere.com/el/6/noarch/RPMS/mesosphere-el-repo-6-2.noarch.rpm
sudo yum -y install marathon

After the installation is complete, after executing systemctl start marahon, the browser opens http://ip:8080 and finds that it cannot be opened.

Execute systemctl status marahon or check /var/logs/messages, and find the error "Required option 'master' not found".

Obviously marathon needs to execute the master parameter to start, try to start directly with the command, there is no problem, indicating that there is no problem with the yum installation. The official webpage does not tell how to configure the relevant parameters. Baidu has a saying, similar to the configuration method of mesos, namely:

echo zk://127.0.0.1:2181/mesos > /etc/marathon/conf/master
echo zk://127.0.0.1:2181/marathon > /etc/marathon/conf/zk

I tried to start again and found that the problem was still the same, so I checked the /usr/lib/systemd/system/marathon.service file and found that an environment variable file was specified when the service was started, and the script /usr/share/marathon/bin/marathon was called to start, no Places related to participation. Looking at this script, I also found that there is no place to read configuration files like mesos.

Guessing that the new version of marahon may not support this usage, I googled it, and finally found an issue of the official jira ( https://jira.mesosphere.com/browse/MARATHON-7932 ), which was originally in 1.5 ( https: //github.com/mesosphere/marathon/blob/master/changelog.md#changes-from-14x-to-150 ), it has been changed to configure related parameters through environment variables.

So modify the /etc/default/marathon file and add

MARATHON_MASTER="zk://127.0.0.1:2181/mesos"
MARATHON_ZK="zk://127.0.0.1:2181/marathon"

After trying to start the service again it was successful.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324525616&siteId=291194637