PacemakerでApacheリソースを起動できません。

PacemakerでApacheリソースを起動できません。

私は、PacemakerとCorosyncを使用してCentOS7を実行する3つのノードを持つデフォルトのApache HAクラスタを設定しています。何らかの理由でPCでApacheリソースを起動できません。

クラスタIP:192.168.200.40

# pcs resource show ClusterIP
     Resource: ClusterIP (class=ocf provider=heartbeat type=IPaddr2)
      Attributes: cidr_netmask=24 ip=192.168.200.40
      Operations: monitor interval=20s (ClusterIP-monitor-interval-20s)
                  start interval=0s timeout=20s (ClusterIP-start-interval-0s)
                  stop interval=0s timeout=20s (ClusterIP-stop-interval-0s)



# pcs resource show WebServer
 Resource: WebServer (class=ocf provider=heartbeat type=apache)
  Attributes: configfile=/etc/httpd/conf/httpd.conf statusurl=http://localhost/server-status
  Operations: monitor interval=1min (WebServer-monitor-interval-1min)
              start interval=0s timeout=40s (WebServer-start-interval-0s)
              stop interval=0s timeout=60s (WebServer-stop-interval-0s)



# pcs status
Cluster name: 
WARNING: corosync and pacemaker node names do not match (IPs used in setup?)
Stack: corosync
Current DC: server3.example.com (version 1.1.18-11.el7_5.2-2b07d5c5a9) - partition with quorum
Last updated: Thu Jun  7 21:59:09 2018
Last change: Thu Jun  7 21:45:23 2018 by root via cibadmin on server1.example.com

3 nodes configured
2 resources configured

Online: [ server1.example.com server2.example.com server3.example.com ]

Full list of resources:

 ClusterIP  (ocf::heartbeat:IPaddr2):   Started server2.example.com
 WebServer  (ocf::heartbeat:apache):    Stopped

Failed Actions:
* WebServer_start_0 on server3.example.com 'unknown error' (1): call=49, status=Timed Out, exitreason='',
    last-rc-change='Thu Jun  7 21:46:03 2018', queued=0ms, exec=40002ms
* WebServer_start_0 on server1.example.com 'unknown error' (1): call=53, status=Timed Out, exitreason='',
    last-rc-change='Thu Jun  7 21:45:23 2018', queued=0ms, exec=40003ms
* WebServer_start_0 on server2.example.com 'unknown error' (1): call=47, status=Timed Out, exitreason='',
    last-rc-change='Thu Jun  7 21:46:43 2018', queued=1ms, exec=40002ms


Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

httpdインスタンスは有効そして走る3つのノードすべてで。クラスタIPと各ノードIPの両方がWebページにアクセスできます。 ClusterIP リソースはフェイルオーバーにも適しています。この状況でApacheリソースにどのような問題が発生する可能性がありますか?

とても感謝しています!

修正する:

以下は、デバッグ出力の追加情報です。 Apacheはポートにバインドできないようですが、Apacheログにエラーはなく、systemctl status httpdすべてのノードで緑色で表示されます。クラスタIPと各ノードIPでWebページを開くことができます。 ClusterIP リソースのフェイルオーバーもうまく機能します。 Apacheリソースがハートビートで動作しない理由をご存知ですか?

# pcs resource debug-start WebServer --full
Operation start for WebServer (ocf:heartbeat:apache) failed: 'Timed Out' (2)
 >  stderr: ERROR: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs
 >  stderr: INFO: apache not running
 >  stderr: INFO: waiting for apache /etc/httpd/conf/httpd.conf to come up
 >  stderr: INFO: apache not running
 >  stderr: INFO: waiting for apache /etc/httpd/conf/httpd.conf to come up
 >  stderr: INFO: apache not running
 >  stderr: INFO: waiting for apache /etc/httpd/conf/httpd.conf to come up
 >  stderr: INFO: apache not running

ベストアンサー1

httpdPIDファイルの場所によるものです。私は同じ問題を抱えていましPidFile /var/run/httpd.pidhttpd.confwebserverhttpdwebserver

長い間隔の後に答えを追加することは関係ありませんが、誰かに役立つ可能性があることを知っています。

おすすめ記事