Export Metadata Giving 500

Hi Folks,

I am facing issue while i try to download the Metadata for Visualisations and get 500.

When I try to search for logs, none of the logs show any relevant information for the failure. I have checked below logs

dhis.log
localhost_access_log.text - Has info but just the api details and status code
localhost.log
catalina.out

This is happening only with the Visualisation Metadata Export and none other Exports.

Version for which this is happening is 2.37.8.1-SNAPSHOT

API Call: GET /api/metadata.json?skipSharing=true&visualizations=true&dashboards=true&eventCharts=true&eventReports=true&download=true

@Gassim @DHIS2-Community @dhis2-backend

Hi @Vishwanideep_Kumar

Is this a production instance? If so, it’s not recommended to use the “SNAPSHOT” version.

If you login to the instance and paste the API request to the browser (while you’re logged in), do you still get an error or does the download start?

When you get this error, there’s probably an issue connecting to the instance itself. Please double check the authentication.

Thanks!

Hi @Gassim

I am doing the metadata export from the Import/Export App.

Steps Followed:

  1. Logged into DHIS2
  2. Selected Import/Export App
  3. Metadata Export
  4. Select None
  5. Clicked on Visualization checkbox.
  6. Chose uncompressed and format json
  7. Start Export
  8. New Tab opens and i see the same error message 500.

API details given in previous chat

Hi @Vishwanideep_Kumar

I’m not able to reproduce this issue in any of the play.dhis2.org instances (latest versions). However, the fact that you are getting 500 error message seems to be a server/connection related issue. Could you check the Catalina.out log and see if there are any errors there? (if you share the log make sure to remove any sensitive/authentication info).


Hi again @Vishwanideep_Kumar , are you still facing the issue above? Thanks!

Hi @Gassim,

The catalina.out logs wont update and yes issue still persists, however we might have a fix as well. Issue was

One of the pivot table visualisation was causing the export to fail. It appears to have some broken data references and hence causing the issue. Once I remove those references and retry export works.

I have suggested the project team to test this and confirm. Once we get a confirmation from them, I will mark this chat to be solved.

Thanks for all your help :slight_smile:

1 Like

Hi @Vishwanideep_Kumar
Thanks for the info and glad to know that you might have found a fix.

Did this work? Any new findings that might help?

Thanks!