cancel
Showing results for 
Search instead for 
Did you mean: 

Error starting WS session...

cszamudio
Champ on-the-rise
Champ on-the-rise
Hi.
When trying to access the Alfresco web services I'm getting the error "Error starting session" when calling the AuthenticationUtils.startsession method. BUT only if I specify the host IP address (e.g., 192.168.1.154) in the webserviceclient.properties file. If, rather, I specify the machine as "localhost" in webserviceclient.properties and run on the same computer as Alfresco things work fine.

Any suggestions on what might be going on? It seems clearly an authentication issue, but why does connecting to "localhost" work? Thanks.
Carlos

The error is:
Exception in thread "main" org.alfresco.webservice.util.WebServiceException: Error starting session.
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:94)
   at src.AlfrescoWSTest.main(AlfrescoWSTest.java:64)
Caused by: java.net.SocketException: Connection reset
   at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:79)
   … 1 more
Caused by: java.net.SocketException: Connection reset
   at java.net.SocketInputStream.read(Unknown Source)
   at java.io.BufferedInputStream.fill(Unknown Source)
   at java.io.BufferedInputStream.read1(Unknown Source)
   at java.io.BufferedInputStream.read(Unknown Source)
   at java.io.FilterInputStream.read(Unknown Source)
   at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
   at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
   at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
   at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(Unknown Source)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
   at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
   at javax.xml.parsers.SAXParser.parse(Unknown Source)
   at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   … 11 more
3 REPLIES 3

cszamudio
Champ on-the-rise
Champ on-the-rise
I believe I discovered my problem and convinced myself that I really don't understand how AXIS works in practice.

If I specify the IP address of the Alfresco WS in the webserviceclient.properties file and run my application on the same machine as the Alfresco WS, then I get this AXIS error.  If, however, I specify "localhost" in the .properties file it works fine. If I run my application on a separate machine and specify the Alfresco WS IP address in the .properties file it also works fine.

So, it doesn't seem to like it if you specify the specific IP address and then run an application on the same machine as the Alfresco server.

mcruz
Champ in-the-making
Champ in-the-making
Hi !

I have a similar problem but I'm getting a "Service unavailable" error instead of "Connection reset"

Have you solved your problem?

Thanks

cszamudio
Champ on-the-rise
Champ on-the-rise
I didn't really solve this, but rather just applied the convention for naming the Alfresco machine in the properties file. Since my client application always runs on a separate computer from the Alfresco server, I moved on to other issues…(-;