★以下について、tomcat@tomcat.serviceを作成することでtomcat登録が正常に行えました。
しかし、なぜpacemaker+corosyncはtomcat.serviceではなく、tomcat@tomcat.serviceを
必要としていたのでしょうか?
【追記】tomcat@tomcat.serviceは既存のtomcat.serviceをコピーして作成しました。
pacemaker+corosyncに、リソースとしてtomcatを登録したいのですが、下記エラーが発生し、登録に失敗します。
corosync.log
1Jan 27 06:33:11 [32248] osact lrmd: notice: operation_finished: Tomcat_Cluster_start_0:5314:stderr [ Failed to start tomcat@tomcat.service: Unit not found. ]
エラー要因はなんでしょうか?
※tomcat@tomcat.serviceが無いことらしいのですが、
/usr/lib/systemd/system配下には、tomcat.serviceおよびtomcat@.serviceは
存在します。
※pacemaker+corosyncを介さずに、systemctl start tomcat で正常にtomcat起動でき、http://localhost:8080へも正常アクセスできることは確認済みです。
■環境情報
OS:CentOS7.3.1611
pacemake:1.1.15
corosync:2.4.0
tomcat:8.5.11
■(追記)pcs config実行結果
pcs
1[root@osact ~]# pcs config 2Cluster Name: cluster_os 3Corosync Nodes: 4 osact ossby 5Pacemaker Nodes: 6 osact ossby 7 8Resources: 9 Resource: VIP (class=ocf provider=heartbeat type=IPaddr2) 10 Attributes: ip=192.168.172.9 cidr_netmask=24 11 Operations: start interval=0s timeout=20s (VIP-start-interval-0s) 12 stop interval=0s timeout=20s (VIP-stop-interval-0s) 13 monitor interval=10s (VIP-monitor-interval-10s) 14 Resource: Web_Cluster (class=ocf provider=heartbeat type=apache) 15 Attributes: configfile=/etc/httpd/conf/httpd.conf statusurl=http://127.0.0.1/server-status 16 Operations: start interval=0s timeout=40s (Web_Cluster-start-interval-0s) 17 stop interval=0s timeout=60s (Web_Cluster-stop-interval-0s) 18 monitor interval=1min (Web_Cluster-monitor-interval-1min) 19 Resource: Tomcat_Cluster (class=ocf provider=heartbeat type=tomcat) 20 Attributes: statusurl=http://127.0.0.1:8080/ java_home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre catalina_home=/usr/tomcat8 tomcat_user=tomcat 21 Operations: start interval=0s timeout=60s (Tomcat_Cluster-start-interval-0s) 22 stop interval=0s timeout=120s (Tomcat_Cluster-stop-interval-0s) 23 monitor interval=1min (Tomcat_Cluster-monitor-interval-1min) 24 25Stonith Devices: 26Fencing Levels: 27 28Location Constraints: 29 Resource: VIP 30 Enabled on: osact (score:INFINITY) (role: Started) (id:cli-prefer-VIP) 31 Disabled on: ossby (score:-INFINITY) (role: Started) (id:cli-ban-VIP-on-ossby) 32Ordering Constraints: 33 start VIP then start Web_Cluster (kind:Mandatory) (id:order-VIP-Web_Cluster-mandatory) 34 start Web_Cluster then start Tomcat_Cluster (kind:Mandatory) (id:order-Web_Cluster-Tomcat_Cluster-mandatory) 35Colocation Constraints: 36 Web_Cluster with VIP (score:INFINITY) (id:colocation-Web_Cluster-VIP-INFINITY) 37 Tomcat_Cluster with VIP (score:INFINITY) (id:colocation-Tomcat_Cluster-VIP-INFINITY) 38 Resource Sets: 39 set VIP (id:pcs_rsc_set_VIP_Tomcat_Cluster) setoptions score=INFINITY (id:pcs_rsc_colocation_set_VIP_Tomcat_Cluster) 40 set VIP Tomcat_Cluster (id:pcs_rsc_set_VIP_Tomcat_Cluster-1) setoptions score=INFINITY (id:pcs_rsc_colocation_set_VIP_Tomcat_Cluster-1) 41Ticket Constraints: 42 43Alerts: 44 No alerts defined 45 46Resources Defaults: 47 No defaults set 48Operations Defaults: 49 No defaults set 50 51Cluster Properties: 52 cluster-infrastructure: corosync 53 cluster-name: cluster_os 54 dc-version: 1.1.15-11.el7_3.2-e174ec8 55 have-watchdog: false 56 last-lrm-refresh: 1485467664 57 no-quorum-policy: ignore 58 stonith-enabled: false 59 60Quorum: 61 Options: 62[root@osact ~]#

回答2件
あなたの回答
tips
プレビュー