This topic has 8 replies on 1 page. |
|
Hi, I get the following error when I load a webpage that is on a tomcat 5.0 server.... It repeats about 3-5 times just from loading a page any ideas?
NotifyUtil::java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:569)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)
NotifyUtil::java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:569)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)
|
Hi, I'm fairly new to java and trying to download a web page page with th help of URL object and I get the following Exception:
java.net.ConnectException: Connection timed out: 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.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 HttpConnection.conectare(HttpConnection.java:92)
at HttpConnection.incarca(HttpConnection.java:58)
at HttpConnection.main(HttpConnection.java:44)
Can anybody help me?
Shoud I know about a proxy or something like that? :)
thankx
java.net.ConnectException: Connection timed out: 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.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 HttpConnection.conectare(HttpConnection.java:92)
at HttpConnection.incarca(HttpConnection.java:58)
at HttpConnection.main(HttpConnection.java:44)
Can anybody help me?
Shoud I know about a proxy or something like that? :)
thankx
|
it means that u can't connect to the server. try to ping to the server and see the result.
|
i don't know if that reply refeared to me or not... but in case it did thank you... I figured out what was wrong with it :)) i have a proxy and i did a small modification to my code i simply added the following lines before I used the URLConnection object:
// Modify system properties
Properties sysProperties = System.getProperties();
// Specify proxy settings
sysProperties.put("proxyHost", "10.9.1.1");
sysProperties.put("proxyPort", "3128");
sysProperties.put("proxySet", "true");
easy isn't it?
// Modify system properties
Properties sysProperties = System.getProperties();
// Specify proxy settings
sysProperties.put("proxyHost", "10.9.1.1");
sysProperties.put("proxyPort", "3128");
sysProperties.put("proxySet", "true");
easy isn't it?
|
I had this problem from installing netbeans. I uninstalled it, but there was still some configurations in the <catilina home>/config/web.xml file. Remove the following:
If you want an IDE, perhaps you'd like to try eclipse.
edit your [$TOMCAT_HOME]/conf/web.xml file and rip out the following section from the top - where Netbeans snuck it in, and didn't remove - even if i uninstalled it
=========================================
<filter>
<filter-name>HTTPMonitorFilter</filter-name>
<filter-class>org.netbeans.modules.web.monitor.server.MonitorFilter</filter-class>
<init-param>
<param-name>netbeans.monitor.ide</param-name>
<param-value>127.0.0.1:8082</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HTTPMonitorFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
=========================================
If you want an IDE, perhaps you'd like to try eclipse.
edit your [$TOMCAT_HOME]/conf/web.xml file and rip out the following section from the top - where Netbeans snuck it in, and didn't remove - even if i uninstalled it
=========================================
<filter>
<filter-name>HTTPMonitorFilter</filter-name>
<filter-class>org.netbeans.modules.web.monitor.server.MonitorFilter</filter-class>
<init-param>
<param-name>netbeans.monitor.ide</param-name>
<param-value>127.0.0.1:8082</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HTTPMonitorFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
=========================================
|
GO POST your QUESTION in your OWN thread!
|
Thanks jwolter, will try.
|
This worked. I did have NetBeans installed but thought the error was originating from Eclipse. Thanks for the help jwolter.
|
Yes, this works for me. I installed NetBeans but never notice that. I confused why get connetion refused even if access into 127.0.0.1. Now everything works fine. Thanks jwolter!
'JAVA > JSP_Servlet' 카테고리의 다른 글
http://zk1.sourceforge.net/ (0) | 2006.05.10 |
---|---|
[펌] 오픈소스 메일 서버/클라이언트 zimbra (0) | 2005.12.23 |
[펌] 자바툴(솔루션) 정리 (0) | 2005.11.16 |
sitemesh .. (0) | 2005.11.09 |
[펌] JSF의 새로운 얼굴, MyFaces (0) | 2005.10.27 |
Posted by tornado