function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FandangoFandango 

URGENT: What to do ?

Hi, The following exception is thrown by SoapBindingStub.java while establishing connection with Sales Force web service for login. RemoteException: ; nested exception is: java.net.ConnectException: Connection refused What could possibly be the reason for this exception ? Thanks, ... Jean
SuperfellSuperfell
The most likely reason is that your network/firewall requires you to connect via a proxy server, and you haven't configured your client to use a proxy server.
FandangoFandango

I set both proxy server name and port number. If I redirect to salesforce.com or yahoo.com it works but after binding when i try to retrieve the session id than the exception is thrown which proves that its not because of the proxy settings. What else do I look into ?

Thanks in advance

SuperfellSuperfell
Then i would check the code that changes the serviceUrl following the redirect.
FandangoFandango
here is the code


SoapBindingStub binding = (SoapBindingStub) new SforceServiceLocator().getSoap();
LoginResult lr = binding.login(strLogin, password);// This line throws exception
String sessionID = lr.getSessionId();
response.sendRedirect("https://na1.salesforce.com/secur/frontdoor.jsp?sid="+ sessionID +"&retURL=");

here is the stacktrace output. Please tell me how to fix it


[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: AxisFault
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: faultSubcode:
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: faultString: java.net.ConnectException: Connection refused
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: faultActor:
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: faultNode:
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: faultDetail:
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: {http://xml.apache.org/axis/}stackTrace: java.net.ConnectException: Connection refused
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.socketConnect(Native Method)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.connect(Socket.java:452)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.connect(Socket.java:402)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.(Socket.java:309)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.(Socket.java:124)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:141)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:2553)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:2248)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:2171)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:1691)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1114)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at _jsps._test_jsp._jspService(_test_jsp.java:137)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:675)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.WebContainer.service(WebContainer.java:578)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: java.net.ConnectException: Connection refused
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:2553)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:2248)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:2171)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.client.Call.invoke(Call.java:1691)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1114)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at _jsps._test_jsp._jspService(_test_jsp.java:137)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:675)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at com.iplanet.ias.web.WebContainer.service(WebContainer.java:578)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: Caused by: java.net.ConnectException: Connection refused
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.socketConnect(Native Method)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.connect(Socket.java:452)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.connect(Socket.java:402)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.(Socket.java:309)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at java.net.Socket.(Socket.java:124)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:141)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
[15/Sep/2004:11:28:25] warning (13397): CORE3283: stderr: ... 26 more
SuperfellSuperfell
but your redirect is on the client side, so that proves nothing. Your server can't connect to www.salesforce.com this is most likely a firewall/proxy issue. From the server can you telnet to www.salesforce.com port 443 and get a connection ?
FandangoFandango
Please tell me is there a way to check if the server has internet access or not. I can not telnet from the server because of firewall. As per my knowledge the server has access to internet via a proxy server and I have specified the proxy server name and port number in the code. BTW, I can not run internet browser on the server.
SuperfellSuperfell
Based on the stacktrace and the axis code its failing to connect to the proxy server. (see JSSESocketFactory.java line 141)