# Free-BSD java.net.ConnectionException: Invalid argument



## kingspeech (Apr 18, 2011)

Hello there;

I am currently developing a game that use the socket for communication. Despite of the fact that the program works on windows environment correctly, it throws an exception on FreeBSD. The exception stack trace is same as others post in web. For example the problem is same as in the below link; java.net.ConnectionException: Invalid argument

I search the web and apply all the solutions that are offered by the users f(rom IP version change to permission) but I can not solve the problem. I need some help. Sorry for the English and again sorry if this question is asked before. The java version is below;


```
java version "1.6.0_03-p4" Java(TM) SE Runtime Environment (build 1.6.0_03-p4-root_14_apr_2011_17_26-b00)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-p4-root_14_apr_2011_17_26-b00, mixed mode)
```

and the FreeBSD machine is in the release of FreeBSD 8.1-RELEASE #0

Thanks for your help.

kingspeech


----------



## SirDice (Apr 18, 2011)

I've had that a couple of times too. Application works fine, then I quit it and start it again. It then produces similar error messages. The only solution I've found so far was to reboot. After that the application was able to open the port again.

Not sure what's going on. I'm thinking it's something in linux-sun-jdk itself.


----------

