Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7861991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:57:37+00:00 2026-06-02T22:57:37+00:00

I have both java and .net applications running on an app server using Microsoft

  • 0

I have both java and .net applications running on an app server using Microsoft Windows Server 2003, Enterprise Edition. These are being migrated to another app server Windows 2008 64-bit machine.

All applications connect to the same SQL Server 2005 database, on a named instance.

So far I have tried to move the applications exactly as they are, with no changes in the configuration files, from the old box to the new box.

On the new app server, neither the java nor the .net applications connect to the database (named instance).

JDBC error message: "The connection to the named instance has failed. Error: java.net.SocketTimeoutException: Receive timed out."

The .net error message: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible."

If I change the DB config to one that is not on a named instance it works on the new app server.

The database is setup correctly, because we were able to connect on the old app server. I can ping the database server from the new app server.

Is there any reason this won’t work on the new app server?

java connection string: "jdbc:microsoft:sqlserver://[dbservername];SelectMethod=Cursor;instanceName=[dbinstance]"

.net connection string: "Server=[dbservername]\[dbinstance];Database=Risk_DB;Uid=[user];Pwd=[pwd];"

UPDATE
Per suggestions in the answers, I got the instance port number. I also installed SQL Server Management Studio so I can eliminate my apps as the problem points. From Management Studio, if I use [servername][instancename], I get the message "a network-related or instance-specific error while establishing a connection to SQL Server…" But it works when i use [servername],[port]. Not sure if there’s anyway to work around this?

UPDATE #2 Escalated the issue to the infrastructure/server/network team. They disabled windows firewall on the new app server. Presto, now I can connect to [dbservername]\[dbinstance] in Management Studio, and all apps are working using existing configuration files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:57:38+00:00Added an answer on June 2, 2026 at 10:57 pm

    Your named instance is going to be running on a different port. Port 1433 (the default for a default instance) is probably open, and the port that the named instance is running on is probably blocked. You can check the port in the error log for the named instance (assuming you can connect locally, in Object Explorer, expand the server, expand Management, expand SQL Server Logs, right-click current, and choose “View SQL Server Log” IIRC), it will say something like this on startup:

    Server is listening on [ 127.0.0.1 <ipv4> 3587 ].
    

    That last number is the port number that needs to be accessible from your remote machine and whatever network devices and services it has to go through to get there. If you don’t find a line like that, it’s possible that TCP/IP is not enabled for the named instance. On that server, go to SQL Server Configuration Manager, expand SQL Server Network Configuration, click on “Protocols for ” and make sure TCP/IP is enabled in the right pane. If you have to enable this you’ll need to restart SQL Server for it to take effect.

    If it is already enabled (or once you enable it and restart the service), you should be able to refresh this view and validate the port that is being used if you right-click TCP/IP, hit properties, and move to the IP Addresses tab. You can see the ports currently being for each IP. Here there will be multiple IPn sections and an IPAll section. For each IP, you can change the “TCP Port” box to a port you want to use (and delete any values in all the “Dynamic TCP Ports” box to 0). Hit Apply and restart the service. This will again require a restart of the service but will allow you to specify a specific port so you can add an exclusion to your firewall (or make use of one that already exists, assuming this server isn’t already using that port).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two applications running in the same java virtual machine, and both use
I have to write a multithreaded client and server using Java's socket api. Both
I have an application that runs on both C# .Net and Java . Two
I have a new tomcat application server running on tomcat 6, java 6 (openjdk),
I am writing an application that communicates using sockets. I have a server running
I'm working on a project that uses both .net and java, using zeromq to
At a new job I started, we have both a Java application that handles
I have a Java class which handles both single valued and multi-valued data. Therefore,
I have a JSF web client and a Java client that both use the
I currently have a small Java program which I would like to run both

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.