Results 1 to 7 of 7
- 06-27-2011, 09:12 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 93
- Rep Power
- 0
Application does not connect over internet.
Hi,
I'm making a client TicTacToe application and a server TicTacToe application.
The server application is to run on my computer the it's IP according to whatismyip.com is 175.110.58.234.
On the client application, I made a socket which connects to that IP with port 8558.
I sent the client application to my brother (who lives in a different city) and asked him to connect with my server but it failed to connect.
Am i using the wrong I.P ? When I used local addresses to test locally on my computer - the client connected to the server successfully.
Thanks for your help.
- 06-27-2011, 09:29 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
Make sure you don't have a firewall preventing external access to that port, and make sure your server is running when you attempt it from a remote machine.
- 06-27-2011, 09:44 PM #3
Member
- Join Date
- Jan 2011
- Posts
- 93
- Rep Power
- 0
My Firewall was on. I turned it off but the client app was still unable to connect. Server was running at the time.
- 06-27-2011, 09:56 PM #4
Have you tried connecting using your IP address from your computer vs using the localhost address?
- 06-27-2011, 10:11 PM #5
Member
- Join Date
- Jan 2011
- Posts
- 93
- Rep Power
- 0
Yeah I did try that but that didn't work either which is why I think I might be using the wrong ip.
- 06-27-2011, 10:52 PM #6
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
So you can reproduce the problem on your own computer which is good...I presume the client is throwing an exception? Do you have a stack trace? Is it truly a timeout? How did you distribute the app (webstart, jar, applet - both webstart and applet will have to be signed for them to work)?but that didn't work either which is why I think I might be using the wrong ip.
- 06-28-2011, 07:16 PM #7
Member
- Join Date
- Jan 2011
- Posts
- 93
- Rep Power
- 0
Yup there is an exception, but I didn't find it very helpful. It's just a connectException.
The Application is a Runnable JAR.java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
Similar Threads
-
How to authenticate code with no internet connect.
By beardawg in forum Java AppletsReplies: 1Last Post: 04-14-2010, 07:31 PM -
How to authenticate code with no internet connect.
By beardawg in forum JavaFXReplies: 0Last Post: 04-13-2010, 08:16 PM -
internet info in application
By saurabh.w in forum New To JavaReplies: 1Last Post: 08-16-2009, 12:16 PM -
Help with Java application to connect to a database
By coco in forum JDBCReplies: 3Last Post: 09-18-2008, 03:07 PM -
Connect Java application to photo editor
By syellows in forum Advanced JavaReplies: 1Last Post: 11-21-2007, 12:09 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks