事象
Webサーバ経由でWASプロファイルにアクセスした際、「/usr/IBM/WebSphere/Plugins/logs/profile_name/http_plugin.log」に以下のエラーが書き込まれる
ERROR: ws_common: websphereUpdateConfig: Failed to stat plugin config file: ..../plugin-cfg.xml ERROR: ws_common: websphereShouldHandleRequest: Config reloading FAILED; using old config
環境情報
- AIX 7.1
- WAS 9.0
- IHS 9.0
原因
httpdの子プロセスがplugin-cfg.xmlにアクセス権限がなかった
対応策
ihsの子プロセスのグループを指定し、plugin-cfg.xmlのオーナーグループを変更
以下、補足です。
補足
HTTPサーバからWASのプロファイルに転送する形となっているため、「httpd.conf」の中には以下のようにプラグイン構成ファイルが
WebSpherePluginConfig /usr/IBM/WebSphere/Plugins/config/profile_name/plugin-cfg.xml
指定されていました。
本エラーは、こちらのplugin-cfg.xmlにhttpdの子プロセスに対する読み取り原因がなかったことが原因でした。
対応前の該当ファイルは以下のような権限でした。
# ls -l plugin-cg.xml -rw------- XX root system XX ... pluigin-cfg.xml
httpdの子プロセスを確認すると
# ps -ef | grep httpd nobody XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start nobody XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start root XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start nobody XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start
といったようにnobodyというroot以外のユーザでで立ち上げっているプロセスがあり、この子プロセスがアクセスしようとする模様です。
ちなみにnobodyユーザですが、httpd.confで変更可能です。
例えば、今回はihsですのでihsadminというユーザ(グループ)で起動したい場合は「httpd.conf」のUser、Groupを以下のように変更します。
#変更前 User nobody Group nobody
#変更後 User ihsadmin Group ihsadmin
HTTPサーバの落とし上げを行った後に
# /usr/IBM/HTTPServer/bin/apachectl -k stop # /usr/IBM/HTTPServer/bin/apachectl -k start
再度プロセスを確認すればユーザ名がnobodyから変更されています。
# ps -ef | grep httpd ihsadmin XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start ihsadmin XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start root XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start ihsadmin XX XX XX - XX /usr/IBM/HTTPServer/bin/httpd -d /usr/IBM/HTTPServer/ -k start
あとは読み取り権限を付与すべく、httpd.confとplugin-cfg.xmlのグループオーナーをihsadminと変更しすれば同グループのユーザから読み取り権限が与えられ、エラーは解消しました。
以上、備忘録でした。