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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

  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
TAGS
Community showcase
Posted in Confluence Cloud

Please tell us how you use Confluence space settings

👋 Hi there, a few of us at Atlassian would love to learn about how you use "space settings" functionality in Confluence. A facelift to the space settings is long overdue and we want to start with im...

180 views 6 6
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you