Little Bug - "nginx_reverseproxy_vhost.conf.master"

Discussion in 'General' started by Emsanator, Jan 2, 2022.

  1. Emsanator

    Emsanator Member

    Hi,
    Processes suddenly stopped and I came across this when I wanted to know the reason for stopping; It seems to be a little bug inside the plugin.
    Code:
    root@serve:~# /usr/local/ispconfig/server/server.sh
    02.01.2022-21:43 - WARNING - There is already a lockfile set, but no process running with this pid (5985). Continuing.
    vlibTemplate Error: Template (nginx_reverseproxy_vhost.conf.master) file not found.root@serve:~# ^C
    root@serve:~#
    
    Crontab;
    Code:
    52 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    0 0 * * * /usr/local/ispconfig/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null
    
    Then I tried to update the ISPconfig, but it didn't work. What causes this problem and how can I fix it?

    Server: (Debian Buster) ISPConfig 3.2.7p1 // PHP

    root@serve:~# php -v
    PHP 7.3.33-1+0~20211119.91+debian10~1.gbp618351 (cli) (built: Nov 19 2021 06:39:58) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.33-1+0~20211119.91+debian10~1.gbp618351, Copyright (c) 1999-2018, by Zend Technologies

    upload_2022-1-3_10-3-29.png
    abi sorun çözülebilir
     
    Last edited: Jan 3, 2022
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you manually enabled the nginx reverse proxy module which is not used anymore by ISPConfig. Please post the result of:

    ls -la /usr/local/ispconfig/server/plugins-enabled/
     
  3. Emsanator

    Emsanator Member

    Data received within your command:

    Code:
    root@serve:~# ls -la /usr/local/ispconfig/server/plugins-enabled/
    total 88
    drwxr-x---  2 root root 4096 Jan  2 21:42 .
    drwxr-x--- 13 root root 4096 Jan  2 15:56 ..
    lrwxrwxrwx  1 root root   71 Jan  2 15:56 apps_vhost_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/apps_vhost_plugin.inc.php
    lrwxrwxrwx  1 root root   64 Jan  2 15:56 aps_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/aps_plugin.inc.php
    lrwxrwxrwx  1 root root   67 Jan  2 15:56 backup_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/backup_plugin.inc.php
    lrwxrwxrwx  1 root root   65 Jan  2 21:42 bind_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php
    lrwxrwxrwx  1 root root   73 Jan  2 20:48 cron_jailkit_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php
    lrwxrwxrwx  1 root root   65 Jan  2 20:48 cron_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/cron_plugin.inc.php
    -rwxr-x---  1 root root   45 Jan  3 07:22 empty.dir
    lrwxrwxrwx  1 root root   69 Jan  2 15:56 firewall_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/firewall_plugin.inc.php
    lrwxrwxrwx  1 root root   73 Jan  2 20:48 ftpuser_base_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/ftpuser_base_plugin.inc.php
    lrwxrwxrwx  1 root root   75 Jan  2 15:56 mysql_clientdb_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php
    lrwxrwxrwx  1 root root   77 Jan  2 15:56 network_settings_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/network_settings_plugin.inc.php
    lrwxrwxrwx  1 root root   66 Jan  2 20:48 nginx_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/nginx_plugin.inc.php
    lrwxrwxrwx  1 root root   79 Jan  2 20:48 nginx_reverseproxy_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/nginx_reverseproxy_plugin.inc.php
    lrwxrwxrwx  1 root root   67 Jan  2 15:56 rspamd_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/rspamd_plugin.inc.php
    lrwxrwxrwx  1 root root   76 Jan  2 15:56 server_services_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/server_services_plugin.inc.php
    lrwxrwxrwx  1 root root   75 Jan  2 20:48 shelluser_base_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/shelluser_base_plugin.inc.php
    lrwxrwxrwx  1 root root   78 Jan  2 20:48 shelluser_jailkit_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/shelluser_jailkit_plugin.inc.php
    lrwxrwxrwx  1 root root   76 Jan  2 15:56 software_update_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/software_update_plugin.inc.php
    lrwxrwxrwx  1 root root   70 Jan  2 20:48 webserver_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/webserver_plugin.inc.php
    lrwxrwxrwx  1 root root   84 Jan  2 15:56 z_php_fpm_incron_reload_plugin.inc.php -> /usr/local/ispconfig/server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php
    root@serve:~#
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Run this command to fix your setup:

    Code:
    rm -f /usr/local/ispconfig/server/plugins-enabled/nginx_reverseproxy_plugin.inc.php
     
  5. Emsanator

    Emsanator Member

    Currently, the pending processes appear to be completed. Thank you for your help.
     
  6. Oh! I'm so glad I'm not the only one having this issue! I just discovered exactly the same issue, several weeks after installing 3.2.7p1, when I've made a change on a website configuration and... got stumped because 'nothing worked'.

    Actually, it was more complex than that. There was a failure 'somewhere', where the vhost file would be truncated to zero bytes, and a symlink from /etc/nginx/sites-enabled/ would not only fail to add the (required) 100- prefix, but link to the zero-byte file under /etc/nginx/sites-available/.

    Indeed, everything was related to the (non-existing?) nginx_reverseproxy_plugin. I don't remember ever enabling it manually (I'm not even sure how/where I would do that), but I do notice that there is a plugin called nginx_reverseproxy_plugin.inc.php in the Git repository. Is that the same thing? Why is it being installed, if it's not supposed to exist any longer? There is also a similar-named file on the repository for a template, called nginx_reverse_proxy_plugin.vhost.conf.master, which is not quite the same name, and this was giving me a lot of errors, ultimately terminating the request to server.sh mid-way (presumably after truncating the file to zero bytes first).

    This led me to activating the Debug functionality — something I never needed to do, in the 8 years of running ISPConfig... — to see if I could figure out anything suspicious. Things only became a bit clearer after adding the file + line number of the calling function to the logs — I could see that the 'main' vhost plugin would successfully write the file out as expected, but then the nginx reverse proxy plugin would truncate that file to zero bytes. A careful look at nginx_reverseproxy_plugin.inc.php showed that the code was quite similar to the 'main' vhost plugin, but most function calls were not being made to class app as the other plugins...

    I presume there has been some code refactoring at some point (the nginx reverse proxy plugin seems to have been changed as recently as a year ago on the Git repository), which only covered the current plugins, not the deprecated ones, and thus the 'strange' errors.

    I can only recommend that for the upcoming stable version all references to this deprecated plugin are removed from the codebase (as well as from the filesystem!), since it's supposed to be deprecated and not 'accidentally' activated (which seems to have happened to @Emsanator as well).
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I run several ISPConfig Nginx systems and this plugin got never activated on any of them. This made me curious how it's possible to get it activated at all, as there are no options to do so in the ISPConfig UI. As far as I can see, the only way to enable that plugin is by editing the data in the dbispconfig database manually and setting the field 'proxy_server' in the table 'server' to 1.
     
    ahrasis likes this.
  8. I second your curiosity! I wish I knew what I did to trigger that!
    In any case, I'd say that, since you found nothing, and only two persons ever reported this, it's far more likely to think that we did something wrong at some point.
    Note that I did run ispconfig_update.sh --force to make sure I got clean copies of every file in the proper places; naturally enough, though, there might have been things hidden deeply in the database which could have triggered this...
    Specifically, because I have been using ISPConfig for so long, moving from machine to machine, as well as having a master/slave configuration at some point, I can see that some tables in the database still keep around outdated data from those old instances. I have not deleted them — who knows what happens if they do! — but now that you've explained that nginx_reverseproxy_plugin.inc.php used to be active, but isn't any more, I wonder if I still got some remains of an ancient configuration that, somehow, still calls it at some point...
    However, it's also interesting to see that everything worked flawlessly before the latest patch — that's also what @Emsanator reported. Somehow, this patch seems to have acquired the ability to trigger something deeply buried in the ISPConfig3 configuration... but something that is quite rare, only happens in certain, very specific circumstances, and therefore won't affect the majority of users...
    Another thought: removing old files that aren't being used may not be an option, if the installation process simply writes over existing directories, but does not delete anything 'old' already stored in them. Therefore, I'd suggest that old/obsolete files should be truncated to zero bytes, or, if that causes some problems when untarring the packages, simply set them to
    PHP:
    <?php /* This file is deliberately empty */ ?>
    or something similar.
    This would overwrite all old/deprecated files that might still be lying around for no reason from previous versions. Eventually, people could run a check for those and remove them manually; but if they didn't, they would also not interfere with the rest of the application.
    I'm not sure if such a procedure would be acceptable...
     
  9. Deex

    Deex New Member

    Thanks a lot, to remove the plugin helped me. After a Update on PHP and CURL, ISpconfig gave me also the Warning


    Code:
    30.01.2023-12:01 - DEBUG [plugins.inc:118] - Calling function 'ssl' from plugin 'nginx_reverseproxy_plugin' raised by event 'web_domain_insert'.
    30.01.2023-12:01 - DEBUG [plugins.inc:118] - Calling function 'insert' from plugin 'nginx_reverseproxy_plugin' raised by event 'web_domain_insert'.
    vlibTemplate Error: Template (nginx_reverseproxy_vhost.conf.master) file not found.root@ma258:~# rm -f /usr/local/ispconfig/server/plugins-enabled/nginx_reverseproxy_plugin.inc.php
    root@ma258:~#  /usr/local/ispconfig/server/server.sh
     
  10. Didier C

    Didier C New Member

    Good morning, I have exactly the same problem.
     
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If that is the case, have you either:
    From #2:
    or from #7:
     
    ahrasis likes this.
  12. Didier C

    Didier C New Member

    Neither.

    I don't understand.

    this fix work !
    rm -f /usr/local/ispconfig/server/plugins-enabled/nginx_reverseproxy_plugin.inc.php

    and I saw the cron jobs reactivate
     

Share This Page