Discover Centmin Mod today
Register Now

Nginx Nginx unable to start after I Migrate Linode Host Nodes

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by RoldanLT, Aug 30, 2017.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
    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.13.4
    Code:
    # 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 Wed 2017-08-30 07:57:52 UTC; 1min 1s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 30662 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)
    
    Aug 30 07:57:52 hostname systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    Aug 30 07:57:52 hostname nginx[30662]: Starting nginx: /bin/bash: line 1: 30668 Illegal instruction     /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
    Aug 30 07:57:52 hostname nginx[30662]: [FAILED]
    Aug 30 07:57:52 hostname systemd[1]: nginx.service: control process exited, code=exited status=1
    Aug 30 07:57:52 hostname systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    Aug 30 07:57:52 hostname systemd[1]: Unit nginx.service entered failed state.
    Aug 30 07:57:52 hostname systemd[1]: nginx.service failed.
    

     
  2. Matt

    Matt Moderator Staff Member

    691
    320
    63
    May 25, 2014
    Sheffield, UK
    Ratings:
    +445
    Local Time:
    10:38 PM
    1.7.1
    MariaDB 10
    Does the nginx config still pass the test? nginx -t ?
     
  3. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
    I have fixed it by recompiling Nginx.
    Without custom_config.inc.

    Thanks Matt.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    What cpu does new server have? Did you do fresh 123.09beta01 install? Or copy over nginx binary from old server?

    Try setting CLANG='y' in persistent config file /etc/centminmod/custom_config.inc and recompile nginx via centmin.sh menu option 4
     
    Last edited: Aug 31, 2017
  5. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    What was its contents?
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    Oh did you do a Linode clone or migrate via Linode's feature to move entire server data from one host node to another host node ? That could explain the error as nginx and php can be optionally setup to use intel optimised compiler and that is tied to the specific cpu model used on server. So when you use Linode's own migrate feature, you copied everything from one host node to another host node but they had different cpu models, so the nginx and maybe php binary are no longer working for the changed cpu model until you do centmin.sh menu option 4 and 5 recompiles.

    Overlooked that this can be a usage scenario encountered on cloud hosting providers. Will have to add to 123.09beta01 a way to track initial installed cpu model and check if cpu model changes to alert users to recompile nginx and php if required.
     
    • Winner Winner x 1
  7. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
    Still the old one I think.
    Both no.

    99% the same with this: gist:dc815286195eece5aff3cdbecd5d9585 · GitHub
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
    It's because of this I have to do it:
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    Most likely reason is due to different cpu models you could of had E5-2680v3 or E5-2697v4 and switched to E5-2680v2 ? Could also be due to using DEVTOOLSETSIX='y' in customconfig.inc and new server not having GCC 6.2.1 installed yet ?

    what's ouput on new server for these 2 commands
    Code (Text):
    /opt/rh/devtoolset-6/root/usr/bin/gcc --version
    

    Code (Text):
    /opt/rh/devtoolset-6/root/usr/bin/g++ --version
    
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
    It's the same for PHP after migration, it doesn't start.
    But after I recompile it still using the old custom_config it works.
    Nginx only resolve when I recompile it without custom_config first.
     
  11. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    it's probably one of the custom_config.inc set settings then for yours gist:dc815286195eece5aff3cdbecd5d9585 · GitHub

    for nginx just set these 3 in persistent config /etc/centminmod/custom_config.inc and recompile nginx via centmin.sh menu option 4 and see
    Code (Text):
    CLANG='n'
    DEVTOOLSETSIX='y'
    NGINX_DEVTOOLSETGCC='y'
    

    and see if that works, then would have to systematically troubleshoot some of the other custom config settings you set on subsequent nginx recompile tests
     
  12. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
    But it works now with those custom config, no issues now.
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    could be devtoolset-6 GCC 6.2.1 wasn't installed immediately after move but was after recompile with no custom_config.inc settings ? check when devtoolset-6 was installed
    Code (Text):
    yum history info devtoolset-6-gcc
    
     
  14. RoldanLT

    RoldanLT Well-Known Member

    3,931
    960
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,311
    Local Time:
    6:38 AM
    1.11
    10.2
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    looks installed so ok there. Strange then
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:38 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1