kusanagi restartに失敗する

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

kusanagi restartに失敗する

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #1666
      Hodokami
      Participant

        KUSANAGI 9.10.1-1(CentOS Stream 9)にてkusanagi restartを実施しようとしたところ下記エラーにより失敗。
        (restart自体が中断されたためサービスは生きています。)

        
        $ sudo kusanagi restart
        nginx: the configuration file /etc/opt/kusanagi/nginx/nginx.conf syntax is ok
        nginx: configuration file /etc/opt/kusanagi/nginx/nginx.conf test is successful
        No such file or directorykusanagi restart: error: '/opt/kusanagi/nginx/sbin/nginx -t -c /etc/opt/kusanagi/nginx/nginx.conf' returned 2
        

        おそらくkusanagi restartコマンド内で使おうとしているnginxコマンド自体のディレクトリが現在のKUSANAGIの仕様と一致していないか、nginxからnginx131へのシンボリックリンクがバージョンアップ他なんらかの要因によって消えてしまったと見ています。

        シンボリックリンクが存在すべき仕様かも含めて確認できますと幸いです。

        
        $ ls -la /opt/kusanagi/
        合計 92
        drwxr-xr-x. 23 root root 4096  7月  8 11:35 .
        drwxr-xr-x.  4 root root 4096 11月 27  2024 ..
        drwxr-xr-x.  4 root root 4096 12月 19  2023 apr
        drwxr-xr-x.  3 root root 4096  7月 28 11:15 bin
        drwxr-xr-x.  2 root root 4096  5月 18  2025 etc
        drwxr-xr-x.  4 root root 4096  2月 11  2025 httpd24
        drwxr-xr-x.  2 root root 4096  9月 30  2025 images
        drwxr-xr-x.  3 root root 4096 10月 18  2023 include
        drwxr-xr-x.  4 root root 4096 11月 10  2025 lib
        drwxr-xr-x.  7 root root 4096  7月 28 16:02 lib64
        drwxr-xr-x.  3 root root 4096 12月 19  2023 libexec
        drwxr-xr-x.  5 root root 4096  5月  2  2025 nginx127
        drwxr-xr-x.  5 root root 4096  7月 15  2025 nginx128
        drwxr-xr-x.  5 root root 4096  6月 11 10:54 nginx129
        drwxr-xr-x.  6 root root 4096  6月 11 10:54 nginx131
        drwxr-xr-x.  5 root root 4096  6月 25 20:44 nodejs22
        drwxr-xr-x.  5 root root 4096  5月 11 19:11 openssl
        lrwxrwxrwx.  1 root root    7  7月  7 15:13 php -> php-8.5
        drwxr-xr-x.  6 root root 4096 12月 19  2023 php-8.3
        drwxr-xr-x.  6 root root 4096 12月 22  2024 php-8.4
        drwxr-xr-x.  6 root root 4096 12月  4  2025 php-8.5
        lrwxrwxrwx.  1 root root   23  3月 10 17:47 python -> /opt/kusanagi/python312
        drwxr-xr-x.  8 root root 4096  9月 30  2025 python312
        drwxr-xr-x.  2 root root 4096  7月 28 11:15 sbin
        drwxr-xr-x. 10 root root 4096  5月 18  2025 share
        
      • #1667
        hideishi
        Participant

          Hodokamiさん

          kusanagi statusの結果を貼っていただけますか。
          また kusanagi nginx --showpath の結果もいただけますか。

          kusanagiのnginxは nginxXXX.service という名前になっており、この名前を元に /opt/kusanagi/nginxXXX/sbin/nginx のパスに変換しています。
          何らかの理由でnginxのサービス名が正しくない状態になっているのではないかと思います。

        • #1668
          Hodokami
          Participant

            hideishi さん

            kusanagi statusおよびkusanagi nginx --showpathの結果は以下のようになっております。

            
            $ kusanagi status
            KUSANAGI Version 9.10.1-1.el9
            sakura
            CentOS Stream 9
            
            *** (active) nginx : nginx131 ***
            ● nginx131.service - The NGINX HTTP and reverse proxy server
                 Loaded: loaded (/usr/lib/systemd/system/nginx131.service; enabled; preset: disabled)
                 Active: active (running) since Tue 2026-07-28 16:04:13 JST; 2h 38min ago
            
            *** (inactive) httpd : httpd24 ***
            ○ httpd.service - The Apache HTTP Server
                 Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
                 Active: inactive (dead)
            
            *** (active) php : php85 ***
            ● php-fpm.service - The PHP FastCGI Process Manager
                 Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; preset: disabled)
                 Active: active (running) since Mon 2026-07-27 14:38:27 JST; 1 day 4h ago
            
            *** (active) mariadb : mariadb ***
            ● mariadb.service - MariaDB 12.3.2 database server
                 Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
                 Active: active (running) since Mon 2026-07-27 14:38:29 JST; 1 day 4h ago
            
            *** (inactive) psql :  ***
            
            *** (inactive) pgpool-II :  ***
            
            *** python ***
            Python 3.12.13
            
            *** Cache status ***
            
            *** WAF ***
            off
            
            *** SELinux ***
            on
            
            status completed.
            
            $ kusanagi nginx --showpath
            /opt/kusanagi/nginx131/sbin/nginx
            nginx completed.
            
          • #1669
            hideishi
            Participant

              Hodokamiさん

              kusanagi statusとkusanagi nginx --showpathに問題はなさそうですね。
              kusanagi restartコマンドの異常と考えます。

              まず systemctl restart kusanagi でkusanagiサービスをリスタートしてみてください。
              何らかの理由で古い kusanagi のモジュールのまま動作している可能性があります。

              それでも解消しない場合は
              /var/opt/kusanagi/log/kusanagi/backend.log
              にログが出ていると思われますので、最後のエラーあたりのログをいただけますでしょうか。

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.

          Next article

          フォーラムについて