Solved

Cant establish TCP connections from server

Posted on 2007-11-19
10
549 Views
Last Modified: 2013-11-13
Hi
We are experiencing a tcp connection problem on our server lately. This means that we cant establish a tcp connection from the server to any host/service untill the server has been restarted.
The server is a servicing as a webserver with Apache/2.0.59 (Win32) PHP/4.4.6.
Then suddendly for some reason, after some days the server goes into an "error state" where it isnt possible to establish TCP connections from the server, until a restart.
I then checked if was even possible to telnet to the database or any other remote TCP service. Telnet returned error:" Connecting to <servername/ip> ...Could not open connection to the host, on port <TCP service number>: connect failed"
After the restart, the server works fine again for a couple of days.
I have checked our firewall, as this is between the webserver and the database. No errors
Windows event log doesnt give me any errors either.
As I cant establish a tcp connection from command prompt, I assume this is OS and not Apache related.
Have any been experiencing similar, or have any suggestions how to solve this?
Kind regards
Christian
0
Comment
Question by:Scanbox
10 Comments
 
LVL 9

Expert Comment

by:binary_1001010
ID: 20312056
>As I cant establish a tcp connection from command prompt, I assume this is OS and not Apache related.

not correct.  by default for example , you cant telnet to  a server using port 80/443( because no service is using these ports). but if the server is running IIS or apache, then yes, you will able to telnet to 80/443.

in your case, i dont think it is firewall related. it could be apache causing intermittent problem.
0
 

Author Comment

by:Scanbox
ID: 20312506
Hi binary
Thanks for your answer. I am aware that there must be a service running, to be able to connect to the service :)
Last time the server was in that error state, i tried establishing an outgoing telnet connection to our mailserver on TCP25, which gave the same result. You are propertly right that its Apache that is causing this problem, but why is it preventing the OS to establish any TCP connections at all? Could it be something with tcp sockets in windows, or any other TCP/IP related service?
Im a bit lost here..
0
 
LVL 9

Expert Comment

by:binary_1001010
ID: 20313352
what OS aer you using? what is the name of the firewall?  when you said "but why is it preventing the OS to establish any TCP connections at all"  do u mean non of the tcp ports work? can u list out the port numbers?

0
 
LVL 1

Expert Comment

by:jpwillyjr
ID: 20316814
are utilizing TCP Offload?  I think SP2 may automatically enable tcp or 'chimney' offload which can cause alot of issues. If you are try disabling it,

Netsh int ip set chimney DISABLED  
should do it from a cmd prompt without a reboot.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Scanbox
ID: 20326515
OS is windows server 2003 SP2
Firewall is Juniper SSG-550
As I dig deeper into this problem, my focus is more and more on the TCP/IP protocol, stack or other network related service on my webserver.
The most annoying is that I dont have any error events, logs or other to diagnose.
Thats why its do damn hard to troubleshoot.
Anyone know of a TCP/IP diagnostic tools?
0
 

Author Comment

by:Scanbox
ID: 20338404
Anyone with a thought about this?
0
 
LVL 9

Expert Comment

by:binary_1001010
ID: 20346252
trying downloading  "ip-tools."
0
 

Author Comment

by:Scanbox
ID: 20364711
I finaly found the solution.
On the server, I had a program creating a socket to 8 different websites whitin a time window.
This program was trying to connect to a SSL website through port 80, which of course dont work.
This somehow used up all sockets on the server, and had the server crashing after some time.
Funny thing why I couldnt see any errors in windows event log, on the NIC or anywere else.
I fixed the program to connect to the right port, and this solved the problem :)
Thanks for all your suggestions and help
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20532226
PAQed with points refunded (250)

Computer101
EE Admin
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now