Want to subscribe to topics you're interested in?
Become a Member

Nginx Nginx Can't Start

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by zkylizer, Mar 27, 2020.

  1. zkylizer

    zkylizer New Member

    4
    0
    1
    Jun 5, 2019
    Ratings:
    +0
    Local Time:
    5:04 PM
    1.17.0
    MariaDB 10
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.17.9
    • PHP Version Installed: 7.3.15
    • MariaDB MySQL Version Installed: 10.4
    • When was last time updated Centmin Mod code base ? : cmupdate command
    • Persistent Config:
      Code (Text):
      LETSENCRYPT_DETECT='y'
      NGXDYNAMIC_BROTLI='y'
      NGINX_LIBBROTLI='y'
      PHP_PGO='y'
      PHP_LIBZIP='y'
      PHPFINFO=y
      NGINX_PAGESPEED=y
      NGXDYNAMIC_NGXPAGESPEED=y
      NGINX_HTTP2=y
      CLOUDFLARE_ZLIB='y'
      MEMCACHED_INSTALL=n
      ENABLE_MARIADBTENTWOUPGRADE='y'
      ENABLE_MARIADBTENTHREEUPGRADE='y'
      ENABLE_MARIADBTENFOURUPGRADE='y'
      
    • Nginx -t
    Code (Text):
    Illegal instruction

    • systemctl status nginx.service
    Code (Text):
    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 Thu 2020-03-26 23:47:04 WIB; 1min 13s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 19726 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)
    
    Mar 26 23:47:04 server.secretdomain.com systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, H.....
    Mar 26 23:47:04 server.secretdomain.com nginx[19726]: Starting nginx: /bin/bash: line 1: 19738 I...nf
    Mar 26 23:47:04 server.secretdomain.com nginx[19726]: [FAILED]
    Mar 26 23:47:04 server.secretdomain.com systemd[1]: nginx.service: control process exited, code=...=1
    Mar 26 23:47:04 server.secretdomain.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) se...r.
    Mar 26 23:47:04 server.secretdomain.com systemd[1]: Unit nginx.service entered failed state.
    Mar 26 23:47:04 server.secretdomain.com systemd[1]: nginx.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.
    


    2 days a ago i just update via cmupdate and upgrade php to 7.4.3 and site fine for 2 day without any error, I don't know why the error came up

    i already try reinstall nginx via centmin no.5 and i try install to different php version 7.3.15

    FIXED : recompile same version not fix it, just Downgrade nginx Version
     
    Last edited: Mar 27, 2020
  2. eva2000

    eva2000 Administrator Staff Member

    43,579
    9,885
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,265
    Local Time:
    8:04 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    1. Who is your web host and VPS plan you're using ?
    2. Did you recently reboot your server or move VPS servers to a different server with different cpu model ?
    what's output for command
    Code (Text):
    curl -s https://ipinfo.io/org
    

    and
    Code (Text):
    cat /proc/cpuinfo

    and
    Code (Text):
    lscpu

    and
    Code (Text):
    lscpu | egrep 'avx|avx2'

    and
    Code (Text):
    virt-what
    

    The problem maybe that some web host's VPS virtualization configuration are using cpus which support to support specific CPU instructions like avx but your web host isn't passing the avx cpu instruction flag from VPS host node to the underlying guest virtualization OS. It maybe a config issue at your VPS provider's host node level.

    Try to set MARCH_TARGETNATIVE='n' in persistent config file /etc/centminmod/custom_config.inc and recompile nginx and php via centmin.sh menu option 4 and option 5 respectively.
     
  3. zkylizer

    zkylizer New Member

    4
    0
    1
    Jun 5, 2019
    Ratings:
    +0
    Local Time:
    5:04 PM
    1.17.0
    MariaDB 10
    1. Who is your web host and VPS plan you're using ?
      Flaunt7
    2. Did you recently reboot your server or move VPS servers to a different server with different cpu model ? i only reboot vps after i found nginx error,
    Code (Text):
    AS64425 SKB Enterprise B.V.
    


    • cat /proc/cpuinfo
    Code (Text):
    processor   : 0
    vendor_id   : GenuineIntel
    cpu family   : 6
    model       : 62
    model name   : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
    stepping   : 4
    microcode   : 0x1
    cpu MHz       : 2499.998
    cache size   : 25600 KB
    physical id   : 0
    siblings   : 1
    core id       : 0
    cpu cores   : 1
    apicid       : 0
    initial apicid   : 0
    fpu       : yes
    fpu_exception   : yes
    cpuid level   : 13
    wp       : yes
    flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep erms xsaveopt arat spec_ctrl intel_stibp
    bogomips   : 4999.99
    clflush size   : 64
    cache_alignment   : 64
    address sizes   : 46 bits physical, 48 bits virtual
    power management:
    
    processor   : 1
    vendor_id   : GenuineIntel
    cpu family   : 6
    model       : 62
    model name   : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
    stepping   : 4
    microcode   : 0x1
    cpu MHz       : 2499.998
    cache size   : 25600 KB
    physical id   : 1
    siblings   : 1
    core id       : 0
    cpu cores   : 1
    apicid       : 1
    initial apicid   : 1
    fpu       : yes
    fpu_exception   : yes
    cpuid level   : 13
    wp       : yes
    flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep erms xsaveopt arat spec_ctrl intel_stibp
    bogomips   : 4999.99
    clflush size   : 64
    cache_alignment   : 64
    address sizes   : 46 bits physical, 48 bits virtual
    power management:
    


    • lscpu
    Code (Text):
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                2
    On-line CPU(s) list:   0,1
    Thread(s) per core:    1
    Core(s) per socket:    1
    Socket(s):             2
    NUMA node(s):          1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 62
    Model name:            Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
    Stepping:              4
    CPU MHz:               2499.998
    BogoMIPS:              4999.99
    Hypervisor vendor:     KVM
    Virtualization type:   full
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              256K
    L3 cache:              25600K
    NUMA node0 CPU(s):     0,1
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep erms xsaveopt arat spec_ctrl intel_stibp
    


    • lscpu | egrep 'avx|avx2'
    Code (Text):
    Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm ssbd ibrs ibpb stibp fsgsbase tsc_adjust smep erms xsaveopt arat spec_ctrl intel_stibp


    • virt-what
    Code (Text):
    kvm
    


    i try recompile nginx same/current version ( 1.17.9) = nginx error
    i try recompile nginx downgrade version ( 1.17.8) = nginx work

    after downgrade i try upgrade nginx version ( 1.17.9) and nginx error again

    What wrong with my vps ? i already used 1.17.9 for few days and no problem
    The error appeared about 5 hours ago
     
  4. eva2000

    eva2000 Administrator Staff Member

    43,579
    9,885
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,265
    Local Time:
    8:04 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Strange indeed.

    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
     
  5. eva2000

    eva2000 Administrator Staff Member

    43,579
    9,885
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,265
    Local Time:
    8:04 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Did you set MARCH_TARGETNATIVE='n' in persistent config file /etc/centminmod/custom_config.inc before running centmin.sh menu option 4 and 5 ?
     
  6. zkylizer

    zkylizer New Member

    4
    0
    1
    Jun 5, 2019
    Ratings:
    +0
    Local Time:
    5:04 PM
    1.17.0
    MariaDB 10
    Thanks, used MARCH_TARGETNATIVE='n' fix my problem. now i can use latest nginx version ( 1.17.9 )