安装pika配置系统服务过程中遇到的错误

news/2024/11/29 5:44:00/

今天记录一下在我安装完pika后配置系统服务启动时遇到的一系列问题,安装pika及配置服务参考:Linux阿里云ECS中安装Pika及配置Pika为系统服务开机自启动Linux阿里云ECS中安装Pika及配置Pika为系统服务开机自启动,不止是pika,在你配置其它服务时可能也会遇到同样的问题,希望对大家有帮助,如果我的博客对你有帮助,欢迎进行评论✏️✏️、点赞👍👍、收藏⭐️⭐️,满足一下我的虚荣心💖🙏🙏🙏 。

目录

错误一:Job for pika.service failed because the control process exited with error code.See "systemctl status pika.service" and "journalctl -xe" for details. 

错误2:pika.service: control process exited, code=killed status=6


错误一:Job for pika.service failed because the control process exited with error code.See "systemctl status pika.service" and "journalctl -xe" for details. 

按照错误提示,我们执行如下命令看一下 systemctl status pika.service 中的内容,如下: 

systemctl status pika.service

如上,我这里首先发现的错误是,我的pika路径错误了,我是按照我博客上直接复制的,改成自己真实的路径后再试一下,注意:修改pika.service文件后,要先重新加载一下这个配置文件,执行如下命令:

systemctl daemon-reload

如果不执行上述命令,控制台还是会报上面的错并提醒:

Warning: pika.service changed on disk. Run 'systemctl daemon-reload' to reload units. 

错误2:pika.service: control process exited, code=killed status=6

上面我改完路径启动时还是包上面的错误:Job for pika.service failed because the control process exited with error code.See "systemctl status pika.service" and "journalctl -xe" for details. 

通过执行 ystemctl status pika.service 发现错误:pika.service: control process exited, code=killed status=6 ,完整信息如下:

● pika.service - pika server
   Loaded: loaded (/usr/lib/systemd/system/pika.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Fri 2022-09-16 11:16:10 CST; 4s ago
  Process: 17724 ExecStart=/db/output/bin/pika -c /db/output/conf/pika.conf (code=killed, signal=ABRT)

Sep 16 11:16:09 iZ0jlgushn24yfo systemd[1]: pika.service: control process exited, code=killed status=6
Sep 16 11:16:09 iZ0jlgushn24yfo systemd[1]: Failed to start pika server.
Sep 16 11:16:09 iZ0jlgushn24yfo systemd[1]: Unit pika.service entered failed state.
Sep 16 11:16:09 iZ0jlgushn24yfo systemd[1]: pika.service failed.
Sep 16 11:16:10 iZ0jlgushn24yfo systemd[1]: pika.service holdoff time over, scheduling restart.
Sep 16 11:16:10 iZ0jlgushn24yfo systemd[1]: Stopped pika server.
Sep 16 11:16:10 iZ0jlgushn24yfo systemd[1]: start request repeated too quickly for pika.service
Sep 16 11:16:10 iZ0jlgushn24yfo systemd[1]: Failed to start pika server.
Sep 16 11:16:10 iZ0jlgushn24yfo systemd[1]: Unit pika.service entered failed state.
Sep 16 11:16:10 iZ0jlgushn24yfo systemd[1]: pika.service failed.

使用如下命令查看更详细的信息:

journalctl -u pika

有如下一段信息:

Sep 16 11:16:04 iZ0jlgushn24yfo systemd[1]: pika.service: control process exited, code=killed status=6
Sep 16 11:16:04 iZ0jlgushn24yfo systemd[1]: Failed to start pika server.
Sep 16 11:16:04 iZ0jlgushn24yfo systemd[1]: Unit pika.service entered failed state.
Sep 16 11:16:04 iZ0jlgushn24yfo systemd[1]: pika.service failed.
Sep 16 11:16:05 iZ0jlgushn24yfo systemd[1]: pika.service holdoff time over, scheduling restart.
Sep 16 11:16:05 iZ0jlgushn24yfo systemd[1]: Stopped pika server.
Sep 16 11:16:05 iZ0jlgushn24yfo systemd[1]: Starting pika server...
Sep 16 11:16:05 iZ0jlgushn24yfo pika[17658]: WARNING: Logging before InitGoogleLogging() is written to STDERR
Sep 16 11:16:05 iZ0jlgushn24yfo pika[17658]: W0916 11:16:05.117300 17658 pika.cc:171] your 'limit -n ' of 1024 is not enough for Redis to start. pika have successfully reconfig it to 25000
Sep 16 11:16:05 iZ0jlgushn24yfo pika[17658]: I0916 11:16:05.117364 17658 pika.cc:187] Server at: /db/output/conf/pika.conf
Sep 16 11:16:05 iZ0jlgushn24yfo pika[17658]: I0916 11:16:05.117679 17658 pika_server.cc:167] Using Networker Interface: eth0
Sep 16 11:16:05 iZ0jlgushn24yfo pika[17658]: I0916 11:16:05.117743 17658 pika_server.cc:210] host: 172.16.0.78 port: 9221
Sep 16 11:16:05 iZ0jlgushn24yfo pika[17658]: I0916 11:16:05.117753 17658 pika_server.cc:87] Worker queue limit is 2600
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: W0916 11:16:06.122175 17658 pika_rsync_service.cc:61] Rsync service is no live, path:./dbsync/
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: F0916 11:16:06.122246 17658 pika_server.cc:220] Start Rsync Error: bind port 10221 failed, Listen on this port to receive Master FullSync Data
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: *** Check failure stack trace: ***
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x93964a  google::LogMessage::Fail()
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x93b38f  google::LogMessage::SendToLog()
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x939298  google::LogMessage::Flush()
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x93bcbe  google::LogMessageFatal::~LogMessageFatal()
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x4b9a49  PikaServer::Start()
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x43f0ce  main
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @     0x7ff44b3bf555  __libc_start_main
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: @           0x414909  (unknown)
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: path : /db/output/conf/pika.conf
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: -----------Pika server 3.2.8 ----------
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: -----------Pika config list----------
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 1 port 9221
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 2 thread-num 8
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 3 thread-pool-size 12
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 4 sync-thread-num 6
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 5 log-path ./log/
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 6 db-path ./db/
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 7 write-buffer-size 1073741824
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 8 timeout 60
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 9 requirepass
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 10 masterauth
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 11 userpass
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 12 userblacklist
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 13 instance-mode classic
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 14 databases 1
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 15 default-slot-num 1024
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 16 dump-prefix
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 17 dump-path ./dump/
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 18 dump-expire 0
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 19 pidfile ./pika.pid
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 20 maxclients 20000
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 21 target-file-size-base 20971520
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 22 expire-logs-days 7
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 23 expire-logs-nums 10
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 24 root-connection-num 2
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 25 slowlog-write-errorlog no
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 26 slowlog-log-slower-than 10000
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 27 slowlog-max-len 128
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 28 db-sync-path ./dbsync/
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 29 db-sync-speed -1
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 30 slave-priority 100
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 31 server-id 1
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 32 sync-window-size 9000
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 33 max-conn-rbuf-size 268435456
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 34 write-binlog no
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 35 binlog-file-size 104857600
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 36 max-cache-statistic-keys 0
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 37 small-compaction-threshold 5000
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 38 max-write-buffer-size 10737418240
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 39 max-client-response-size 1073741824
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 40 compression snappy
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 41 max-background-flushes 1
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 42 max-background-compactions 2
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 43 max-cache-files 5000
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: 44 max-bytes-for-level-multiplier 10
Sep 16 11:16:06 iZ0jlgushn24yfo pika[17658]: -----------Pika config end----------

以上有一条信息:Start Rsync Error: bind port 10221 failed, Listen on this port to receive Master FullSync Data ,这个端口启动的时候绑定失败,于是我看了下这个端口被哪个程序占用,如下:

netstat -tnlp | grep :10221

kill -9 12793

于是我将占用10221端口的进程kill掉,再次启动就正常启动了。


http://www.ppmy.cn/news/842261.html

相关文章

ATV 开发 二 、内置gtvs

内置Google TV Services(GTVS) Google TV Services(GTVS)是Google服务的集合,例如YouTube和Google Play,它们不属于Android平台或Android开源项目。根据Android TV许可协议,只有签约的谷歌合作…

三菱FX3U 485BD与施耐德ATV71变频器通讯程序

三菱FX3U 485BD与施耐德ATV71变频器通讯程序 程序为原创,稳定可靠,有注释。并附送程序,有接线方式,设置。 同时实现变频器 DRIVECOM流程,解决施耐德ATV变频器断电重启后,自准备工作,程序稳定可靠…

三菱FX3U与3台施耐德ATV12变频器通讯程序三菱FX3U与3台施耐德ATV12变频器通讯案例程序

三菱FX3U与3台施耐德ATV12变频器通讯程序三菱FX3U与3台施耐德ATV12变频器通讯案例程序,有注释。 并附送程序,有接线方式,设置。 同时解决施耐德ATV变频器断电重启后,自准备工作,程序稳定可靠。 器件:三菱FX…

200plc与施耐德ATV610变频器modbus通讯

200plc与施耐德ATV610变频器modbus通讯 1,读写变频器的内部参数 2,控制变频器正反转,停止,读电压电流 3,设置变频器输出频率 有详细注释,简单易懂 ID:6910656225693423

欧姆龙CP1H+CIF11与3台施耐德ATV12变频器通讯

欧姆龙CP1HCIF11与3台施耐德ATV12变频器通讯 功能:原创程序,可直接用于现场程序。 欧姆龙CP1H的CIF11通讯板,实现对3台施耐德ATV12变频器 设定频率,读取实际频率,变频器状态功能。 反应灵敏,通讯稳定可靠。…

(3)网页视频获取下载案例3

在这之前已经试了两次&#xff0c;这次还要下载一个视频。 1.原网页&#xff1a;5G智慧工厂-青岛海尔 - 华为企业业务 ctrlshiftc打开调试&#xff0c;右边选中视频对应的区域的代码。&#xff08;一般是又MP4字样的&#xff09; 2.复制下来 <div class"vedioplay p…

ATV写入新的ntp服务器地址

1、打开adb设置-系统-关于-连续点击4次 Android TV操作系统版本&#xff0c;此时回到系统就有开发者选项-勾选USB调试 2、连接adb&#xff08;下载adb工具包-位于网盘&#xff09; 如果有弹框 请点击确定按钮&#xff0c;如果没有弹框&#xff0c;请检查开发者模式下的USB调试…

三菱FX3U 485ADP MB与3台施耐德ATV 71变频器通讯实战程序

三菱FX3U 485ADP MB与3台施耐德ATV 71变频器通讯实战程序 程序为原创&#xff0c;稳定可靠&#xff0c;有注释。 并附送程序&#xff0c;有接线方式&#xff0c;设置。 同时实现变频器 DRIVECOM流程&#xff0c;解决施耐德ATV变频器断电重启后&#xff0c;自准备工作&#xff0…