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 9147375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:58:22+00:00 2026-06-17T10:58:22+00:00

The image below shows 2 processes that attempted and successfully bound listen sockets (server)

  • 0

The image below shows 2 processes that attempted and successfully bound listen sockets (server) to port 10000 on my local machine:

Sysinternals showing 2 binds on port 10000

and here’s the output of netstat (for confirmation):

netstat -a -n | find "10000"
  TCP    0.0.0.0:10000          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:10000          0.0.0.0:0              LISTENING
  TCP    [::]:10000             [::]:0                 LISTENING

(NB: The javaw.exe process was the first to open the listen socket on 10000).

While I am aware of situations under which multiple processes can indeed listen on the same port (SO_REUSEADDR), there are certain things that bother me in my specific scenario:

  1. In my application, I specifically say to .NET that I want an exclusive listen socket (SO_EXCLUSIVEADDRUSE) via

    listener = new TcpListener(adr, ipport);
    listener.ExclusiveAddressUse = true;
    
  2. .NET does not throw any kind of exception / error / notification that the port is already in use. In fact, it actually believes that everything went fine.

  3. My server application never wakes up from the listener.AcceptTcpClient() call from this point on. The client application that is supposed to communicate with the server receives a valid connection but is unable to communicate with “my” server (supposedly because it establishes a connection to the “other” process which doesn’t speak its “protocol”).

In case someone wants to try and reproduce my findings: The 2nd process is the “Helios” release of Eclipse (PHP). But the specific process shouldn’t matter here: If one process can do weird things under an OS, so can others.

Any advice on how I can either get an error or prevent such a situation (by means of additional parameters) altogether?

  • 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-17T10:58:23+00:00Added an answer on June 17, 2026 at 10:58 am

    The MSDN link you posted in your comment seems to answer your question.

    It has to do with the java application binding to the wildcard IP endpoint (0.0.0.0 ip4; :: for ip6, or IPEndpoint.ANY). I’m assuming that the adr variable in your code snippet above is a specific IP address, and not also a wildcard address.

    Take a look at the tables in that article. It lists the outcomes of trying to bind to either a specific or wildcard endpoint a second time, with different combinations of socket options.

    In short, the Java code is binding on the wildcard 0.0.0.0 endpoint without the SO_EXCLUSIVEADDRUSE socket option. The matrix shows that when this happens, you can successfully bind to a specific address and pass requesting exclusive address use.

    If you were to try and bind with a wildcard, the table shows that the call would fail.

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

Sidebar

Related Questions

I had the below code that load image from DB. There are more than
The image below shows the context menu I'm asking about. I've had it in
The highlights in the image below shows the logic I want to implement. I
I'm not sure how to achieve it but the image below shows the size
This is my css for a paypal sprite I have made.. Image below shows
I have three tables as shown in below image. Note: Lead column of projectheader
I want the output as shown in below image This is a Sikh holy
See this Image below http://i46.tinypic.com/2pt6jkn.jpg This is report in SSRS as shown when it
How do I programmatically access the value shown in the image below ?
How can i draw text on canvas as shown in below image highlighted in

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.