Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence CLI: exportSpace : Bad response code 403

Regis January 23, 2014

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

2 votes
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2014
  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.
1 vote
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2015

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
TAGS
AUG Leaders

Atlassian Community Events