Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd February 2011, 22:11
dinsdale dinsdale is offline
Junior Member
 
Join Date: Jun 2008
Posts: 18
Thanks: 2
Thanked 4 Times in 3 Posts
Default [solved] various timeouts on server - dashboard timeout

Hi,

I've noticed some strange timeouts on my ispconfig server. It appears that everytime when some remote content is fetched via PHP this results in a timeout. Here are some examples.

Log on to ispconfig:
the file dashboard.php takes 2.0 minutes (times out) until the page fully loads. In the source code I have the line:
$new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt');

a google javascript plugin looks up a long/latitude destination and the page hangs for 2 minutes and the plugin doesn't load

I cannot update TYPO3 Extensions remotely in the extension manager - it times out after 2 minutes

What could lead to these problems? I have a seperate development server running the same OS/ISPconfig version withouth these problems. Only difference is that on the dev server I didn't change the hostname manually in the config files and that it's not behind a external firewall. Also the dev server is a single server install and the webserver is distributed between email/web. both have allow_fopen enabled. What does like it sound to you what could be the problem?

I'm currently using ispconfig 3.0.3 on ubuntu 10.04

Last edited by dinsdale; 22nd February 2011 at 17:00. Reason: errors
Reply With Quote
Sponsored Links
  #2  
Old 4th February 2011, 09:25
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,782
Thanks: 821
Thanked 5,334 Times in 4,184 Posts
Default

This might be a dns issue. Please take a look in the file /etc/resolv.conf and make sure that the nameservers listed there are working and reachable from your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 9th February 2011, 17:45
dinsdale dinsdale is offline
Junior Member
 
Join Date: Jun 2008
Posts: 18
Thanks: 2
Thanked 4 Times in 3 Posts
Default

checked the nameservers - I don't think they are the problem since it resolves correctly from the cli. It's only when I try to fetch some remote content with php that I get the timeouts. (wget works)
I did a couple of other changes in /etc/hosts since my last post since I think I didn't have my interfaces configured correctly and the /etc/hosts confirms now to manual but it didn't help. I set up the server on a private network and then changed the IP addresses - could this have led to problems?

To my knowledge all you need to fetch remote content is fopen - according to phpinfo() this shouldn't be the problem. Only other thing I did different from the manual is I installed xcache.

allow_url_fopen On On
allow_url_include Off Off
Reply With Quote
  #4  
Old 18th February 2011, 23:42
dinsdale dinsdale is offline
Junior Member
 
Join Date: Jun 2008
Posts: 18
Thanks: 2
Thanked 4 Times in 3 Posts
Default

This is really a strange problem ...

If I try to fetch the content of a file with file_get_contents on a different domain which is hosted on the same server it works.
If I try to do the same with a domain which is not hosted on the same server the request times out.
It is not a DNS related problem since fetching per IP times out as well.

I'm at my wits end - any suggestions where to dig further?
Reply With Quote
  #5  
Old 19th February 2011, 16:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Are there any errors in Apache's error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 21st February 2011, 20:20
dinsdale dinsdale is offline
Junior Member
 
Join Date: Jun 2008
Posts: 18
Thanks: 2
Thanked 4 Times in 3 Posts
Default

No, there are no errors in the log file - I did a network sniff and after the timeout I only receive one strange ? character in the content field of requests that timed out.


At this moment in time I don't think it's anything server related. I did a couple of other tests and found out that if I request content via file_get_contents() from inside the internal network (/27 mask) I do get a response. Only if a request is routed via the gateway which appears to be running a firewall am I running into the timeout problem.

$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
XX.XX.122.32 0.0.0.0 255.255.255.224 U 0 0 0 eth4
0.0.0.0 XX.XX.122.36 0.0.0.0 UG 0 0 0 eth4

This is strange since applications like lynx or wget are working without problems for internal and external URLs and they should be working on the same ports. The only conclusion I can draw from this is that the firewall is somehow capable to filters content on the application level and recognized a request made by apache and somehow blocks it. I wasn't aware that firewalls work on this level.

In any case I have contacted my network provider and asked him to check it out and will let you know what comes out.
Reply With Quote
The Following User Says Thank You to dinsdale For This Useful Post:
till (22nd February 2011)
  #7  
Old 22nd February 2011, 16:55
dinsdale dinsdale is offline
Junior Member
 
Join Date: Jun 2008
Posts: 18
Thanks: 2
Thanked 4 Times in 3 Posts
 
Default

Good news everyone, it finally was a firewall configuration issue.

It appears the problem is related to a sonicwall firewall and enabled content filtering. The sonicwall firewall does actually filter on the application level and filters the 'minimal' HTTP headers coming from PHP. wget and lynx seem to be more verbose in their HTTP headers and are allowed to pass. I tried playing with the user_agent in the php.ini and some other settings but no luck.

I didn't do the changes on the firewall myself - according to my provider a simple reboot fixed it... I did read however that the tricky part for sonic firewall owners is that the content filtering module on some models is enabled by default despite it being a 'pay for' module. On these models you have to disable it manually on a non documented page http://your.ip/diag.html .

Thanks for your help, it's a big relieve it's working now.
Reply With Quote
Reply

Bookmarks

Tags
firewall, fopen, timeout

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not working emails (DNS and postfix problem?) shekiman Installation/Configuration 9 1st March 2011 16:25
SSL don't work please help me walner8080 Installation/Configuration 8 26th September 2010 12:07
Email doesn't work... Ventzy Installation/Configuration 1 14th February 2010 11:49
I don't recieve mail. privir Installation/Configuration 2 3rd June 2009 22:08
Administrator receive empty mail ??? Stanev General 16 7th April 2006 20:56


All times are GMT +2. The time now is 10:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.