From: Gil H. <gi...@te...> - 2005-02-08 19:49:21
|
Hi, When I try and run a simple test program behind a corporate firewall I get: java.net.UnknownHostException: http://webcache at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) at java.net.Socket.connect(Socket.java:505) 'webcache' is the proxy and I've set it in the code as: final WebClient webClient = new WebClient(BrowserVersion.MOZILLA_1_0, "http://webcache", 8080); Is there any reason why it would not be found? If I ping from the it seems to be found ... Any help would be appreciated. Thanks, Gil |
From: David D.K. <ddk...@ki...> - 2005-02-09 05:56:09
|
Does "nslookup webcache" work? I'm always distrustful of hostnames that aren't fully qualified. It's usually a sign of a Windows network that is lacking proper DNS. As far as I know, Java is going to attempt to lookup the hostname using DNS, as opposed to WINS. The "nslookup" command will force Windows to resolve the hostname through DNS instead of WINS on your PC. Dave On Feb 8, 2005, at 1:48 PM, Gil Hauer wrote: > When I try and run a simple test program behind a corporate firewall I > get: > > java.net.UnknownHostException: http://webcache > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) > at java.net.Socket.connect(Socket.java:505) > > 'webcache' is the proxy and I've set it in the code as: > final WebClient webClient = > new WebClient(BrowserVersion.MOZILLA_1_0, > "http://webcache", > 8080); > > Is there any reason why it would not be found? If I ping from the it > seems to be found ... > > Any help would be appreciated. > > Thanks, > Gil |
From: Gil H. <gi...@te...> - 2005-02-09 16:59:28
|
Hi, Thanks for the suggestions. Yes, nslookup works and fully qualified domain names also fail in the same manner. No WINS involved on this network as this is running on a Linux client against Solaris servers. Is there any debugging or logging that I can do to help diagnose this problem? Thanks, Gil On Wed, 2005-02-09 at 00:55, David D.Kilzer wrote: > Does "nslookup webcache" work? I'm always distrustful of hostnames > that aren't fully qualified. It's usually a sign of a Windows network > that is lacking proper DNS. As far as I know, Java is going to attempt > to lookup the hostname using DNS, as opposed to WINS. The "nslookup" > command will force Windows to resolve the hostname through DNS instead > of WINS on your PC. > > Dave > > > On Feb 8, 2005, at 1:48 PM, Gil Hauer wrote: > > > When I try and run a simple test program behind a corporate firewall I > > get: > > > > java.net.UnknownHostException: http://webcache > > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) > > at java.net.Socket.connect(Socket.java:505) > > > > 'webcache' is the proxy and I've set it in the code as: > > final WebClient webClient = > > new WebClient(BrowserVersion.MOZILLA_1_0, > > "http://webcache", > > 8080); > > > > Is there any reason why it would not be found? If I ping from the it > > seems to be found ... > > > > Any help would be appreciated. > > > > Thanks, > > Gil > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: David D.K. <ddk...@ki...> - 2005-02-11 16:19:03
|
Try a "/" at the end of the proxy URL? :) You should be able to write a log4j.properties (or log4j.xml) file that enables debugging on the commmons-httpclient software (which is the software that is doing all the http requests for htmlunit). http://jakarta.apache.org/commons/httpclient/ http://jakarta.apache.org/commons/httpclient/logging.html Dave On Feb 9, 2005, at 10:58 AM, Gil Hauer wrote: > Hi, > > Thanks for the suggestions. > > Yes, nslookup works and fully qualified domain names also fail in the > same manner. No WINS involved on this network as this is running on a > Linux client against Solaris servers. > > Is there any debugging or logging that I can do to help diagnose this > problem? > > Thanks, > Gil > > > On Wed, 2005-02-09 at 00:55, David D.Kilzer wrote: >> Does "nslookup webcache" work? I'm always distrustful of hostnames >> that aren't fully qualified. It's usually a sign of a Windows network >> that is lacking proper DNS. As far as I know, Java is going to >> attempt >> to lookup the hostname using DNS, as opposed to WINS. The "nslookup" >> command will force Windows to resolve the hostname through DNS instead >> of WINS on your PC. >> >> Dave >> >> >> On Feb 8, 2005, at 1:48 PM, Gil Hauer wrote: >> >>> When I try and run a simple test program behind a corporate firewall >>> I >>> get: >>> >>> java.net.UnknownHostException: http://webcache >>> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) >>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) >>> at java.net.Socket.connect(Socket.java:505) >>> >>> 'webcache' is the proxy and I've set it in the code as: >>> final WebClient webClient = >>> new WebClient(BrowserVersion.MOZILLA_1_0, >>> "http://webcache", >>> 8080); >>> >>> Is there any reason why it would not be found? If I ping from the it >>> seems to be found ... >>> >>> Any help would be appreciated. >>> >>> Thanks, >>> Gil >> > |