title: Problem running into java.net.bindexception cannot assign requested address
body: <p>i am currently testing a server with an automatic test client that simulates a large number of users. Both the server and the client are written in Java. The client opens a tcp/ip connection for every user. Both the server and client run on Ubuntu linux, client runs on 11.04 and server on 10.04.</p>
  
  <p>The testing went good up till 27000 concurrently open connections, after that i decided to jump to 36000 (the servers and clients resources weren't really all that used up at 27000 so i decided to make a slightly bigger jump). <strong>When i tried running the test for 36k i got the following exception on the client side</strong>:</p>
  
  <ul>
  <li><em>java.net.BindException: cannot assign requested address</em></li>
  </ul>
  
  <p>As far as i know at 36k i should still have free ports since not much else is running on either machine and tcp limits the port number at 2^16 which is 65536. <strong>Now since it is linux i also set the number of open files for the user to 100k with ulimit -n 100000.
  But i am still getting the same exception.</strong></p>
  
  <p>I'm wondering what else could be a possible cause for the mentioned exception, or does linux in some other way limit the number of outgoing connections ?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Danijel</p>