Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.net.ConnectionException

 
Damodara Reddy
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Joe Ess
Bartender
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Damodara Reddy
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic