Developer Portal shows HTTP 500 internal server error when trying to create files
Issue
-
When trying to create a new file in the Developer Portal of Red Hat 3scale API Management there is an HTTP 500 internal server error
Uups something went wrong
. -
The system-app pod's system-provider container log shows the following error
[aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] Started POST "/p/admin/cms/files" for 10.0.0.0 [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] Processing by Provider::Admin::CMS::FilesController#create as HTML [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] Parameters: {"utf8"=>"✓", "authenticity_token"=>"xyz", "cms_file"=>{"section_id"=>"9", "path"=>"/javascripts/doc.js", "downloadable"=>"0", "attachment"=>#<ActionDispatch::Http::UploadedFile:0x0000000010b9a838 @tempfile=#<Tempfile:/tmp/RackMultipart20220202-32-x0djdj.js>, @original_filename="doc.js", @content_type="text/javascript", @headers="Content-Disposition: form-data; name=\"cms_file[attachment]\"; filename=\"doc.js\"\r\nContent-Type: text/javascript\r\n">, "tag_list"=>""}} [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] WARNING: Can't mass-assign protected attributes for CMS::File: section_id app/controllers/provider/admin/cms/files_controller.rb:23:in `create' lib/three_scale/middleware/multitenant.rb:113:in `_call' lib/three_scale/middleware/multitenant.rb:108:in `call' lib/three_scale/middleware/cors.rb:20:in `call' [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] [paperclip] Trying to link /tmp/RackMultipart20220202-32-x0djdj.js to /tmp/9a09b4dfda82e3e665e31092d1c3ec8d20220225-32-oulttw.js [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] Completed 500 Internal Server Error in 305ms (ActiveRecord: 80.5ms) [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] Errno::EPERM (Operation not permitted @ apply2files - /opt/system/public//system/dev/2022/02/02/doc-10594f48878479d2.js): [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] lib/deadlock_retry.rb:52:in `transaction' [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa][3scale.api-mgmt.example.com] [10.0.0.0] app/controllers/provider/admin/cms/files_controller.rb:24:in `create' [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] lib/three_scale/middleware/multitenant.rb:113:in `_call' [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] lib/three_scale/middleware/multitenant.rb:108:in `call' [aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa] [3scale.api-mgmt.example.com] [10.0.0.0] lib/three_scale/middleware/cors.rb:20:in `call'
-
This problem is happening for all file types.
- It is seen when 3scale API Management is deployed on Azure.
Environment
- Red Hat 3scale API Management
- 2.11.0 On-Premise
- Microsoft Azure
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.