Confluence CLI is not working

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 -v
Server address: http://sdlc-sandbox.mydomain.com/wiki/rpc/soap-axis/confluenceservice-v1
Login 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 messages
AxisFault
 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.local

org.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 more
MACC02K31C8DKQ5: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: anonymous
2013-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: anonymous
2013-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 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.

3 answers

1 accepted

Thanks Bob. Figured it out. It was one of our own plugins which was probably redirecting it. I can access it after disabling it.

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?

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.

Open an issue. 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

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?

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.

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.

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.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

450 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you