Welcome to Centmin Mod Community
Register Now

nginx fails to start at clean install

Discussion in 'Install & Upgrades or Pre-Install Questions' started by EckyBrazzz, May 8, 2022.

Tags:
  1. EckyBrazzz

    EckyBrazzz Active Member

    906
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +358
    Local Time:
    6:19 AM
    Latest
    Latest
    I just did a clean install and nginx won't start after the installer finished. A reboot also did not resolve the failing nginx.


    Code (Text):
    [21:22][root@srv28.domain.com ~]# systemctl status nginx.service
    ā— nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
       Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled)
       Active: failed (Result: exit-code) since Sat 2022-05-07 21:22:11 UTC; 10s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 2023 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=5)
    
    May 07 21:22:11 srv28.domain.com systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    May 07 21:22:11 srv28.domain.com systemd[1]: nginx.service: control process exited, code=exited status=5
    May 07 21:22:11 srv28.domain.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    May 07 21:22:11 srv28.domain.com systemd[1]: Unit nginx.service entered failed state.
    May 07 21:22:11 srv28.domain.com systemd[1]: nginx.service failed.
    


    My /etc/centminmod/custom_config.inc contains:
    Code (Text):
    ALERTEMAIL='private@private.com'
    WP_FASTCGI_CACHE='y' # Enable beta option 22-4
    PHP_OVERWRITECONF='n' # Prevents stupid mistakes ;)
    VHOSTCTRL_CLOUDFLAREINC='y' # add VHOSTCTRL_CLOUDFLAREINC & VHOSTCTRL_AUTOPROTECTINC
    RCLONE_ENABLE='y' # Must have entry to enable rclone addon
    #####################################################
    #####################################################
    # Nginx Dynamic Module Switches
    NGINX_DYNAMICTLS='y'
    NGXDYNAMIC_GEOIPTWOLITE='y'
    NGXDYNAMIC_BROTLI='y'
    NGXDYNAMIC_HEADERSMORE='y'
    NGXDYNAMIC_SETMISC='y'
    NGXDYNAMIC_ECHO='y'
    NGXDYNAMIC_IMAGEFILTER='y'
    NGXDYNAMIC_VHOSTSTATS='n'
    #####################################################
    NGINX_HPACK='y'
    NGINX_GEOIPTWOLITE='y' # https://github.com/leev/ngx_http_geoip2_module
    NGINX_REALIP='y' # http://nginx.org/en/docs/http/ngx_http_realip_module.html
    NGINX_LIBBROTLI='y'
    ##NGINX_OPENRESTY='y' # https://community.centminmod.com/threads/update-openresty-lua-resty-core-requirements-in-123-09beta01.15954/
    ##ORESTY_LUANGINX='y' # https://community.centminmod.com/threads/update-openresty-lua-resty-core-requirements-in-123-09beta01.15954/
    ##NGX_LUASTREAM_FORCED='y' # openresty stream-lua-nginx module https://github.com/openresty/stream-lua-nginx-module
    #NGINX_IOURING_PATCH='y' # Nginx 1.17.0+ and Linux Kernel 5.1 usage only 'y'
    NGINX_IOURING_PATCH_BETA='y' NGINX_MODSECURITY='y' # https://community.centminmod.com/threads/update-prep-for-modsecurity-v3-0.12453/
    ##NGINX_MODSECURITY_MAXMIND='y' # https://community.centminmod.com/threads/update-inc-mod_security-inc-fix-for-geoip2-conflict-in-123-09beta01.17370/
    ##NGINX_VHOSTSTATS='n' #
    ##NGINX_SSLCACHE_ALLOWOVERRIDE='y'
    ##NGINX_ZLIBCUSTOM='y' # Use custom zlib instead of system version
    ##NGINX_ZLIBVER='1.2.11' # http://www.zlib.net/ Latest 1.2.11 ZLIB, January 15, 2017
    NGINX_ZERODT='y' # enable nginx zero downtime on the fly nginx binary upgrades
    NGINX_VIDEO='y' # Enables all video
    #NGINX_RTMP='y' # Nginx RTMP Module support https://github.com/arut/nginx-rtmp-module
    ##NGINX_FLV='y' # http://nginx.org/en/docs/http/ngx_http_flv_module.html
    #NGINX_MP4='y' # Nginx MP4 Module http://nginx.org/en/docs/http/ngx_http_mp4_module.html
    ##AUTOTUNE_CLIENTMAXBODY='y' # auto tune client_max_body_size option in nginx.conf
    ##AUTOHARDTUNE_NGINXBACKLOG='y' #
    #####################################################
    # PHP
    PHP_PGO='y'
    STRIPPHP='y' # set 'y' to strip PHP binary to reduce size
    PHP_INSTALL='y' # Install PHP /w Fast Process Manager
    PHP_MEMCACHE='y' # memcache PHP extension
    PHP_PATCH='y' # Apply PHP patches if they exist
    PHP_TUNING='y' # initial php-fpm install auto tuning
    PHP_BROTLI='y' # brotli php extension https://github.com/kjdev/php-ext-brotli
    PHP_LZFOUR='y' # lz4 php extension https://github.com/kjdev/php-ext-lz4
    PHP_LZF='y' # lzf php extension https://github.com/php/pecl-file_formats-lzf php-ext-lzf
    PHP_ZSTD='y' # zstd php extension https://github.com/kjdev/php-ext-zstd
    PHP_CUSTOMSSL='n' # compile php-fpm against openssl 1.0.2+ or libressl 2.3+ whichever nginx uses
    PHPFINFO='y' # Disable or Enable PHP File Info extension
    PHPPCNTL='y' # Disable or Enable PHP Process Control extension
    PHPINTL='y' # Disable or Enable PHP intl extension
    PHPRECODE=n # Disable or Enable PHP Recode extension
    PHPIMAGICK='y' # Disable or Enable PHP ImagicK extension
    SWITCH_PHPFPM_SYSTEMD='y' # Enable Switch
    #PHPMAKETEST='y' # set to y to enable make test after PHP make for diagnostic purposes
    AUTODETECPHP_OVERRIDE='y' # when enabled, php updates will always reinstall all php extensions even if minor php version
    #PHPIONCUBE='y' #
    MEMCACHED_INSTALL='y' # Install Memcached
    PHPREDIS='y' # redis PHP extension install
    AUTODETECPHP_OVERRIDE='n' # skip recompiles for minor versions set to'y' when compile to majoir version updates
    GCCINTEL_PHP='y' # enable PHP-FPM GCC compiler with Intel cpu optimizations
    DEVTOOLSET_PHP='y' # use devtoolset GCC for
    GCCINTEL_PHP='y'
    #####################################################
    PUREFTPD_DISABLED='y' # Disable FTP
    #####################################################
    # Open SSL
    DISABLE_TLSONEZERO_PROTOCOL='y' # disable TLS 1.0 protocol by default industry is moving to deprecate for security
    NOSOURCEOPENSSL='n' # set to 'y' to disable OpenSSL source compile for system default YUM package setup
    OPENSSL_TLSONETHREE='y' # whether OpenSSL 1.1.1 builds enable TLSv1.3
    #####################################################
    ZSTD_LOGROTATE_NGINX='y'
    ZSTD_LOGROTATE_PHPFPM='y'
    LETSENCRYPT_DETECT='y'
    DUALCERTS='y' # dual RSA+ECDSA ssl certs https://centminmod.com/acmetool/
    AUDITD_ENABLE='y'
    DEVTOOLSETNINE='y' # https://community.centminmod.com/threads/prep-gcc-9-devtoolset-9-support-for-nginx-in-123-09beta01.19183/
    MARCH_TARGETNATIVE_ALWAYS='y'
    #####################################################
    # MariaDB
    ENABLE_MARIADBTENTWOUPGRADE='y'
    MARIADB_INSTALLTENTWO='n' # MariaDB 10.2 YUM default install if set to yes
    MARIADB_INSTALLTENTHREE='n' # MariaDB 10.3 YUM default install if set to yes
    MARIADB_INSTALLTENFOUR='y' # MariaDB 10.4 YUM default install if set to yes
    ENABLE_MARIADBTENTWOUPGRADE='y'
    ENABLE_MARIADBTENTHREEUPGRADE='y'
    ENABLE_MARIADBTENFOURUPGRADE='y'
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    48,440
    11,102
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,281
    Local Time:
    7:19 PM
    Nginx 1.21.x
    MariaDB 10.x
  3. EckyBrazzz

    EckyBrazzz Active Member

    906
    189
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +358
    Local Time:
    6:19 AM
    Latest
    Latest
    Digital Ocean.

    Here is the link to the logfiles (combined them) Logfiles
     
  4. eva2000

    eva2000 Administrator Staff Member

    48,440
    11,102
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,281
    Local Time:
    7:19 PM
    Nginx 1.21.x
    MariaDB 10.x
    Interesting looking at the logs it is related to an optional Nginx module you enabled with NGINX_VIDEO='y' in persistent config file related to nginx-rtmp-module download from Github

    Code (Text):
    download nginx-rtmp-module from github
    /svr-setup /svr-setup/nginx-1.21.6
    fatal: remote error: 
      The unauthenticated git protocol on port 9418 is no longer supported.
    Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
    

    so when it came to Nginx install, it errored out
    Code (Text):
    configuring additional modules
    adding module in ../nginx-rtmp-module
    ./configure: error: no ../nginx-rtmp-module/config was found
    


    So will have to look into this change which seems old but only ran across it now https://github.blog/2021-09-01-improving-git-protocol-security-github/