aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes java.net.ConnectionException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "java.net.ConnectionException" Watch "java.net.ConnectionException" New topic
Author

java.net.ConnectionException

Damodara Reddy
Ranch Hand

Joined: Feb 09, 2007
Posts: 44
Hi,
We have Daemon processes which runs from AIX server as an application client to our application. Following is the error log I am getting. What could be wrong. why this connection exception is coming.



java.net.ConnectException: A remote host refused an attempted connect operation.
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled Code))
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java(Compiled Code))
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled Code))
at java.net.Socket.connect(Socket.java(Compiled Code))
at java.net.Socket.connect(Socket.java:432)
at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:435)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:649)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:339)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:300)
at sun.net.www.http.HttpClient.New(HttpClient.java:372)
at sun.net.www.http.HttpClient.New(HttpClient.java:353)
at sun.net.www.http.HttpClient.New(HttpClient.java:348)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:562)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:539)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:610)
at com.cce.its.coreservices.clients.NotificationServiceProxy.postNotification(Unknown Source)
at com.cce.insight.framework.statistics.StatisticsDaemon.sendErrorNotification(Unknown Source)
at com.cce.insight.framework.statistics.StatisticsDaemon.run(Unknown Source)
at com.cce.insight.framework.statistics.DBStatisticsManager.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:644)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:426)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:204)
at java.lang.Thread.run(Thread.java:570)

Thanks in Advance
Damodar Reddy


Damu
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

Originally posted by Damodara Reddy:

java.net.ConnectException: A remote host refused an attempted connect operation.


Sounds like your application host is running a firewall. Can you connect to it from other systems?


[How To Ask Questions On JavaRanch]
Damodara Reddy
Ranch Hand

Joined: Feb 09, 2007
Posts: 44
Hi Joe,
It usually runs from only one AIX system. Few times it gives this kind of error. Few times it will be connected.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

You are getting intermittent connection exceptions?
Your daemon (client) runs on AIX, correct? What does the server run on?
Certain version of Windows support only a limited number of external connections to prevent people from using desktop-licensed machines as "servers".
Application servers are limited as well, for example the development license for Weblogic only permits 3 different IP addresses to connect.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.net.ConnectionException