This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I'm trying to create client/server application. I wrote both, compile (client is an applet) and run on my localhost and everything worked fine. Unfortunately, when I uploaded my client and server applications on server I can't connect and get IOException here:
where "host" is a string; it contains external IP of my server.
I tried to sign applet but nothing changed. Is it possible that Ubuntu on that server somehow block socket connection? Maybe I have to add something in java.policy file? I've searched on google and this forum, read a lot of threads but I couldn't find solution. What can be wrong with it?
E: Ok, I dig a little deeper and now I'm getting "Network is unreachable: connect". but still I can't find out how to fix it...
If it was an applet security problem, like with java.policy, I'd expect you to get an AccessControlException. It could be a firewall problem on the server or the client; you could use nmap to see what ports get through, or try opening the connection from a Java application instead of an applet.
Joined: Apr 18, 2009
thanks for answer. Nmap said after scan that port which I'm using to connect is filtered. Currently I'm trying to open any port, because standard
iptables -A INPUT -p tcp --dport _myport_ -j ACCEPT
doesn't work. So it seems that it's not a java problem anymore, but if anyone knows simple way to fix it it would be great .