Java - Socket has 'connection timed out error' or 'no route to host' error with certain internet?

192.168.x. Y is a local address source You need your home machines ip address as the INTERNET sees it When you're home next, go to whatismyip.com and see what it thinks you are Note that you might need to go onto your router and route traffic from your router to your machine for port 9999, since that's what you'll probably be hitting.

192.168.x. Y is a local address. Source You need your home machines ip address as the INTERNET sees it.

When you're home next, go to whatismyip.com/ and see what it thinks you are. Note that you might need to go onto your router and route traffic from your router to your machine for port 9999, since that's what you'll probably be hitting.

The 192.168.x. Y IP address is a blocker, but the OP may also find that the coffee shop's network blocks port 9999, or that his laptop's firewall blocks 9999 on an "insecure" network. – Stephen C Aug 15 at 23:31 thanks for your response.

I tried replacing the local address with the whatsmyip. Com address and it didn't work! What does this mean?

– YoungMoney Aug 15 at 23:39 Well it means something in between your home computer and your laptop at the coffee shop has stopped your connection. It's not your home computer, since you could connect to it in the past. If your laptop was used for the test that succeeded at home, it's probably not that either, although this is a possibility.

This could be either your router's firewall, which you have control over, or the shop's firewall (as Stephan noted) which you don't. – glowcoder Aug 15 at 23:42 Alright. I'm guessing most places offering free WiFi have damn tight firewalls then... I also tried this at a public library and it gave similar errors.In case I'm setting up a router somewhere, what type of settings should I be mindful of to make sure this type of socket connection works?

– YoungMoney Aug 15 at 23:45 Look for 'port forwarding' and tell the router to send traffic on port 9999 to 192.168.0. XXX (the server machine) - ideally, tell it to send the data to yourServerHostname so it changes dynamically as your IP changes. – glowcoder Aug 15 at 23:47.

When you're running both the server and client on the same machine, you could use the loopback address, 127.0.0.1, when out at the coffee shop. Using the loopback address and running the server and client on the one machine should work all the time, whether at home or out. You could check your IP address as suggested by Total, but that will only stay the same if you have a static IP.

If you aren't sure if you have a static or dynamic IP address, you probably have a dynamic IP address but you should check your IP address a few times over a week or so to observe any change. Another alternative is to consider a free dns server e.g. freedns.afraid.org/ , set a job to update your IP address regularly with that service and use whatever domain name you have chosen to access your local server. With either method of accessing your home network remotely, you'll need to forward traffic on 9999 to the relevant machine on your home network.

HTH :).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions