• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

java.net.ConnectionException

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic