404 for all documents in imported events

We tried to upgrade from 1.2.1rc11 to 2.0.3 with indico-migrate 1.0.5 and ran into some trouble.

The migration log was free from errors and it seems to find the legacy-archive.
The reason I think that is that printing of badges with a background works and the background image is in the legacy-archive.

When viewing the event it’s attachment/files are visible with thumbnail and name, but when I click on it I get a 404. (copying the file to /opt/indico/archive did nothing)

    # Not Found
    The requested URL /event/537/contributions/833/attachments/780/1008/20180914_FREIA_contribution_to_ESS_instruments.pptx was not found on this server.

indico.log
2018-10-30 15:34:06,383 INFO 7d65365cafb74e1d indico.rh GET /event/537/contributions/833/attachments/780/1008/20180914_FREIA_contribution_to_ESS_instruments.pptx [IP=130.238.136.66] [PID=96362] [UID=557]

Any tips on how I should proceed?

Check your webserver’s log file as well. If you get a 404 it may mean that xsendfile isn’t properly configured or the legacy-archive folder has incorrect permissions preventing the web server from accessing files inside.

PS: You should update to 2.1.4; 2.0.x is EOL.

The httpd-log just shows the 404, error logs empty

130.238.136.66 - - [31/Oct/2018:09:38:09 +0100] “GET /event/537/contributions/833/attachments/780/1008/20180914_FREIA_contribution_to_ESS_instruments.pptx HTTP/1.1” 404 298 “https://indico.test.uu.se/event/537/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0” “indico.test.uu.se”

The file it wants can be found at

/opt/indico-legacy/archive/2018/C537/c0/6695798347892102686/20180914_FREIA_contribution_to_ESS_instruments.pptx

Where/how in indico does that get converted to

event/537/contributions/833/attachments/780/1008/20180914_FREIA_contribution_to_ESS_instruments.pptx

We where planning to upgrade in steps, first to 2.0.3, then to 2.1.4

I think you might have forgotten this step.

1 Like

The legacy data has been moved and is accessible for other parts of the application (printing a badge with a pdf background).

in indico.conf I have this:

STORAGE_BACKENDS = {
                 'default': 'fs:/opt/indico/archive',
                 'legacy': 'fs-readonly:/opt/indico-legacy/archive'
                 }

Hi pmopmo,
We are having what appears to be the same problem. Did you find a solution?

Thanks!

Like I suggested originally, checking webserver logs may help…

Thanks for the quick reply! It is fixed now.
For future googlers, in the setup guide in the section Post Migration Work there is this section:

We really recommend as well that you move your old Indico archive (/opt/indico-legacy/archive) inside your new Indico directory:

follow these instructions (plus update the legacy-backend to the new directory as described). This was required for me to avoid the 404.

Thanks for all your work!

If you left it elsewhere you’d need to adapt the webserver config so xsendfile works for that location.

1 Like