Join the community today
Become a Member

[Solved] LXC container install fails to install nginx

Discussion in 'AlmaLinux 8 & Rocky Linux 8 Beta Testing' started by wmtech, Sep 22, 2022.

  1. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    6:23 AM
    Code:
    sysctl: cannot stat /proc/sys/net/core/somaxconn: No such file or directory
    inc/nginx_configure.inc: line 4461: /2: syntax error: operand expected (error token is "/2")
    Total Nginx Upgrade Time: 24.254429607 seconds
    Nginx was not installed at initial install (lxc container).

    Tried to install it via option 4 of Centmin.sh and it fails with the above error.

     
  2. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    2:23 PM
    Nginx 1.25.x
    MariaDB 10.x
    Yeah that's one environment I haven't tested for = LXC

    what output do you get for these commands
    Code (Text):
    sysctl net.core.somaxconn

    Code (Text):
    sysctl net.core.somaxconn | awk -F  '= ' '{print $2}'
     
  3. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    2:23 PM
    Nginx 1.25.x
    MariaDB 10.x
    I updated 130.00beta01 so run cmupdate first. LXD/LXC containers may not be configured to allow access to the values I need to read so those detected environments will disable Nginx backlog routine and disable optional AUTOHARDTUNE_NGINXBACKLO'y' routine.

    You may need to edit /usr/local/nginx/conf/conf.d/virtual.conf and remove the backlog value as it might actually be empty right now.
     
  4. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    6:23 AM
    Yes, I assumed it's better to test with non standard environments. ;-)

    Code (Text):
    [root@test1 ~]# sysctl net.core.somaxconn
    sysctl: cannot stat /proc/sys/net/core/somaxconn: No such file or directory
    
     
  5. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    6:23 AM
    Used option 4 of Centmin.sh to install Nginx after cmupdate.

    Code (Text):
    Wed Sep 21 22:17:51 UTC 2022
    Success: Nginx was installed properly
    


    However:
    Code (Text):
    ls: cannot access '/usr/local/nginx/conf/conf.d/*.conf': No such file or directory
    


    The script hangs indefinitely at
    Code (Text):
    grep -E -n ssl spdy|spdy_headers_comp|Alternate-Protocol
    


    This is because the initial installation failed and there are no config files for Nginx. Will destroy the LXC container and try again from scratch tomorrow.
     
  6. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    2:23 PM
    Nginx 1.25.x
    MariaDB 10.x
    Cheers thanks for that info.
     
  7. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    6:23 AM
    A new installation at LXC worked. This time everything installed successfully.

    Code (Text):
    ---------------------------------------------------------------------------
    Total Curl Installer YUM or DNF Time: 262.0788 seconds
    Total YUM Time: 37.429874519 seconds
    Total YUM or DNF + Source Download Time: 83.9593
    Total Nginx First Time Install Time: 332.4533
    Total PHP First Time Install Time: 657.4104
    Download From Github Time: 3.5569
    Total Time Other eg. source compiles: 335.2107
    Total Centmin Mod Install Time: 1409.0337
    ---------------------------------------------------------------------------
    Total Install Time (curl yum + cm install + zip download): 1674.6694 seconds
    ---------------------------------------------------------------------------
    2 Intel(R) Xeon(R) CPU E3-1240 v3 @ 3.40GHz
    2 3800.000
    ---------------------------------------------------------------------------
    Centmin Mod Version: 130.00beta01.b200
    Install Summary Logs: /root/centminlogs/installer_summary_links.log
    ---------------------------------------------------------------------------


    Code (Text):
    [23:15][root@test1 ~]# nginx -V
    nginx version: nginx/1.23.1 (210922-224620-rockylinux8-lxc-1c3e821)
    built by gcc 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)
    built with OpenSSL 1.1.1q  5 Jul 2022
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-Wl,-E -L/usr/local/zlib-cf/lib -L/usr/local/nginx-dep/lib -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/zlib-cf/lib:/usr/local/nginx-dep/lib -flto -fuse-ld=gold' --with-cc-opt='-I/usr/local/zlib-cf/include -I/usr/local/nginx-dep/include -m64 -march=native -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-pointer-sign -Wimplicit-fallthrough=0 -Wno-implicit-function-declaration -Wno-int-conversion -Wno-error=unused-result -Wno-unused-result -fcode-hoisting -Wno-cast-function-type -Wno-format-extra-args -Wp,-D_FORTIFY_SOURCE=2' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --build=210922-224620-rockylinux8-lxc-1c3e821 --with-compat --without-pcre2 --with-http_stub_status_module --with-http_secure_link_module --with-libatomic --with-http_gzip_static_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_preread_module --with-threads --with-stream --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.2 --add-module=../ngx_cache_purge-2.5.1 --add-dynamic-module=../ngx_devel_kit-0.3.0 --add-dynamic-module=../set-misc-nginx-module-0.32 --add-dynamic-module=../echo-nginx-module-0.62 --add-module=../redis2-nginx-module-0.15 --add-module=../ngx_http_redis-0.4.0-cmm --add-module=../memc-nginx-module-0.19 --add-module=../srcache-nginx-module-0.32 --add-dynamic-module=../headers-more-nginx-module-0.34 --with-pcre-jit --with-zlib=../zlib-cloudflare-1.3.0 --with-http_ssl_module --with-http_v2_module --with-openssl=../openssl-1.1.1q


    I'll test tomorrow if there are any problems with the server.

    Thanks again!