Want more timely Centmin Mod News Updates?
Become a Member

Upgrade Nginx unknown directive "vhost_traffic_status_zone" in /usr/local/nginx/conf/vts_http.conf:1

Discussion in 'Install & Upgrades or Pre-Install Questions' started by WigglerSpot, Apr 12, 2019.

  1. WigglerSpot

    WigglerSpot New Member

    5
    0
    1
    Jan 22, 2019
    Ratings:
    +0
    Local Time:
    12:16 PM
    latest
    latest
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 6 64bit
    • Centmin Mod Version Installed: 123.08stable
    • Nginx Version Installed: nginx/1.15.11 (100419-014228-centos7-openvz-lxc)
    • PHP Version Installed: PHP 5.6.40
    • When was last time updated Centmin Mod code base ? : up to date
    • Persistent Config: LETSENCRYPT_DETECT='y'
    Recently updated to nginx 1.511 - sometime after started getting 403 forbidden errors when trying to browse locally and

    "
    This site can’t be reached
    www.mydomain.com took too long to respond."

    in chrome.

    Error logs inside the domain directory are blank and the error_log in /usr/local/nginx/logs/error.log

    says "
    2019/04/12 02:09:41 [emerg] 24165#24165: unknown directive "vhost_traffic_status_zone" in /usr/local/nginx/conf/vts_http.conf:1"

    the 1 line in vts_http.conf is:
    vhost_traffic_status_zone;

    nginx -t says:

    nginx: [emerg] unknown directive "vhost_traffic_status_zone" in /usr/local/nginx/conf/vts_http.conf:1
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

    Any ideas? I never edited or changed these config files and didn't even know they existed until this happened.

    I dk if it's my lack of familiarity with nginx but it sure seems like diagnosing errors is way harder than it should be.

    Nginx was running great until I updated it from the centmin menu (which I have done successfully before). After this latest update, I tested to make sure the 1 domain hosted on the server was working and it was. Now it's not.

    The other thing that changed was the banner/whatever i get from nginx when log in telling me there is new updates, etc no longer is displayed. I can run the centmin menu, etc fine but no opening log in banner.

    I changed nothing on this server and don't use it for anything other than hosting this 1 website so it's odd the opening login banner is gone.
     
  2. WigglerSpot

    WigglerSpot New Member

    5
    0
    1
    Jan 22, 2019
    Ratings:
    +0
    Local Time:
    12:16 PM
    latest
    latest
    I deleted all references to this mystery vhost traffix status zone directory and now nginx starts without the error (it started before but ignored the error). My guess is this error is unrelated to my problem as I know get this error

    "
    2019/04/12 02:31:22

    26443#26443: setpriority(-10) failed (13: Permission denied)
    "
    in /usr/local/nginx/logs/error.log

     
  3. eva2000

    eva2000 Administrator Staff Member

    39,155
    8,647
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,296
    Local Time:
    3:16 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    For posting command output try using CODE bbcode tags to keep formatting How to use forum BBCODE code tags :)

    Are you using Centmin Mod 123.08stable or 123.09beta01 ? It looks like you may be using 123.09beta01 as nginx -V output has build tagging (100419-014228-centos7-openvz-lxc) which 123.08stable doesn't have
    Code (Text):
    nginx/1.15.11 (100419-014228-centos7-openvz-lxc)


    There are several ways to find out which version of centmin mod you're using. Some of the latter methods are unique to Centmin Mod 123.09beta01 only.

    1. /etc/centminmod-release file uses the old format of versions 1.2.3-eva2000.09 = 123.09beta01
    Code (Text):
    cat /etc/centminmod-release
    1.2.3-eva2000.09.009
    

    and /etc/centminmod-versionlog file for history of versions used
    Code (Text):
    cat /etc/centminmod-versionlog
    123.09beta01.b121 #Mon Apr  1 08:48:04 UTC 2019
    123.09beta01.b122 #Tue Apr  2 12:31:42 UTC 2019
    123.09beta01.b122 #Tue Apr  2 13:44:32 UTC 2019
    123.09beta01.b122 #Tue Apr  2 16:56:33 UTC 2019
    123.09beta01.b122 #Tue Apr  2 17:55:26 UTC 2019
    123.09beta01.b123 #Wed Apr  3 06:33:27 UTC 2019
    123.09beta01.b124 #Wed Apr  3 12:27:47 UTC 2019
    123.09beta01.b124 #Thu Apr  4 05:27:21 UTC 2019
    123.09beta01.b124 #Thu Apr  4 05:48:08 UTC 2019
    123.09beta01.b125 #Sat Apr  6 16:05:51 UTC 2019
    123.09beta01.b125 #Sat Apr  6 16:07:22 UTC 2019
    123.09beta01.b125 #Sat Apr  6 16:15:31 UTC 2019
    


    2. running centmin.sh menu itself Centmin Mod Menu - CentminMod.com LEMP Nginx web stack for CentOS
    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com   
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 


    3. For 123.09beta01, the centmin mod code directory at /usr/local/src/centminmod is where centmin.sh menu resides and is by default installed as a local git backed repo. So git branch command works too
    Code (Text):
    cd /usr/local/src/centminmod
    git branch
    

    Code (Text):
    git branch
    * 123.09beta01
    


    when was last time you ran 123.08stable's centmin.sh menu option 23 submenu option 2 to update 123.08stable as outlined at https://centminmod.com/upgrade.html. I would do that before you run centmin.sh menu option updates to ensure you are on latest 123.08stable code which gets updated - commit history at centminmod/centminmod and in commit forum's tagged prefix at https://community.centminmod.com/forums/centmin-mod-github-commits.41/?prefix_id=48

    if using 123.09beta01, then you use cmupdate command to update code instead of centmin.sh menu option 23 submenu option 2 - it looks like you may be using 123.09beta01 as nginx -V output has build tagging (100419-014228-centos7-openvz-lxc) which 123.08stable doesn't have
    Code (Text):
    nginx/1.15.11 (100419-014228-centos7-openvz-lxc)


    123.08stable has NGINX_VHOSTSTATS='y' enabled by default for vhost nginx stats. So it should not give that error unless your nginx recompile via centmin.sh menu option 4 failed to properly compile nginx with nginx-module-vts module support demo'd at https://centminmod.com/nginx.html#vhoststats and https://community.centminmod.com/th...t-traffic-statistics-preview-discussion.3022/

    This differs to 123.09beta01 has NGINX_VHOSTSTATS='n' disabled by default.

    You can check nginx upgrade log to see why you nginx 1.15.11 recompile via centmin.sh menu option 4 may have failed to properly compile or why it obmitted and ignored NGINX_VHOSTSTATS='y' in 123.08stable

    To troubleshoot, you need to check the full nginx upgrade log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the nginx_upgrade.log log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    also what's output of
    Code (Text):
    nginx -t

    when you run centmin.sh menu option 4 there's a nginx upgrade log timestamped at /root/centminlogs

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | grep nginx_upgrade
    -rw-r--r--  1 root root 3.2M Oct 11 15:55 centminmod_1.2.3-eva2000.09.001_111016-155345_nginx_upgrade.log
    -rw-r--r--  1 root root 672K Oct 11 22:06 centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log

    So the last nginx upgrade log was named centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log and located at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log

    then use cat command to output the contents of that log

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of one specific log, in this case most recent nginx_upgrade.log log
     
  4. eva2000

    eva2000 Administrator Staff Member

    39,155
    8,647
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,296
    Local Time:
    3:16 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Also if you're using Centmin Mod 123.09beta01 and OpenVZ 7 based CentOS 7 you may have run into issue @jcat had https://community.centminmod.com/threads/php-fpm-fails-to-start-on-openvz7.17045/. So if you are using OpenVZ 7 based VPS with CentOS 7 you may need to edit /etc/systemd/system/php-fpm.service.d/limit.conf to remove the line
    Code (Text):
    Nice=-10

    then restart php-fpm service
    Code (Text):
    systemctl daemon-reload
    systemctl restart php-fpm
    

    only applies to 123.09beta01 and not 123.08stable
     
  5. WigglerSpot

    WigglerSpot New Member

    5
    0
    1
    Jan 22, 2019
    Ratings:
    +0
    Local Time:
    12:16 PM
    latest
    latest
    Eva,

    Thanks for the help.

    Any ideas why the login welcome text telling me there are updates or not would disappear (sorry - not sure the correct terminology for this... message of the day? login banner?)

    Logging into the shell just gives me the shell prompt whereas before I got the comforting centmin welcome.
     
  6. eva2000

    eva2000 Administrator Staff Member

    39,155
    8,647
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,296
    Local Time:
    3:16 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    are you logging in as full root user or did you create a non-root user to login with ? the MOTD display message is only when full root user logs in
     
..