0

我已经配置了一个集群并且它运行正常,除非我在 php.ini 文件中添加一个 zend 扩展。在我的测试中,我关闭了故障转移服务器,因此我只处理单个服务器。我正在运行 Ubuntu 12.04、corosync 1.4.2 和 drbd 8.4.3 这是我相关的 crm 配置:

primitive apache2 ocf:heartbeat:apache \
        params configfile="/etc/apache2/apache2.conf" httpd="/usr/sbin/apache2" \
        operations $id="apache2-operations" \
        op monitor interval="15s" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="240s" \
        meta target-role="started"

我的 php.ini 是与 apt-get 一起安装的库存。在这种情况下,它可以正常工作。

但是当我向 /etc/php5/apache2/php.ini 添加一个 zend 负载时:

zend_extension = /var/www/ioncube/ioncube_loader_lin_5.3.so

我可以运行 service apache restart 并启动网站但是如果我尝试从 crm 启动它,它会失败并显示以下日志:

    Apr 17 23:16:23 lzc1 lrmd: [1048]: WARN: Managed apache2:start process 2675 exited with return code 1.
    Apr 17 23:16:23 lzc1 lrmd: [1048]: info: operation start[31] on apache2 for client 1051: pid 2675 exited with return code 1
    Apr 17 23:16:23 lzc1 crmd: [1051]: info: process_lrm_event: LRM operation apache2_start_0 (call=31, rc=1, cib-update=42, confirmed=true) unknown error
    Apr 17 23:16:23 lzc1 attrd: [1049]: notice: attrd_ais_dispatch: Update relayed from lzc2
    Apr 17 23:16:23 lzc1 attrd: [1049]: notice: attrd_trigger_update: Sending flush op to all hosts for: fail-count-apache2 (INFINITY)
    Apr 17 23:16:23 lzc1 attrd: [1049]: notice: attrd_perform_update: Sent update 53: fail-count-apache2=INFINITY
    Apr 17 23:16:23 lzc1 attrd: [1049]: notice: attrd_ais_dispatch: Update relayed from lzc2
    Apr 17 23:16:23 lzc1 attrd: [1049]: notice: attrd_trigger_update: Sending flush op to all hosts for: last-failure-apache2 (1397790983)
    Apr 17 23:16:23 lzc1 attrd: [1049]: notice: attrd_perform_update: Sent update 55: last-failure-apache2=1397790983
    Apr 17 23:16:23 lzc1 crmd: [1051]: info: do_lrm_rsc_op: Performing key=6:102:0:c4a37f0f-2071-433e-83a3-50fb5d9e0ad2 op=apache2_stop_0 )
    Apr 17 23:16:23 lzc1 lrmd: [1048]: info: rsc:apache2 stop[32] (pid 2782)
    Apr 17 23:16:23 lzc1 apache[2782]: INFO: apache is not running.
    Apr 17 23:16:23 lzc1 lrmd: [1048]: info: Managed apache2:stop process 2782 exited with return code 0.
    Apr 17 23:16:23 lzc1 lrmd: [1048]: info: operation stop[32] on apache2 for client 1051: pid 2782 exited with return code 0
    Apr 17 23:16:23 lzc1 crmd: [1051]: info: process_lrm_event: LRM operation apache2_stop_0 (call=32, rc=0, cib-update=43, confirmed=true) ok
    Apr 17 23:16:24 lzc1 lrmd: [1048]: info: operation monitor[22] on res_IPaddr2_ClusterIP for client 1051: pid 2847 exited with return code 0

如果我从 /etc/php5/apache2/php.ini 中注释掉 zend 行

;zend_extension = /var/www/ioncube/ioncube_loader_lin_5.3.so

然后启动服务器,它工作。以下是它何时工作的日志:

Apr 17 23:20:10 lzc1 crmd: [1051]: info: do_lrm_rsc_op: Performing key=76:107:0:c4a37f0f-2071-433e-83a3-50fb5d9e0ad2 op=apache2_start_0 )
Apr 17 23:20:10 lzc1 lrmd: [1048]: info: rsc:apache2 start[37] (pid 12579)
Apr 17 23:20:10 lzc1 cib: [1047]: info: Managed write_cib_contents process 12578 exited with return code 0.
Apr 17 23:20:10 lzc1 apache[12579]: INFO: apache not running
Apr 17 23:20:10 lzc1 apache[12579]: INFO: waiting for apache /etc/apache2/apache2.conf to come up
Apr 17 23:20:11 lzc1 lrmd: [1048]: info: Managed apache2:start process 12579 exited with return code 0.
Apr 17 23:20:11 lzc1 lrmd: [1048]: info: operation start[37] on apache2 for client 1051: pid 12579 exited with return code 0
Apr 17 23:20:11 lzc1 crmd: [1051]: info: process_lrm_event: LRM operation apache2_start_0 (call=37, rc=0, cib-update=53, confirmed=true) ok
Apr 17 23:20:11 lzc1 crmd: [1051]: info: do_lrm_rsc_op: Performing key=77:107:0:c4a37f0f-2071-433e-83a3-50fb5d9e0ad2 op=apache2_monitor_15000 )
Apr 17 23:20:11 lzc1 lrmd: [1048]: info: rsc:apache2 monitor[38] (pid 12673)
Apr 17 23:20:11 lzc1 lrmd: [1048]: info: Managed apache2:monitor process 12673 exited with return code 0.
Apr 17 23:20:11 lzc1 lrmd: [1048]: info: operation monitor[38] on apache2 for client 1051: pid 12673 exited with return code 0
Apr 17 23:20:11 lzc1 crmd: [1051]: info: process_lrm_event: LRM operation apache2_monitor_15000 (call=38, rc=0, cib-update=54, confirmed=false) ok
4

1 回答 1

0

我不知道为什么,但这解决了它。从 ssh 控制台:

export OCF_ROOT=/usr/lib/ocf
export OCF_RESKEY_configfile="/etc/apache2/apache2.conf" httpd="/usr/sbin/apache2" statusurl="http://127.0.0.1/server-status" envfiles="/etc/apache2/envvars"
/usr/lib/ocf/resource.d/heartbeat/apache start
/usr/lib/ocf/resource.d/heartbeat/apache stop
crm resource manage apache2

也许以前没有“管理”过?

于 2014-04-18T14:15:57.143 回答