Confluence CLI: exportSpace : Bad response code 403

Hi Guys

I have CLI version 3.7.0, and Confluence 5.4.1.

I'm trying to export a space (not that big, about 7Mb when exported with Confluence in PDF).

I tried first exporting it in PDF, but it ends the with:

Remote error: ; nested exception is:

java.net.SocketTimeoutException: Read timed out

The connexion time out being valued with 10mn, ok, I can understand. Thus, I try an XML export, but then I get the error above mentioned.
--
--
confluence-cli/confluence.sh -s https://atlassian.hq.k.grp/confluence-u adminatl -p XXXXX -a exportSpace --space CMADMINTEAM --file "/tmp/toto.zip" -v
Action requires v2 remote API level. Service automatically updated to v2.
Using basic authentication.
17388b8f49 logged out.
Client error: Bad response code (403) received trying to retrieve data from URL: https://atlassian.hq.k.grp/confluence/download/temp/Confluencespace export-075859-99.xml.zip
org.swift.common.cli.CliClient$ClientException: Bad response code (403) received trying to retrieve data from URL: https://atlassian.hq.k.grp/confluence/download/temp/Confluencespace export-075859-99.xml.zip
at org.swift.common.cli.CliUtils.copyUrlToFile(CliUtils.java:215)
at org.swift.confluence.cli.ConfluenceClient.exportSpace(ConfluenceClient.java:4724)
at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:656)
at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:122)
at org.swift.common.cli.CliClient.doWork(CliClient.java:388)
at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:143)
--
-- In the Confluence logs, I can read:
2014-01-24 07:57:37,431 INFO [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-78] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ getServerInfo ] as user [ adminatl ]
2014-01-24 07:57:37,823 INFO [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-47] [confluence.rpc.auth.TokenAuthenticationInvocationHandler] invokeAuthenticatedMethod Executing remote API method [ exportSpace ] as user [ adminatl ]
2014-01-24 07:57:37,898 INFO [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-47] [atlassian.confluence.upgrade.AbstractUpgradeManager] getExportBuildNumber Backward compatibility for export: Checking...
2014-01-24 07:57:37,900 INFO [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-47] [atlassian.confluence.upgrade.AbstractUpgradeManager] getExportBuildNumber Build number 4526: "Remove the legacy remotable apps plugin from the user installed plugins" - Ok
2014-01-24 07:57:37,902 INFO [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-47] [atlassian.confluence.upgrade.AbstractUpgradeMana ger] getExportBuildNumber Build number 4517: "Migrate all Page Templates using a storage format round-trip conversion" - Not Ok
2014-01-24 07:57:37,905 INFO [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-47] [atlassian.confluence.upgrade.AbstractUpgradeManager] getExportBuildNumber Backward compatibility for export: "Migrate all Page Templates using a storage format round-trip conversion" prevents compatibility before 4517
2014-01-24 07:59:03,107 ERROR [http-chx-atlcorp-04.hq.k.grp%2F10.0.92.152-8090-111] [confluence.servlet.download.ExportDownload] getStreamForDownload Unauthorized attempt to access resource by adminatl. For more detail turn on INFO level logging for package : com.atlassian.confluence.servlet.download
-- url: /confluence/download/temp/Confluence | userName: adminatl
--
--
Any idea where it comes from?
Thanks for your help
Regis

2 answers

1 accepted

Accepted Answer
2 votes
  1. For the timeout, see the connectionTimeout parameter
  2. For the download error, that is a Confluence problem that appeared in 5.4.1 and is fixed in 5.4.3 - CONF-32094. Also ACLI Release 3.8 implemented a workaround.

Hi Bob,

We are getting "Client error: Bad response code (403) received trying to retrieve data from URL" when trying to export a space too, and this on confluence 5.5.. We use confluence-cli-3.9.0.jar Might the same bug have resurfaced?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 3 hours ago in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

42 views 0 3
Read article

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