No start hook file found ($HOOK

xiaoxiao2021-02-28  30

当我们默认安装

yum install marathon

#mkdir -p /etc/marathon/conf/ && touch hostname  #echo 192.168.176.138 | sudo tee /etc/marathon/conf/hostname

进行systemctl start marathon之后,我们会遇到marathon启动失败的情况,如下:

[root@k8s-node-1 ~]# systemctl status marathon ● marathon.service - Scheduler for Apache Mesos    Loaded: loaded (/usr/lib/systemd/system/marathon.service; disabled; vendor preset: disabled)    Active: activating (auto-restart) (Result: exit-code) since 二 2018-07-10 17:38:40 CST; 14s ago   Process: 3754 ExecStart=/usr/share/marathon/bin/marathon (code=exited, status=1/FAILURE)   Process: 3751 ExecStartPre=/bin/chmod 755 /run/marathon (code=exited, status=0/SUCCESS)   Process: 3748 ExecStartPre=/bin/chown marathon:marathon /run/marathon (code=exited, status=0/SUCCESS)   Process: 3744 ExecStartPre=/bin/mkdir -p /run/marathon (code=exited, status=0/SUCCESS)  Main PID: 3754 (code=exited, status=1/FAILURE) 7月 10 17:38:40 k8s-node-1 systemd[1]: Unit marathon.service entered failed state.

7月 10 17:38:40 k8s-node-1 systemd[1]: marathon.service failed.

这个错误没告诉我们为什么启动失败,我们查下当前进程

 journalctl -o verbose _PID=3754 

[root@k8s-node-1 ~]#  journalctl -o verbose _PID=3754 -- Logs begin at 二 2018-07-10 17:26:50 CST, end at 二 2018-07-10 17:40:46 CST. -- 二 2018-07-10 17:38:31.690312 CST [s=5d6c1b4fa2c74213a96d4b6db61c0fae;i=9c9;b=1922f6a23fb74d2c872eee5dd3f98944;m=2a2af273;t=570a1e4a61c48;x=e410a948dc6c1171]     PRIORITY=6     _SYSTEMD_SLICE=system.slice     _BOOT_ID=1922f6a23fb74d2c872eee5dd3f98944     _MACHINE_ID=cf6a47d9094a4ef697f8b9c00c3147ec     SYSLOG_FACILITY=3     _TRANSPORT=stdout     _HOSTNAME=k8s-node-1     _EXE=/usr/bin/bash     _CAP_EFFECTIVE=0     SYSLOG_IDENTIFIER=marathon     MESSAGE= No start hook file found ($HOOK_MARATHON_START). Proceeding with the start script.     _PID=3754     _UID=982     _GID=979     _COMM=bash     _CMDLINE=bash /usr/share/marathon/bin/marathon     _SYSTEMD_CGROUP=/system.slice/marathon.service     _SYSTEMD_UNIT=marathon.service 二 2018-07-10 17:38:40.188702 CST [s=5d6c1b4fa2c74213a96d4b6db61c0fae;i=9cd;b=1922f6a23fb74d2c872eee5dd3f98944;m=2aac9f49;t=570a1e527c91e;x=cece0f0e2c263111]     PRIORITY=6     _SYSTEMD_SLICE=system.slice     _BOOT_ID=1922f6a23fb74d2c872eee5dd3f98944     _MACHINE_ID=cf6a47d9094a4ef697f8b9c00c3147ec     SYSLOG_FACILITY=3     _TRANSPORT=stdout     _HOSTNAME=k8s-node-1     _CAP_EFFECTIVE=0     SYSLOG_IDENTIFIER=marathon     _PID=3754     _UID=982     _GID=979     _SYSTEMD_CGROUP=/system.slice/marathon.service     _SYSTEMD_UNIT=marathon.service     MESSAGE= [scallop] Error: Required option 'master' not found     _COMM=java     _EXE=/usr/java/jdk1.8.0_131/jre/bin/java     _CMDLINE=java -cp /usr/share/marathon/lib/mesosphere.marathon.marathon-1.6.496.jar:/usr/share/marathon/lib/mesosphere.marathon.plugin-interface-1.6.496.jar:/usr/share/marathon/lib/org.scala-lang.scala-reflect-2.12.4.jar:

一个报找不到钩子脚本执行。一个报没找到mesos-master

这里我们确认先启动zookeeper+mesos-master

那么这个一定是配置问题。找不到mesos-master说明根本找不到zookeeper的映射mesos地址

默认安装的marathon只有去系统默认环境配置

vi /etc/default/marathon

末尾添加

MARATHON_MASTER="zk://192.168.176.136:2181,192.168.176.137:2181,192.168.176.138:2181/mes"MARATHON_ZK="zk://192.168.176.136:2181,192.168.176.137:2181,192.168.176.138:2181/marathon"

MARATHON_MESOS_USER="root"

然后shutdown -r now

这时貌似就正常的了

访问UI

暂时没深研为什么这样配置就好了,后续有空再看

如果要了解mesos的配置

mesos zookeeper docker centos7 正确集群配置姿势

转载请注明原文地址: https://www.6miu.com/read-2800026.html

最新回复(0)