Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

debugging java.net.UnknownHostException

807580Dec 16 2009 — edited Dec 17 2009
Hi,

I have an app which pulls files via FTP. It uses a third-party library called JFTP. The server that we pull from has requested that instead of connecting via a specific IP, as we've been doing for a couple years, we switch to use a new domain name. I am trying to make the switch in our app, which should be just to replace the IP with the domain name.

Now, when I run it locally on my computer, it connects successfully. When I put the app up on our server and execute, it throws an UnknownHostException. The code and resources are the same, so I'm led to believe its an environment issue, but I'm not sure where to look. I don't believe its a firewall issue. My local os is windows but the server is solaris... not sure if thats a potential cause.

Below is the exception but it pretty generic. Don't know where to look next. Thanks
java.net.UnknownHostException: ftp.domain.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
        at java.net.Socket.connect(Socket.java:507)
        at java.net.Socket.connect(Socket.java:457)
        at java.net.Socket.<init>(Socket.java:365)
        at java.net.Socket.<init>(Socket.java:178)
        at net.sf.jftp.net.JConnection.run(JConnection.java:128)
        at java.lang.Thread.run(Thread.java:595)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 14 2010
Added on Dec 16 2009
8 comments
507 views