Gateway timeout errors

Discussion in 'Installation/Configuration' started by sapper6fd, Nov 12, 2006.

  1. sapper6fd

    sapper6fd New Member

    Ok, so I have CentOS installed, along with cPanel. I have a domain configured through Zone Edit to point to the server (http://www.politicaltension.com). I'm having a problem with 504 errors. The page loads normaly anf perfect, however every time the refresh button is pressed the 504 Gateway Timout error comes up instantly. Any ideas on how to solve this issue?

    Thanks
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the exact error message? Any errors in Apache's error log?

    BTW, are you sure that the DNS record for www.politicaltension.com is correct?

    Code:
    mh1:~# dig www.politicaltension.com
    
    ; <<>> DiG 9.2.1 <<>> www.politicaltension.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18689
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.politicaltension.com.      IN      A
    
    ;; ANSWER SECTION:
    [B][COLOR="Red"]www.politicaltension.com. 7200  IN      CNAME   wfb.zoneedit.com.
    wfb.zoneedit.com.       1200    IN      A       69.72.142.98
    wfb.zoneedit.com.       1200    IN      A       216.98.141.250[/COLOR][/B]
    
    ;; Query time: 386 msec
    ;; SERVER: 81.169.163.104#53(81.169.163.104)
    ;; WHEN: Mon Nov 13 15:28:17 2006
    ;; MSG SIZE  rcvd: 101
     
  3. sapper6fd

    sapper6fd New Member

    The DNSservers are correct with my registrar. For some reason they seem to convert into the wfb.zoneedit.com DNS.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    This means that visitors to www.politicaltension.com will be directed to 69.72.142.98 or 216.98.141.250. I doubt this is correct. What's your server's public IP address?
     
  5. sapper6fd

    sapper6fd New Member

    The public IP address is 209.89.95.165. HTTP traffic has been redirected to port 85 so 209.89.95.165:85 is the ip to get in (due to port 80 blocking on my DSL account). In Zone Edit, they have given me the DNS Servere of ns1.zoneedit.com and ns14.zoneedit.com. I logged into my registrara account, and can see that these are the entries for it.

    dnsstuff.com is showing these DNS servers, however they are then being redirected to a CNAME of wfb.zoneedit.com

    How I am searching:
    Searching for www.politicaltension.com A record at c.root-servers.net [192.33.4.12]: Got referral to G.GTLD-SERVERS.NET. (zone: com.) [took 21 ms]
    Searching for www.politicaltension.com A record at G.GTLD-SERVERS.NET. [192.42.93.30]: Got referral to ns14.zoneedit.com. (zone: politicaltension.com.) [took 11 ms]
    Searching for www.politicaltension.com A record at ns14.zoneedit.com. [209.126.137.108]: Got CNAME of wfb.zoneedit.com. and referral to m.root-servers.net [took 103 ms]
    Searching for wfb.zoneedit.com A record at l.root-servers.net [198.32.64.12]: Got referral to D.GTLD-SERVERS.NET. (zone: com.) [took 81 ms]
    Searching for wfb.zoneedit.com A record at D.GTLD-SERVERS.NET. [192.31.80.30]: Got referral to ns1.zoneedit.com. (zone: zoneedit.com.) [took 81 ms]
    Searching for wfb.zoneedit.com A record at ns1.zoneedit.com. [207.234.248.200]: Reports wfb.zoneedit.com. [took 112 ms]


    When you type www.politicaltension.com into your web browser and watch where your being sent to in the bottom left corner, it shows that you are being redirected to my servers IP address of 209.89.95.165:85
     
  6. falko

    falko Super Moderator ISPConfig Developer

    This redirect is a problem if cPanel writes name-based vhosts to your Apache configuration (about which I'm almost sure). The domain should point directly to your IP address instead of being redirected. But then of course you will have the problem with your ISP blocking port 80.

    Anyway, are you absolutely sure your firewall doesn't block port 85, and that Apache is running on port 85? What's the output of
    Code:
    netstat -tap
    ?
     
  7. sapper6fd

    sapper6fd New Member

    My firewall isnt blocking port 85. I was able to access the server without a problem for a day or two, then all of sudden this problem started happeneing. There were no changes to the system at all.

    netstat -tap provideds the following results

    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:tcpmux *:* LISTEN 4671/portsentry
    tcp 0 0 *:2082 *:* LISTEN 3172/cpsrvd - waiti
    tcp 0 0 *:2083 *:* LISTEN 3172/cpsrvd - waiti
    tcp 0 0 *:2084 *:* LISTEN 4598/entropychat
    tcp 0 0 *:2086 *:* LISTEN 3172/cpsrvd - waiti
    tcp 0 0 *:2087 *:* LISTEN 3172/cpsrvd - waiti
    tcp 0 0 *:mysql *:* LISTEN 4843/mysqld
    tcp 0 0 *:2095 *:* LISTEN 3172/cpsrvd - waiti
    tcp 0 0 *:sunrpc *:* LISTEN 4671/portsentry
    tcp 0 0 localhost:783 *:* LISTEN 4418/spamd.pid --ma
    tcp 0 0 *:2096 *:* LISTEN 3172/cpsrvd - waiti
    tcp 0 0 *:smtps *:* LISTEN 4370/exim
    tcp 0 0 *:ftp *:* LISTEN 6010/pure-ftpd (SER
    tcp 0 0 server1.politicalten:domain *:* LISTEN 4023/named
    tcp 0 0 localhost:domain *:* LISTEN 4023/named
    tcp 0 0 localhost:ipp *:* LISTEN 4218/cupsd
    tcp 0 0 *:smtp *:* LISTEN 4362/exim
    tcp 0 0 localhost:rndc *:* LISTEN 4023/named
    tcp 0 0 *:imaps *:* LISTEN 4281/dovecot
    tcp 0 0 *:pop3s *:* LISTEN 4281/dovecot
    tcp 0 0 *:pop3 *:* LISTEN 4281/dovecot
    tcp 0 0 *:imap *:* LISTEN 4281/dovecot
    tcp 0 0 *:ftp *:* LISTEN 6010/pure-ftpd (SER
    tcp 0 0 *:ssh *:* LISTEN 4247/sshd
     
  8. falko

    falko Super Moderator ISPConfig Developer

    I don't see Apache in the output, so I think it isn't running. Please restart it.
     
  9. sapper6fd

    sapper6fd New Member

    I restarted httpd services, and its having the same issue. I even tried to restart the server, same issue.

    I get the following errors when restarting Apache. Does this have anything to do with it?

    [email protected] [/]# /etc/init.d/httpd start
    [Sun Nov 19 15:45:14 2006] [warn] VirtualHost 192.168.1.100:85 overlaps with VirtualHost 192.168.1.100:85, the first has precedence, perhaps you need a NameVirtualHost directive
    [Sun Nov 19 15:45:14 2006] [warn] NameVirtualHost 192.168.1.100:85 has no VirtualHosts
    /etc/init.d/httpd start: httpd started

    Once i have restarted Apach, if I type /etc/init.d/httpd status I get the following error message:

    [email protected] [/etc/httpd/conf]# /etc/init.d/httpd status

    Looking up localhost
    Making HTTP connection to localhost
    Alert!: Unable to connect to remote host.
     
    Last edited: Nov 19, 2006
  10. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
     ifconfig
    ? What's in /etc/hosts?
     
  11. sapper6fd

    sapper6fd New Member

    ifconfig shows the following

    eth0 Link encap:Ethernet HWaddr 00:50:8D:E1:F5:73
    inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::250:8dff:fee1:f573/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:5918 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3166 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:1582108 (1.5 MiB) TX bytes:350662 (342.4 KiB)
    Base address:0xa000 Memory:fd000000-fd020000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:6931 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6931 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:479441 (468.2 KiB) TX bytes:479441 (468.2 KiB)




    /etc/hosts shows th following

    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost
    192.168.1.100 server1.politicaltension.com server1
     
  12. falko

    falko Super Moderator ISPConfig Developer

    The outputs look ok.
    Maybe it's trying to connect to port 80 instead of 85? Are you sure you replaced 80 everywhere in your Apache configuration?
     

Share This Page