【问题标题】:keepalived exiting with code 256 on FAULT state in systemd when built from source当从源代码构建时,keepalived 在 systemd 中的 FAULT 状态下以代码 256 退出
【发布时间】:2016-10-03 18:28:34
【问题描述】:

在从源代码构建时,我在使用 systemd 进行 keepalived 工作时遇到了一点麻烦。我从 centos 7 可用的安装包 keepalived 复制了单元文件,它的主要工作原理是它确实启动和停止 keepalived 进程,但是当 keepalived 进入其 FAULT 状态时,systemd 显示它不断退出,代码为 256 . 从软件包安装时,它会正确显示 FAULT 状态。我不确定关于 systemd 的两个安装之间有什么区别。

[Unit]
Description=LVS and VRRP High Availability Monitor
After=syslog.target network.target

[Service]
Type=forking
KillMode=process
EnvironmentFile=-/etc/sysconfig/keepalived
ExecStart=/usr/local/sbin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/var/run/keepalived.pid

[Install]
WantedBy=multi-user.target

进程启动和停止正常,但是当遇到 FAULT 状态时,我得到这个:

● keepalived.service - LVS and VRRP High Availability Monitor
   Loaded: loaded (/etc/systemd/system/keepalived.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2016-10-01 00:47:12 EDT; 2s ago
  Process: 30947 ExecStart=/usr/local/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 30948 (keepalived)
   CGroup: /system.slice/keepalived.service
           ├─30948 /usr/local/sbin/keepalived -D
           ├─30949 /usr/local/sbin/keepalived -D
           └─30950 /usr/local/sbin/keepalived -D

Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: Registering gratuitous ARP shared channel
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: Opening file '/etc/keepalived/keepalived.conf'.
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: Truncating auth_pass to 8 characters
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: VRRP_Instance(VPN) removing protocol VIPs.
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: Using LinkWatch kernel netlink reflector...
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: VRRP_Instance(VPN) Entering BACKUP STATE
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: VRRP sockpool: [ifindex(3), proto(112), unicast(1), fd(10,11)]
Oct 01 00:47:12 server.test.com Keepalived_vrrp[30950]: pid 30951 exited with status 256
Oct 01 00:47:13 server.test.com Keepalived_vrrp[30950]: pid 30953 exited with status 256

【问题讨论】:

    标签: centos7 systemd


    【解决方案1】:

    keepalived project 的维护者的大力帮助下,确定keepalived 实际上进入了FAULT 状态,但随后详细记录vrrp_script 失败,这是在centos 可用版本之后添加的百胜回购。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-23
      • 1970-01-01
      • 2014-12-03
      • 2015-09-22
      • 2016-04-13
      • 2015-10-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多