Bug 17706

Summary: MARC staging fails with "Upload status: Denied" when memcached is enabled
Product: Koha Reporter: Mirko Tietgen <mirko>
Component: ToolsAssignee: Galen Charlton <gmcharlt>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, m.de.rooy
Version: 16.11   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Mirko Tietgen 2016-12-01 16:14:35 UTC
In 16.11.00 with memcached enabled, staging MARC records fails with "Upload status: Denied". It works after disabling memcached.
Comment 1 Marcel de Rooy 2016-12-01 21:22:34 UTC
I'm not seeing this. We need more details.
Comment 2 Mirko Tietgen 2016-12-23 00:45:21 UTC
I just had it again, on an instance where memcached was turned off. Will post more if I find a pattern.
Comment 3 Mirko Tietgen 2016-12-23 01:09:42 UTC
I think this time it was turning off memcached but not restarting apache. Which is not really a Koha bug but user error ;) I'll leave the bug open and see if I get it again.
Comment 4 Jonathan Druart 2017-01-09 09:21:18 UTC
Lowering the severity as it's not confirmed.
Comment 5 Marcel de Rooy 2017-02-18 14:15:07 UTC
Tested on master:
With Plack and memcached, start an upload with tools/upload. Fine!
Stop the memcache service. With Plack only, start a second upload. Also fine!

The Denied status normally is triggered by a wrong authentification. A possible scenario could be using memcached for the session data. If you are logged in, so have a session, and after that you enable or disable memcache, the session cannot be found any longer. So should trigger an authentification error; this is more or less what we expect.
Since the upload button starts an ajax call to upload-file and upload-file does only use check_cookie_auth and not get_template_and_user, you will just see a Failed status here. Clicking on another menu link should redirect you to the login page.

Mirko: Can you check if you used memcache for session data?
Comment 6 Katrin Fischer 2023-06-25 20:55:08 UTC
No more reports of this since 16.11, looks like a user error.