Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how can i have a bind exception without anything holding the port?  RSS feed

 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

on a redhat system we sometimes have a bind exception when an activemq tries to bind to a port.

however when we do a netstat -lntp we see that so such port is captured.

so how can that be?
 
Henry Wong
author
Sheriff
Posts: 22846
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elhanan Maayan wrote:
however when we do a netstat -lntp we see that so such port is captured.

so how can that be?



As an initial guess, I would say that the port is probably in use but not in the listening state. Perhaps you should do a netstat of the sockets in all the states, instead of just the ones in a listening state.

Henry
 
Elhanan Maayan
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you were right, it turns out another application server was using that port as outgoing to another oracle server on the same machine. so i guess the OS allocated that port to it (as it was brought up before us)

are there any range of ports which i'll know for sure the OS won't allocate them?
 
Henry Wong
author
Sheriff
Posts: 22846
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elhanan Maayan wrote:
are there any range of ports which i'll know for sure the OS won't allocate them?


The ephemeral port range is configurable, so it may be different for each machine. Also, configuring the range is different for each OS type, so you will need to do a bit of research for your machine/OS combination. If you have lots of stuff running, which needs lots of connections to clients (ie. lots of application servers), it may be worth it to configure the port range, if only, to increase the number of available ports.

Henry
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!