Confluence CLI is not working
Asked by Gaurav Mishra:

Hey Guys, I downloaded Confluence CLI and was trying to run it, but could not get it to work. Here is the error I am getting -

```
MACC02K31C8DKQ5:confluence-cli-3.3.0 a1000914$ ./confluence.sh --action login -vServer address: http://sdlc-sandbox.mydomain.com/wiki/rpc/soap-axis/confluenceservice-v1Login failed for http://sdlc-sandbox.mydomain.com/wiki, retry once to avoid occasional timeouts.Unable to log in to server: http://sdlc-sandbox.mydomain.com/wiki/rpc/soap-axis/confluenceservice-v1 with user: user1. Cause: ; nested exception is: 	org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messagesAxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode:  faultString: org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages faultActor:  faultNode:  faultDetail: 	{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages	at org.apache.axis.encoding.DeserializationContext.startDTD(DeserializationContext.java:1161)	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.doctypeDecl(AbstractSAXParser.java:339)	at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.doctypeDecl(XMLDTDValidator.java:724)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.scanDoctypeDecl(XMLDocumentScannerImpl.java:671)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:931)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)	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.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.login(ConfluenceserviceV2SoapBindingStub.java:4619)	at org.swift.confluence.cli.ConfluenceClient.serviceLogin(ConfluenceClient.java:362)	at org.swift.common.cli.AbstractRemoteClient.remoteLogin(AbstractRemoteClient.java:243)	at org.swift.common.cli.AbstractRemoteClient.setupRemote(AbstractRemoteClient.java:220)	at org.swift.common.cli.AbstractRemoteClient.handleSetupRemote(AbstractRemoteClient.java:80)	at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:117)	at org.swift.common.cli.CliClient.doWork(CliClient.java:315)	at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:146)	{http://xml.apache.org/axis/}hostname:MACC02K31C8DKQ5.localorg.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages	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.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.login(ConfluenceserviceV2SoapBindingStub.java:4619)	at org.swift.confluence.cli.ConfluenceClient.serviceLogin(ConfluenceClient.java:362)	at org.swift.common.cli.AbstractRemoteClient.remoteLogin(AbstractRemoteClient.java:243)	at org.swift.common.cli.AbstractRemoteClient.setupRemote(AbstractRemoteClient.java:220)	at org.swift.common.cli.AbstractRemoteClient.handleSetupRemote(AbstractRemoteClient.java:80)	at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:117)	at org.swift.common.cli.CliClient.doWork(CliClient.java:315)	at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:146)Caused by: org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages	at org.apache.axis.encoding.DeserializationContext.startDTD(DeserializationContext.java:1161)	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.doctypeDecl(AbstractSAXParser.java:339)	at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.doctypeDecl(XMLDTDValidator.java:724)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.scanDoctypeDecl(XMLDocumentScannerImpl.java:671)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:931)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)	... 16 moreMACC02K31C8DKQ5:confluence-cli-3.3.0 a1000914$
```

**I checked Confluence Logs to see if I can find anything there, but do not see much helpful information, here are logs -**

```
2013-04-17 23:24:28,398 WARN [TP-Processor8] [atlassian.plugin.webresource.DefaultResourceDependencyResolver] resolveDependencies Cannot find web resource module for: confluence.web.resources:page-editor-js -- url: /wiki/login.action | userName: anonymous2013-04-17 23:24:30,588 WARN [TP-Processor8] [atlassian.plugin.webresource.DefaultResourceDependencyResolver] resolveDependencies Cannot find web resource module for: confluence.web.resources:page-editor-js -- url: /wiki/login.action | userName: anonymous2013-04-17 23:25:04,829 WARN [TP-Processor8] [atlassian.plugin.webresource.DefaultResourceDependencyResolver] resolveDependencies Cannot find web resource module for: confluence.web.resources:page-editor-js -- referer: http://sdlc-sandbox.mydomain/wiki/dashboard.action | url: /wiki/login.action | userName: anonymous^C
```

I saw this [https://answers.atlassian.com/questions/20321/confluence-cli-stopped-working-suddenly](/questions/20321/confluence-cli-stopped-working-suddenly) and tried using different users and restarted confluence but nothing seems to be helping.

About my environment : We are using Jira thru Proxy so I hope thats not an issue. Also, I have not installed the license yet, but don't think that should be problem either.


Answers:
author: Gaurav Mishra
body: Thanks Bob. Figured it out. It was one of our own plugins which was probably redirecting it. I can access it after disabling it.

comments: author: Bob Swift (personal)
body: Good job. Thanks for reporting back. I am sure it will help others who run across that. How did you find the offending plugin? Was it some sort of enhanced remote API based plugin?


author: Gaurav Mishra
body: That plugin is used to filter IP addresses and allow a specific set of IP addresses to access. Although, my address was part of that set, but somehow the redirection of that plugin was not working in the CLI plugin. I disabled that plugin and tried again so now things seem to work. Its a sandbox so I can live with that.


author: Bob Swift (personal)
body: [Open an issue](https://bobswift.atlassian.net/browse/CSOAP). Here are a few things to try to isolate the problem.

1. Make sure the same server address you configured works from a browser on the same system
2. Does it get redirected? Try using the redirected url as the server address
3. Can you access the JIRA CLI when you remove the /wiki? Try: --action getServerInfo
4. Try using the direct TCP address

comments: author: Gaurav Mishra
body: Bob - I got a workaround by disabling that plugin in our Sandbox, but I can't do it in Production. Can you think of a work around for production? I am not sure why CLI is having problems with that plugin, but is there a way to Authenticate from my browser and use some token from the CLI?


author: Bob Swift (personal)
body: No. You probably need to get your network guys to figure out the configuration of the filtering to make it work. Sorry, can't help there.


author: Gaurav Mishra
body: Thanks Bob.


author: Gaurav Mishra
body: no luck. I tried with direct URL as well. We are using Context Path, so if I remove /wiki, its not going to work, and with wiki, I am getting the same error - with proxy or without proxy.

comments: author: Bob Swift (personal)
body: Well, you mentioned JIRA, so I assumed JIRA was on the url without the wiki. Sorry, I don't have any other thoughts on what that specific error is saying.


Tags: cli