その他問い合わせ #3734
openjam-cleanup.serviceが自動起動されない
Status:
回答中
Priority:
通常
Assignee:
-
Start date:
06/11/2024
Description
jam-cleanup.serviceの自動起動設定をしているのですが、OS起動時にサービス起動失敗してしまいます。
cleanup-yyyy-mm-dd.logログを確認すると「[ERROR] SQLSTATE[HY000] [2002] Connection refused 」というエラーがでて起動失敗しているようでした。
「systemctl start jam-cleanup.service」コマンドで起動することは可能です。
原因を調査いただけないでしょうか?
以下はコマンド実行のログです。
[2024-06-07 13:39:36.384] Register this system with Red Hat Insights: insights-client --register [2024-06-07 13:39:36.384] Create an account or view all your systems at https://red.ht/insights-dashboard [2024-06-07 13:39:36.384] Last login: Fri Jun 7 13:24:18 2024 from 172.18.101.238 [2024-06-07 13:39:36.416] [root@zabbix01 ~]# systemctl status jam-cleanup.service [2024-06-07 13:39:57.989] ● jam-cleanup.service - Jobarranger Manager Cleanup Service [2024-06-07 13:39:57.989] Loaded: loaded (/usr/lib/systemd/system/jam-cleanup.service; enabled; vendor pr> [2024-06-07 13:39:57.989] Active: inactive (dead) since Wed 2024-03-27 16:12:27 JST; 2 months 11 days ago [2024-06-07 13:39:57.989] Process: 971 ExecStart=/usr/bin/sh /usr/share/jobarranger/api/script/run_cleanup> [2024-06-07 13:39:57.989] Main PID: 976 (code=exited, status=0/SUCCESS) [2024-06-07 13:39:57.989] [2024-06-07 13:39:57.989] 3月 27 16:12:26 zabbix01 systemd[1]: Starting Jobarranger Manager Cleanup Servi> [2024-06-07 13:39:57.989] 3月 27 16:12:26 zabbix01 systemd[1]: Started Jobarranger Manager Cleanup Servic> [2024-06-07 13:39:57.989] 3月 27 16:12:27 zabbix01 systemd[1]: jam-cleanup.service: Succeeded. [2024-06-07 13:39:57.989] lines 1-9/9 (END)[root@zabbix01 ~]# [2024-06-07 14:07:39.804] [root@zabbix01 ~]# [2024-06-07 14:07:40.304] [root@zabbix01 ~]# systemctl start jam-cleanup.service [2024-06-07 14:07:42.412] ● jam-cleanup.service - Jobarranger Manager Cleanup Service [2024-06-07 14:07:42.412] Loaded: loaded (/usr/lib/systemd/system/jam-cleanup.service; enabled; vendor pr> [2024-06-07 14:07:42.412] Active: active (running) since Fri 2024-06-07 14:07:23 JST; 2s ago [2024-06-07 14:07:42.412] Process: 868283 ExecStart=/usr/bin/sh /usr/share/jobarranger/api/script/run_clea> [2024-06-07 14:07:42.412] Main PID: 868284 (php) [2024-06-07 14:07:42.412] Tasks: 1 (limit: 203637) [2024-06-07 14:07:42.412] Memory: 9.7M [2024-06-07 14:07:42.412] CGroup: /system.slice/jam-cleanup.service [2024-06-07 14:07:42.412] mq868284 php -q cleanup.php [2024-06-07 14:07:42.412] [2024-06-07 14:07:42.412] 6月 07 14:07:23 zabbix01 systemd[1]: Starting Jobarranger Manager Cleanup Servi> [2024-06-07 14:07:42.412] 6月 07 14:07:23 zabbix01 systemd[1]: Started Jobarranger Manager Cleanup Servic> [2024-06-07 14:07:42.412] lines 1-12/12 (END)[root@zabbix01 ~]# [2024-06-07 14:07:44.225] [root@zabbix01 ~]# systemctl status jam-cleanup.service [2024-06-07 14:08:14.690] ● jam-cleanup.service - Jobarranger Manager Cleanup Service [2024-06-07 14:08:14.690] Loaded: loaded (/usr/lib/systemd/system/jam-cleanup.service; enabled; vendor pr> [2024-06-07 14:08:14.690] Active: active (running) since Fri 2024-06-07 14:07:23 JST; 34s ago [2024-06-07 14:08:14.690] Process: 868283 ExecStart=/usr/bin/sh /usr/share/jobarranger/api/script/run_clea> [2024-06-07 14:08:14.690] Main PID: 868284 (php) [2024-06-07 14:08:14.690] Tasks: 1 (limit: 203637) [2024-06-07 14:08:14.690] Memory: 9.7M [2024-06-07 14:08:14.690] CGroup: /system.slice/jam-cleanup.service [2024-06-07 14:08:14.690] mq868284 php -q cleanup.php [2024-06-07 14:08:14.690] [2024-06-07 14:08:14.690] 6月 07 14:07:23 zabbix01 systemd[1]: Starting Jobarranger Manager Cleanup Servi> [2024-06-07 14:08:14.690] 6月 07 14:07:23 zabbix01 systemd[1]: Started Jobarranger Manager Cleanup Servic> [2024-06-07 14:08:14.690] lines 1-12/12 (END)[root@zabbix01 ~]# [2024-06-07 14:08:16.283] [root@zabbix01 ~]# [2024-06-07 14:11:22.020] [root@zabbix01 ~]# [2024-06-07 14:11:45.687] [root@zabbix01 ~]# cd /var/log/jobarranger/jobmanager/ [2024-06-07 14:11:53.299] [root@zabbix01 jobmanager]# [2024-06-07 14:11:53.709] [root@zabbix01 jobmanager]# ll [2024-06-07 14:11:54.349] 合計 88 [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 350 2月 7 11:50 cleanup-2024-02-07.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 250 2月 8 16:35 cleanup-2024-02-08.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 753 2月 15 16:36 cleanup-2024-02-15.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 250 2月 29 16:22 cleanup-2024-02-29.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 250 3月 5 13:08 cleanup-2024-03-05.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 750 3月 26 17:01 cleanup-2024-03-26.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 250 3月 27 16:12 cleanup-2024-03-27.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 root root 299 6月 7 14:07 cleanup-2024-06-07.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 apache apache 314 3月 28 13:43 jobarg_manager-2024-03-28.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 apache apache 1908 4月 19 14:38 jobarg_manager-2024-04-19.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 apache apache 35796 5月 20 11:50 jobarg_manager-2024-05-20.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 apache apache 1029 5月 23 15:54 jobarg_manager-2024-05-23.log [2024-06-07 14:11:54.349] -rw-r--r-- 1 apache apache 5641 6月 7 14:07 jobarg_manager-2024-06-07.log [2024-06-07 14:11:54.359] [root@zabbix01 jobmanager]# [2024-06-07 14:12:22.122] [root@zabbix01 jobmanager]# cat cleanup-2024-06-07.log [2024-06-07 14:12:26.478] 868284:20240607:140723.675 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:12:26.478] 868284:20240607:140723.683 [INFO] Deleted Expired Object Lock:(Object type : jobnet, Object id : JOBNET_1, Username : Admin, IP Address : 172.18.101.238, last active time : 2024-06-07 05:05:57) [2024-06-07 14:12:26.478] [root@zabbix01 jobmanager]# [2024-06-07 14:12:42.678] [root@zabbix01 jobmanager]# cat cleanup-2024-03-27.log [2024-06-07 14:12:49.720] 976:20240327:161227.349 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:12:49.720] 976:20240327:161227.355 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:12:49.720] 976:20240327:161227.356 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:12:49.720] [root@zabbix01 jobmanager]# [2024-06-07 14:12:56.015] [root@zabbix01 jobmanager]# cat cleanup-2024-03-26.log [2024-06-07 14:15:14.280] 964:20240326:154741.592 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:15:14.280] 964:20240326:154741.594 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:15:14.280] 964:20240326:154741.595 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:15:14.280] 983:20240326:162524.442 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:15:14.280] 983:20240326:162524.445 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:15:14.280] 983:20240326:162524.446 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:15:14.280] 999:20240326:170134.375 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:15:14.280] 999:20240326:170134.383 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:15:14.280] 999:20240326:170134.385 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:15:14.280] [root@zabbix01 jobmanager]# [2024-06-07 14:17:15.006] [root@zabbix01 jobmanager]# [2024-06-07 14:20:27.695] [root@zabbix01 jobmanager]# [2024-06-07 14:20:27.844] [root@zabbix01 jobmanager]# reboot [2024-06-07 14:32:14.416] Register this system with Red Hat Insights: insights-client --register [2024-06-07 14:32:14.416] Create an account or view all your systems at https://red.ht/insights-dashboard [2024-06-07 14:32:14.416] Last login: Fri Jun 7 14:21:52 2024 from 172.18.101.238 [2024-06-07 14:32:14.448] [root@zabbix01 ~]# [root@zabbix01 ~]# uptime [2024-06-07 14:32:18.255] 14:32:01 up 11 min, 1 user, load average: 0.16, 0.26, 0.18 [2024-06-07 14:32:18.255] [root@zabbix01 ~]# [2024-06-07 14:32:18.958] [root@zabbix01 ~]# uptime -s [2024-06-07 14:32:47.748] 2024-06-07 14:20:59 [2024-06-07 14:32:47.748] [root@zabbix01 ~]# [2024-06-07 14:32:48.795] [root@zabbix01 ~]# systemctl status jam-cleanup.srervice [2024-06-07 14:33:05.479] ● jam-cleanup.service - Jobarranger Manager Cleanup Service [2024-06-07 14:33:05.479] Loaded: loaded (/usr/lib/systemd/system/jam-cleanup.service; enabled; vendor preset: disabled) [2024-06-07 14:33:05.479] Active: inactive (dead) since Fri 2024-06-07 14:21:02 JST; 11min ago [2024-06-07 14:33:05.479] Process: 979 ExecStart=/usr/bin/sh /usr/share/jobarranger/api/script/run_cleanup.sh (code=exited, status=0/SUCCESS) [2024-06-07 14:33:05.479] Main PID: 984 (code=exited, status=0/SUCCESS) [2024-06-07 14:33:05.479] [2024-06-07 14:33:05.479] 6月 07 14:21:01 zabbix01 systemd[1]: Starting Jobarranger Manager Cleanup Service... [2024-06-07 14:33:05.479] 6月 07 14:21:01 zabbix01 systemd[1]: Started Jobarranger Manager Cleanup Service. [2024-06-07 14:33:05.479] 6月 07 14:21:02 zabbix01 systemd[1]: jam-cleanup.service: Succeeded. [2024-06-07 14:33:05.479] [root@zabbix01 ~]# [2024-06-07 14:33:06.103] [root@zabbix01 ~]# cd /var/log/jobarranger/jobmanager/ [2024-06-07 14:33:39.368] [root@zabbix01 jobmanager]# [2024-06-07 14:33:39.634] [root@zabbix01 jobmanager]# ll [2024-06-07 14:33:40.618] 合計 88 [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 350 2月 7 11:50 cleanup-2024-02-07.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 250 2月 8 16:35 cleanup-2024-02-08.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 753 2月 15 16:36 cleanup-2024-02-15.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 250 2月 29 16:22 cleanup-2024-02-29.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 250 3月 5 13:08 cleanup-2024-03-05.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 750 3月 26 17:01 cleanup-2024-03-26.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 250 3月 27 16:12 cleanup-2024-03-27.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 root root 652 6月 7 14:21 cleanup-2024-06-07.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 apache apache 314 3月 28 13:43 jobarg_manager-2024-03-28.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 apache apache 1908 4月 19 14:38 jobarg_manager-2024-04-19.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 apache apache 35796 5月 20 11:50 jobarg_manager-2024-05-20.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 apache apache 1029 5月 23 15:54 jobarg_manager-2024-05-23.log [2024-06-07 14:33:40.618] -rw-r--r-- 1 apache apache 5641 6月 7 14:07 jobarg_manager-2024-06-07.log [2024-06-07 14:33:40.618] [root@zabbix01 jobmanager]# [2024-06-07 14:33:41.227] [root@zabbix01 jobmanager]# cat cleanup-2024-06-07.log [2024-06-07 14:33:47.928] 868284:20240607:140723.675 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:33:47.928] 868284:20240607:140723.683 [INFO] Deleted Expired Object Lock:(Object type : jobnet, Object id : JOBNET_1, Username : Admin, IP Address : 172.18.101.238, last active time : 2024-06-07 05:05:57) [2024-06-07 14:33:47.928] 868284:20240607:142016.009 [INFO] jam-cleanup service is stopped. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:33:47.928] 984:20240607:142102.425 [INFO] jam-cleanup service is started. Job Arranger 6.1.0 (revision 2731). [2024-06-07 14:33:47.928] 984:20240607:142102.430 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:33:47.928] 984:20240607:142102.431 [ERROR] SQLSTATE[HY000] [2002] Connection refused [2024-06-07 14:33:47.928] [root@zabbix01 jobmanager]# [2024-06-07 14:33:48.553] [root@zabbix01 jobmanager]# exit [2024-06-07 14:33:56.489] ログアウト
Updated by 保守サポート 担当333 3 months ago
「[ERROR] SQLSTATE[HY000] [2002] Connection refused 」は、jam-cleanup.service がデータベースに接続できないために発生します。
原因は以下が考えられます。
1) データベースのサービスが停止している。
2) SELinuxステータスが有効になっている。
3) Firewalldの設定