質問編集履歴

2

二重起動が行われない様子を確認

2022/09/18 02:08

投稿

hoshi_no_senshi
hoshi_no_senshi

スコア48

test CHANGED
File without changes
test CHANGED
@@ -13,3 +13,31 @@
13
13
  よろしくお願いいたします。
14
14
 
15
15
  環境はCentOS7でございます。
16
+
17
+ 【解決、動作確認がとれたため追記】
18
+ 以下、「journalctl -f」にて初回起動時ともう一度起動しようとしたときのログの比較です。
19
+ 2つのどちらも「systemctl start httpd」にてApacheを起動しようとしたときに発生したログとなります。
20
+ ```1.Apacheの初回起動のとき
21
+ 9月 17 18:37:57 localhost.localdomain polkitd[576]: Registered Authentication Agent for unix-process:3406:107318 (system bus name :1.157 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale ja_JP.UTF-8)
22
+ 9月 17 18:37:59 localhost.localdomain polkitd[576]: Operator of unix-process:3406:107318 successfully authenticated as unix-user:hoshino to gain ONE-SHOT authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.158 [systemctl start httpd] (owned by unix-user:hoshino)
23
+ 9月 17 18:37:59 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
24
+ 9月 17 18:37:59 localhost.localdomain httpd[3426]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
25
+ 9月 17 18:37:59 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
26
+ 9月 17 18:37:59 localhost.localdomain polkitd[576]: Unregistered Authentication Agent for unix-process:3406:107318 (system bus name :1.157, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale ja_JP.UTF-8) (disconnected from bus)
27
+ ```
28
+
29
+ ```2.Apacheをもう一度起動しようとしたとき
30
+ 9月 17 18:38:41 localhost.localdomain polkitd[576]: Registered Authentication Agent for unix-process:3449:111806 (system bus name :1.161 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale ja_JP.UTF-8)
31
+ 9月 17 18:38:47 localhost.localdomain polkitd[576]: Operator of unix-process:3449:111806 successfully authenticated as unix-user:hoshino to gain ONE-SHOT authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.162 [systemctl start httpd] (owned by unix-user:hoshino)
32
+ 9月 17 18:38:47 localhost.localdomain polkitd[576]: Unregistered Authentication Agent for unix-process:3449:111806 (system bus name :1.161, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale ja_JP.UTF-8) (disconnected from bus)
33
+ ```
34
+
35
+ 上記の2つのログを比較しますと、差分は以下のようになりました。
36
+ ```1と2の差分
37
+ 9月 17 18:37:59 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
38
+ 9月 17 18:37:59 localhost.localdomain httpd[3426]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
39
+ 9月 17 18:37:59 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
40
+ ```
41
+
42
+ 「AH00558」のServerNameを設定してください、といったエラーが出てはおりますが、初回起動時のみ「 Starting The Apache HTTP Server...」と「Started The Apache HTTP Server.」がログに残る様子が確認できました。すでに起動済の場合にもう一度起動しようとした時にはこちらのログが残りませんでしたので、二重起動はしないということが確認できました。
43
+ 既に起動しているサービスを起動しようとした時にもう一度サービスを起動しようとしても、「そのサービスは既に起動しています」といったエラーが発生することはないようですが、二重起動しようとした場合サービスの開始を示すメッセージが出なくなったとわかっただけで十分です。ありがとうございました!

1

質問タイトル誤字修正

2022/09/15 13:01

投稿

hoshi_no_senshi
hoshi_no_senshi

スコア48

test CHANGED
@@ -1 +1 @@
1
- 「systemctl start サービス名」を実行し、すでにそのサービスが立ち上がっいた場合の挙動
1
+ 「systemctl start サービス名」を実行し、すでにそのサービスが立ち上がっいた場合の挙動
test CHANGED
File without changes