keepalived添加服务自启动报错分析
安装完keepalived后设置为服务自启动
将路径为/usr/local/src/keepalived-1.3.4/keepalived/etc/init.d的文件keepalived拷贝到/etc/init.d下
cp /usr/local/src/keepalived-1.3./keepalived/etc/init.d/keepalived /etc/init.d/
将路径为/usr/local/keepalived-1.3.4/etc/sysconfig/keepalived的文件拷贝到 /etc/sysconfig/keepalived
cp /usr/local/keepavlied-1.3./etc/sysconfig/keepalived /etc/sysconfig/
添加执行权限
chmod +x /etc/init.d/keepalived
添加keepalived到系统服务
chkconfig --add keepalived
启动
[root@localhost ~]# service keepalived start
Starting keepalived (via systemctl): Job for keepalived.service failed because the control process exited with error code. See "systemctl status keepalived.service" and "journalctl -xe" for details.
[失败]
报错,启动失败,用status查看具体原因
[root@localhost ~]# systemctl status keepalived
● keepalived.service - LVS and VRRP High Availability Monitor
Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 四 -- :: CST; 24s ago
Process: ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=/EXEC) 4月 :: localhost.localdomain systemd[]: Starting LVS and VRRP High Availability Monitor...
4月 :: localhost.localdomain systemd[]: keepalived.service: control process exited, code=ex...
4月 :: localhost.localdomain systemd[]: Failed to start LVS and VRRP High Availability Monitor.
4月 :: localhost.localdomain systemd[]: Unit keepalived.service entered failed state.
4月 :: localhost.localdomain systemd[]: keepalived.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
提示:ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=203/EXEC)
查看ll /usr/sbin/keepalived 文件不存在,此时有两种方法解决
1、复制一个keepalived到/usr/sbin/ 下
2、修改 /lib/systemd/system/keepalived.service文件,将 /usr/sbin/路径改成我们存放keepalived文件的路径
[root@localhost ~]# vi /lib/systemd/system/keepalived.service [Unit]
Description=LVS and VRRP High Availability Monitor
After=syslog.target network-online.target [Service]
Type=forking
PIDFile=/var/run/keepalived.pid
KillMode=process
EnvironmentFile=-/etc/sysconfig/keepalived
ExecStart=/usr/local/bin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID [Install]
3、生效
systemctl daemon-reload
4、再启动
[root@localhost keepalived-1.3.]# systemctl start keepalived
[root@localhost keepalived-1.3.]# systemctl status keepalived
● keepalived.service - LVS and VRRP High Availability Monitor
Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
Active: active (running) since 四 -- :: CST; 2s ago
Process: ExecStart=/usr/local/bin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=/SUCCESS)
Main PID: (keepalived)
CGroup: /system.slice/keepalived.service
├─ /usr/local/bin/keepalived -D
├─ /usr/local/bin/keepalived -D
└─ /usr/local/bin/keepalived -D 4月 :: localhost.localdomain Keepalived_vrrp[]: VRRP_Instance(VI_1) Changing effective p...
4月 :: localhost.localdomain Keepalived_vrrp[]: VRRP_Instance(VI_1) Entering MASTER STATE
4月 :: localhost.localdomain Keepalived_vrrp[]: VRRP_Instance(VI_1) setting protocol VIPs.
4月 :: localhost.localdomain Keepalived_healthcheckers[]: Netlink reflector reports IP ...d
4月 :: localhost.localdomain Keepalived_vrrp[]: Sending gratuitous ARP on em1 for 172.28...
4月 :: localhost.localdomain Keepalived_vrrp[]: VRRP_Instance(VI_1) Sending/queueing gra...
4月 :: localhost.localdomain Keepalived_vrrp[]: Sending gratuitous ARP on em1 for 172.28...
4月 :: localhost.localdomain Keepalived_vrrp[]: Sending gratuitous ARP on em1 for 172.28...
4月 :: localhost.localdomain Keepalived_vrrp[]: Sending gratuitous ARP on em1 for 172.28...
4月 :: localhost.localdomain Keepalived_vrrp[]: Sending gratuitous ARP on em1 for 172.28...
Hint: Some lines were ellipsized, use -l to show in full.
成功
keepalived添加服务自启动报错分析的更多相关文章
- rsyslog服务日志报错分析1
客户问题: 最近对服务器进行日志检查时,发现部分主机的rsyslog服务状态有报错,报错详情如下 排查过程: 1.从报错截图来看,报错主要发生在文件'/usr/lib64/rsyslog/omazur ...
- mysql5.7密码修改与报错分析
1.修改密码 修改密码: vim /etc/my.cnf 的mysqld字段加入skip-grant-tables 重启MySQL,service mysqld restart 终端输入 mysql ...
- gitblit在windows10上的安装及服务启动报错处理
折腾一下午算是装好了,心情不错决定分享一下.安装步骤大同小异网上都有,主要是Failed creating java 这个报错,百度出来的没有一个能给我解决的,摸索半天找出一个自己的方式.为报错而来的 ...
- CocoaPods 添加第三方库报错
1.终端报错:The dependency MBProgressHUD (~> 0.9.2) is not used in any concrete target.2.原因:CocoaPods升 ...
- const变量赋值报错分析
const变量赋值报错分析 const变量赋值报错 从变量到常量的赋值是合法C++的语法约定的, 如从char 到const char顺畅: 但从char **到 const char **编译器就会 ...
- std::unique_ptr使用incomplete type的报错分析和解决
Pimpl(Pointer to implementation)很多同学都不陌生,但是从原始指针升级到C++11的独占指针std::unique_ptr时,会遇到一个incomplete type的报 ...
- 【.netcore学习】.netcore添加到 supervisor 守护进程自启动报错
配置 supervisor [program:HelloWebApp] command=dotnet run directory=/home/python/dotnet/myweb/mywebapi ...
- MongoDB添加仲裁节点报错replica set IDs do not match办法
背景:由于历史原因,某个MongoDB副本集只有一主一从双节点,无法满足自动故障转移要求,需要配置一个仲裁节点. 原有节点192.168.10.20:27017,192.168.10.21:27017 ...
- 启动mysql服务,报错1067,进程意外终止
之前一直使用的是oracle,这次换成mysql,在配置my.ini的时候,添加default-character-set=utf8,来修改字符集. 修改完成之后,启动mysql的服务,但是报错,10 ...
随机推荐
- php7 使用simplexml扩展处理xml
<?php $xmldoc = "<?xml version=\"1.0\" encoding=\"gb2312\"?> <s ...
- USD词汇表(USD Glossary)
这篇文章是在学习USD的过程中龟速写成的,目的是将USD的核心设计.相关概念的说明.以及配套API整理出来,为后续进行的USD开发工作提供中文资料支持. 实际上也只有充分理解了USD设计中的每一个知识 ...
- 踩坑rosbag --clock
将rosbag的数据feed给lego-loam,输出地图.另外写了一个滤波节点,订阅地图,进行滤波操作,再发布出来. 由于输入给lego-loam的数据来自于rosbag,所以需要rosbag提供时 ...
- 使用VISIO远程服务器上的ORACLE数据库,反向生成数据库实体关系图
反向即根据已有的数据库,生成ER图,很多工具都可以实现这一过程,如visio,powerdesigner等,下面文章记录一下我使用VISIO生成远程服务器上的一个数据库ER图过程,供以后自己参考. 1 ...
- iview 3.x InputNumber数字框bug
iview 3.X 版本中InputNumber 数字框组件存在bug,把最小值设置为0.2时,数组框禁止点击,其他数字都是正常.
- 离线手动部署docker镜像仓库——harbor仓库(HTTPS)
实验环境: harbor服务器系统:CentOS Linux release 7.5.1804 (Core)harbor服务器IP:10.1.12.114harbor版本:v1.5.0docker版本 ...
- 理解block和inode
什么是block和inode? 定义:block就像是杯子 inode就像是杯子的编号,因为杯子太多了 1.根据文件的大小,在磁盘中储存时会占用一个或多个block:那么究竟多大的文件会使用一个blo ...
- solr中Cache综述
一.概述 Solr查询的核心类就是SolrIndexSearcher,每个core通常在同一时刻只由当前的SolrIndexSearcher供上层的handler使用(当切换SolrIndexSear ...
- mysql数据库优化(一)
在实际项目中,通过设计表架构时,设计系统结构时,查询数据时综合提高查询数据效率 1.适当冗余 数据库在设计时遵守三范式,同时业务数据(对数据的操作,比如资料审核,对某人评分等)和基础数据(比如资料详情 ...
- js异步处理历程
为什么会出现异步: js执行环境是单线程的,异步处理就非常重要. 处理的方法: 方法一:callback hell 解决:解决了异步处理 存在问题:出现多个回调函数嵌套,代码就会比较乱,出现回调地狱现 ...