|
-
Router not allowing to open connection
Hi All,
I am new to programming and facing a problem with the following peice of code
import java.net.*;
public class MySQLConnectTest{
public static void main(String args[])throws Exception{
String hostname = "59.93.55.133"; // My Router IP
Socket s = new Socket(hostname,3306);
System.out.println("Got connection!");
s.close();
}
}
I am getting the following exception
Exception in thread "main" java.net.ConnectException: Connection timed out: conn
ect
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)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at MySQLConnectTest.main(MySQLConnectTest.java:7)
My router is not letting me to make a connection and so I cannot connect and get any data and my entire project is being stopped at the initial point. I also made sure that the full data getting on my router is diverted to me but nothing helps. BTW I am using D Link router. Any small help from you will be a great help for me. Please help. .......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks