Cant establish TCP connections from server

Posted on 2007-11-19
Last Modified: 2013-11-13
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
Question by:Scanbox
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

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.

Author Comment

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..

Expert Comment

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?

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.


Expert Comment

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.

Author Comment

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?

Author Comment

ID: 20338404
Anyone with a thought about this?

Expert Comment

ID: 20346252
trying downloading  "ip-tools."

Author Comment

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

Accepted Solution

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

EE Admin

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groovy example issue 10 111
Joining Domain Issue 4 59
Application timeout question 2 54
Problem to Office 1 44
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
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.

733 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