Skip to main content
March 21, 2008
Answered

JDBC "Address already in use"

  • March 21, 2008
  • 3 replies
  • 2073 views
CF7 on Windows 2003, using a separate Win2K3 box for SQL 2000 db...

Of late, we are seeing web application errors and intermittent log entries like these:

"Error","jrpp-11","03/20/08","23:34:56","mycfdnsname","Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: dbserver1:1433. Reason: Address already in use: connect The specific sequence of files included or processed is: D:\hosting\mysite.com\httpdocs\myfile.cfm, line: 45 "

Coupled with that, SQL 2000's SQL Profiler tool indicates that many connections (ExistingConnection) are being created for that CF DSN (and others on the server), even though that DSN is marked for connection pooling (Maintain Connections). Restarting CF solves the problem temporarily, but after a while, it begins to happen again.

We are up-to-date on all patches and JDBC drivers. I'm not sure what this error means, let alone how to troubleshoot it properly. Suggestions?
This topic has been closed for replies.
Correct answer Newsgroup_User
scferda wrote:
> Of late, we are seeing web application errors and intermittent log entries like
> these:
>
> "Error","jrpp-11","03/20/08","23:34:56","mycfdnsname","Error Executing
> Database Query.[Macromedia][SQLServer JDBC Driver]Error establishing socket to
> host and port: dbserver1:1433. Reason: Address already in use: connect The
> specific sequence of files included or processed is:
> D:\hosting\mysite.com\httpdocs\myfile.cfm, line: 45 "

You are running ut of ephemeral ports. Set a lower TcpTimedWaitDelay and
a higher MaxUserPort in your registry. MS has a KB article on that.

Jochem

--
Jochem van Dieten
Adobe Community Expert for ColdFusion

3 replies

November 17, 2009

Was doing some research on an error one of my boxes was having and stumbled onto this thread.  Wanted to update the discussion about what to do with running out of ports in case someone else ever bumps into it.

HKEY_LOCAL_MACHINE->System->CurrentControlSet->Services->Tcpip->Parameters

Create a new DWORD named TCPTimedWaitDelay with a decimal value of 30
Create a new DWORD named MaxUserPort with a decimal value of 32768.

Newsgroup_UserCorrect answer
Inspiring
March 21, 2008
scferda wrote:
> Of late, we are seeing web application errors and intermittent log entries like
> these:
>
> "Error","jrpp-11","03/20/08","23:34:56","mycfdnsname","Error Executing
> Database Query.[Macromedia][SQLServer JDBC Driver]Error establishing socket to
> host and port: dbserver1:1433. Reason: Address already in use: connect The
> specific sequence of files included or processed is:
> D:\hosting\mysite.com\httpdocs\myfile.cfm, line: 45 "

You are running ut of ephemeral ports. Set a lower TcpTimedWaitDelay and
a higher MaxUserPort in your registry. MS has a KB article on that.

Jochem

--
Jochem van Dieten
Adobe Community Expert for ColdFusion
March 21, 2008
Is there a recommended setting for either/both of those registry entries?

I learn something new every day... thank you.

-S
Participating Frequently
March 21, 2008
This is one of the old and known problem and as I know there is no real solution.

I would suggest to try change the server. It helped for us when we had same issue.

If you do not have any chance like that try to use new MS SQL JDBC drivers.

Here is the technote: http://www.adobe.com/go/ded4216b

Good luck!