Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx new server/new install connection timeouts

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hitman, Apr 7, 2017.

  1. hitman

    hitman Member

    117
    10
    18
    Jul 18, 2014
    Ratings:
    +14
    Local Time:
    12:29 AM
    • CentOS Version: CentOS 6 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.13
    • PHP Version Installed: 5.6.30
    hello everyone
    tried a new server which was on a great price on hostus but i am facing a lot of proeblems regarding nginx mainly
    it times out a lot while tried to install centmin
    this is the log from trying to update nginx through option 4
    Do you want to run YUM install checks ? This will increase your upgrade duration time wise. Chec... - justpaste.it
    it also takes a lot of time to check for updates
    could it be the repos?
    the server is in netherlands


    any ideas how to troubleshoot these would be great
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,933
    6,911
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,407
    Local Time:
    8:29 AM
    Nginx 1.13.x
    MariaDB 5.5
    the nginx install log doesn't reveal anything and skips to the upgrade time ?
    Code (Text):
         ____                          _  _         _   _         _             
        / ___| ___   _ __ ___   _ __  (_)| |  ___  | \ | |  __ _ (_) _ __  __  __
       | |    / _ \ | '_ ` _ \ | '_ \ | || | / _ \ |  \| | / _` || || '_ \ \ \/ /
       | |___| (_) || | | | | || |_) || || ||  __/ | |\  || (_| || || | | | >  <
        \____|\___/ |_| |_| |_|| .__/ |_||_| \___| |_| \_| \__, ||_||_| |_|/_/\_\
                               |_|                         |___/                 
    Compiling nginx...
    
    Total Nginx Upgrade Time: 11067.531429213 seconds

    also when asked to do yum check, you can answer no as it isn't needed unless you initially switched centmin mod branches.

    To troubleshoot, you need to check the the 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
     
  3. hitman

    hitman Member

    117
    10
    18
    Jul 18, 2014
    Ratings:
    +14
    Local Time:
    12:29 AM
    thank you for your answer,
    actually this is the complete nginx_upgrade log, it just stopped for like 2 hours at "compiling nginx" and i cancelled it manually .
    it takes reaaaaally long time to check for nginx updates and several other things and i do not know why.
    I assume that during nginx update it timed out and thats why it never finished upgrading 2 hours later.

    it takes a long time when entering ssh session to load the initial centmin text where it tells about
    Code:
    Centmin Mod code updates available for /usr/local/src/centminmod
     to update re-run centmin.sh menu option 23 submenu option 2
    which is also weird

    nginx configuration is fine
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,933
    6,911
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,407
    Local Time:
    8:29 AM
    Nginx 1.13.x
    MariaDB 5.5
    probably due to your server's network connectivity what do you get for these ssh commands ?

    Code (Text):
    time ping -c4 google.com
    

    Code (Text):
    time ping -c4 microsoft.com
    

    Code (Text):
    time ping -c4 nginx.org
    

    Code (Text):
    time ping -c4 github.com
    

    Code (Text):
    time wget -O /dev/null http://nginx.org/download/nginx-1.11.13.tar.gz
    

    Code (Text):
    cat /etc/resolv.conf
    
     
  5. hitman

    hitman Member

    117
    10
    18
    Jul 18, 2014
    Ratings:
    +14
    Local Time:
    12:29 AM
    for google and github it is ok
    for microsoft
    Code:
    time ping -c4 microsoft.com
    PING microsoft.com (191.239.213.197) 56(84) bytes of data.
    
    --- microsoft.com ping statistics ---
    4 packets transmitted, 0 received, 100% packet loss, time 13000ms
    
    
    real   0m13.006s
    user   0m0.001s
    sys   0m0.001s
    

    although it seems to connect to nginx.org
    Code:
    time ping -c4 nginx.org
    PING nginx.org (206.251.255.63) 56(84) bytes of data.
    64 bytes from www.nginx.org (206.251.255.63): icmp_seq=1 ttl=49 time=137 ms
    64 bytes from www.nginx.org (206.251.255.63): icmp_seq=2 ttl=49 time=137 ms
    64 bytes from www.nginx.org (206.251.255.63): icmp_seq=3 ttl=49 time=137 ms
    64 bytes from www.nginx.org (206.251.255.63): icmp_seq=4 ttl=49 time=137 ms
    
    --- nginx.org ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3140ms
    rtt min/avg/max/mdev = 137.820/137.831/137.846/0.262 ms
    
    real   0m3.146s
    user   0m0.001s
    sys   0m0.000s
    
    it delays a lot and it times out for the download
    Code:
    time wget -O /dev/null http://nginx.org/download/nginx-1.11.13.tar.gz
    --2017-04-07 09:59:21--  http://nginx.org/download/nginx-1.11.13.tar.gz
    Resolving nginx.org... 2606:7100:1:69::3f, 2001:1af8:4060:a004:21::e3, 206.251.255.63, ...
    Connecting to nginx.org|2606:7100:1:69::3f|:80... failed: Connection timed out.
    Connecting to nginx.org|2001:1af8:4060:a004:21::e3|:80... failed: Connection timed out.
    Connecting to nginx.org|206.251.255.63|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 980784 (958K) [application/octet-stream]
    Saving to: '/dev/null'
    
    /dev/null                       100%[=====================================================>] 957.80K   700KB/s    in 1.4s  
    
    2017-04-07 10:01:29 (700 KB/s) - '/dev/null' saved [980784/980784]
    
    
    real   2m7.731s
    user   0m0.003s
    sys   0m0.003s
    

    Code:
    cat /etc/resolv.conf
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,933
    6,911
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,407
    Local Time:
    8:29 AM
    Nginx 1.13.x
    MariaDB 5.5