Reply To: kusanagi restartに失敗する

TOP Forums バグ報告と提案(Requests and Feedback) kusanagi restartに失敗する Reply To: kusanagi restartに失敗する

#1671
kenfm0411
Participant

    横から失礼します。同じ「kusanagi restartに失敗する」ですが、症状が異なるようなので共有します。

    ■環境

    KUSANAGI 9.10.1-1.el9
    ConoHa VPS / CentOS Stream 9
    nginx131 単独構成(httpd は未使用)

    ■症状:restart だけでなく status でも失敗します

    kusanagi status を実行すると、httpd併用構成のサービスを参照して失敗します。

    $ kusanagi status
    KUSANAGI Version 9.10.1-1.el9
    conoha
    CentOS Stream 9

    kusanagi status: error: 'systemctl status nginx@with_httpd.service' returned 4

    kusanagi restart も同様に失敗します。

    Failed to stop nginx@with_httpd.service: Unit nginx@with_httpd.service not loaded.
    kusanagi restart: error: 'systemctl stop nginx@with_httpd.service' returned 5

    restart は設定ファイルとして nginx-with_httpd.conf も参照しようとします。

    kusanagi restart: error: '/opt/kusanagi/nginx/sbin/nginx -t -c /etc/opt/kusanagi/nginx/nginx-with_httpd.conf' returned 2

    ■実態は nginx 単独構成です

    一方で、以下の通り nginx 単独で正常に動作しています。

    $ kusanagi nginx --showpath
    /opt/kusanagi/nginx131/sbin/nginx

    $ systemctl is-active nginx131 httpd
    active
    inactive

    $ systemctl is-enabled nginx131 httpd
    enabled
    disabled

    httpd は inactive かつ disabled で未使用、nginx131 が単独で稼働しており、サイトも正常表示されています。実際に使われている設定も nginx.conf(単独用)です。

    それにもかかわらず、KUSANAGI は「httpd併用(with_httpd)」構成だと認識しているようで、status も restart も、存在しない nginx@with_httpd.service / nginx-with_httpd.conf を参照して失敗します。restart 単体の問題ではなく、構成判定そのものが誤っているように見えます。

    ■お伺いしたいこと

    nginx 単独構成として正しく認識させるには、どの設定を確認・修正すればよいでしょうか。KUSANAGI が構成(単独/httpd併用)をどこで判定しているかがわかれば、そこを確認したいと考えています。

    横レスで申し訳ありませんが、ご教示いただければ幸いです。