Get the most out of your Centmin Mod LEMP stack
Become a Member

Install New error - latest 09 install

Discussion in 'Install & Upgrades or Pre-Install Questions' started by speedway, Dec 3, 2015.

  1. speedway

    speedway Member

    48
    13
    8
    Nov 28, 2015
    Sydney, AUSTRALIA
    Ratings:
    +18
    Local Time:
    2:49 PM
    1.19.2
    Dont' Know Right Now
    Just nuked my server and did a complete reinstall via the following method:

    reimage server with Centos 6.2
    log into new server, change root passwd and set hostname
    run yum -y update - updated to 6.7
    run option 3 for 09beta1 install
    left for dinner and tv watching.
    Came back to this:

    Code:
    Starting nginx: nginx: [emerg] setsockopt(SO_REUSEPORT) 0.0.0.0:80 failed, ignored (92: Protocol not available)
    [FAILED]
    
    If I remove this line from virtual.conf and restore the standard line (as below) everything works again
    Code:
             listen   80;
    
    #            listen   80 default_server backlog=2048 reuseport;
    
    Don't know which log to attach, please advise if you need one.


    Cheers
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You ran into same issue as @patrikpodo at Hi there | Centmin Mod Community - your server kernel doesn't support SO_REUSEPORT so needs removing

    who's your web host ?

    To check if your CentOS Linux kernel supports SO_REUSEPORT, type this command in SSH as root user

    Code:
    grep --color -Ro SO_REUSEPORT /usr/src/kernels/*
    If supported it should return something like this

    On CentOS 6.6 distro kernel
    Code:
    grep --color -Ro SO_REUSEPORT /usr/src/kernels/*
    /usr/src/kernels/2.6.32-504.23.4.el6.x86_64/include/asm-generic/socket.h:SO_REUSEPORT
    /usr/src/kernels/2.6.32-504.23.4.el6.x86_64/include/net/sock.h:SO_REUSEPORT
    /usr/src/kernels/2.6.32-504.30.3.el6.x86_64/include/asm-generic/socket.h:SO_REUSEPORT
    /usr/src/kernels/2.6.32-504.30.3.el6.x86_64/include/net/sock.h:SO_REUSEPORT
    If not supported in kernel, it will return empty.

    If you're kernel does not support SO_REUSEPORT option, you will either need to switch Linux kernels which may involve reinstalling the operating system - ask web host. For instance, OVH and SoYouStart web hosts are know to offer both CentOS with their own custom kernels and also CentOS with distro kernels. OVH/SoYouStart by default give you OS with their custom kernels out of the box. You need to choose and reinstall CentOS with the distro provided kernels.

    If not possible to switch, then disable Nginx's use of SO_REUSEPORT by editing main hostname's Nginx vhost file at /usr/local/nginx/conf/conf.d/virtual.conf ( can be accessed via command short outlined at FAQ item 16 = vhostconf) and removing the reuseport option from listen line and restarting Nginx server.

    so change from
    Code:
    listen 80 default_server backlog=2048 reuseport;
    to
    Code:
    listen 80 default_server backlog=2048;
    and restart nginx
    Code:
    service nginx restart
    or command shortcut
    Code:
    ngxrestart
     
  3. speedway

    speedway Member

    48
    13
    8
    Nov 28, 2015
    Sydney, AUSTRALIA
    Ratings:
    +18
    Local Time:
    2:49 PM
    1.19.2
    Dont' Know Right Now
    Hmmm, thanks George. I ran that line and got this back:

    Code:
    [root@s1 src]# grep --color -Ro SO_REUSEPORT /usr/src/kernels/*
    /usr/src/kernels/2.6.32-573.8.1.el6.x86_64/include/asm-generic/socket.h:SO_REUSEPORT
    /usr/src/kernels/2.6.32-573.8.1.el6.x86_64/include/net/sock.h:SO_REUSEPORT
    [root@s1 src]# 
    
    so am I not sure why that fails in nginx, I am a bit lost with low level stuff.

    Release returns CentOS release 6.7 (Final)

    I am currently with Servercomplete but hope to switch to SoYouStart next year, can't get Centos7 on my level of server at SC due to, their words, Centos7 does not support SATA drives well.

    Will research a bit more to get the CMM default working....

    Cheers
    Bruce
     
  4. speedway

    speedway Member

    48
    13
    8
    Nov 28, 2015
    Sydney, AUSTRALIA
    Ratings:
    +18
    Local Time:
    2:49 PM
    1.19.2
    Dont' Know Right Now
    OK, I am an idiot..... to tired and not thinking.

    Checked the running kernel version and found 2.6.32-220.el6.x86_64 ..... turns out I did not reboot after the update. Actually rebooted the box and low and behold uname -r returned 2.6.32-573.8.1.el6.x86_64. Put the SO_REUSEPORT bit back in vhostconf and whola! nginx restarted with issue.

    Moral of the story... don't do this stuff at 2:00am in the morning!

    Thanks George for taking the time to respond to what was my own stupid mistake, appreciate it.

    Cheers
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    wow good to know so 2.6.32-220 ish soesn't support SO_REUSEPORT !
     
  6. speedway

    speedway Member

    48
    13
    8
    Nov 28, 2015
    Sydney, AUSTRALIA
    Ratings:
    +18
    Local Time:
    2:49 PM
    1.19.2
    Dont' Know Right Now
    Hahaha, one good thing came out of this then I suppose :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,859
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    looks like it was added in 2.6.32-417 for centos 6
    Code:
    * Fri Sep 06 2013 Rafael Aquini <aquini@redhat.com> [2.6.32-417.el6]
    - [target] Set bi_destructor in iblock_get_bio (Andy Grover) [999490]
    - [target] Fix calling bdev_get_queue on a NULL *bio (Andy Grover) [999490]
    - [net] ipv6: remove max_addresses check from ipv6_create_tempaddr (Petr Holasek) [999365] {CVE-2013-0343}
    - [net] soreuseport: UDP/IPv6 implementation (Thomas Graf) [991600]
    - [net] soreuseport: TCP/IPv6 implementation (Thomas Graf) [991600]
    - [net] soreuseport: UDP/IPv4 implementation (Thomas Graf) [991600]
    - [net] soreuseport: TCP/IPv4 implementation (Thomas Graf) [991600]
    - [net] soreuseport: infrastructure (Thomas Graf) [991600]