Can't upload or download files
Added by Mark Hutton over 6 years ago
I have recently created a new Redmine Server using a raw install on Centos7 using Plesk Onyx.
I would be grateful for any help or pointers.
(For the environment see Info below)
My issues are as follows:-
1) Some projects (existing projects imported into the new server from an old one) can’t access the settings page (gives internal error), new projects can. (note: I can live with this if I have to – might be due to db structure issues)
2) Some pages 404, 401 or give an 'Internal Error' when accessed from some links and not from others
3) Files cannot be uploaded – this is critical to the operation of the server. When attempting to upload a file after browsing to and selecting the file, the filename is displayed but an adjacent label shows “Internal Server (Error)”.
(Pressing ‘Save’ in some cases) errors 401/404s.
4) Some Android apps (Redminer) can connect and access the data ok, but RedminePM cannot. Also the Redmine Outlook Plugin connects but cannot Sync with the server.
Solutions tried:¶
1) File/Folder permissions set to 777
2) Check SELinux - disabled
3) Sought advice from Plesk re - Apache/nginx set up.
Info¶
Ashampoo_Snap_2018.02.26_09h05m56s_002_.png (5.8 KB) Ashampoo_Snap_2018.02.26_09h05m56s_002_.png | Results of browsing for a file to upload | ||
Ashampoo_Snap_2018.02.26_14h21m54s_007_.png (9.94 KB) Ashampoo_Snap_2018.02.26_14h21m54s_007_.png | Internal Error | ||
Ashampoo_Snap_2018.02.26_14h23m12s_008_.png (66.4 KB) Ashampoo_Snap_2018.02.26_14h23m12s_008_.png | Redmine Info | ||
production180226pm.log (183 KB) production180226pm.log | production log file |
Replies (3)
RE: Can't upload or download files - Added by Mark Hutton over 6 years ago
Please Note:
script/about is deprecated use bin/about
[root@localhost httpdocs]# cd redmine
[root@localhost redmine]# rails_env=production script/about
-bash: script/about: Permission denied
[root@localhost redmine]#
I get -bash: bin/about Permission denied, which is probably caused by the issue at hand.
Actually these scripts weren't set to executable so they wouldn't run.
Changed them to executable so
[root@localhost redmine]# RAILS_ENV=production bin/about /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError) from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /var/www/vhosts/projexz.co.uk/httpdocs/redmine/config/boot.rb:4:in `<top (required)>' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /var/www/vhosts/projexz.co.uk/httpdocs/redmine/config/application.rb:1:in `<top (required)>' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /var/www/vhosts/projexz.co.uk/httpdocs/redmine/config/environment.rb:2:in `<top (required)>' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from bin/about:4:in `<main>'
RE: Can't upload or download files - Added by Mark Hutton over 6 years ago
Well thanks for the help!!!!!!!!!!
Just in case anyone is interested, this is the log file snippet associated.
Started POST "/uploads.js?attachment_id=1&filename=projexz_logo2b.png&content_type=image%2Fpng" for 86.177.105.38 at 2018-03-09 16:58:15 +0000 Processing by AttachmentsController#upload as JS Parameters: {"attachment_id"=>"1", "filename"=>"projexz_logo2b.png", "content_type"=>"image/png"} Current user: Mark (id=5) Saving attachment '/var/www/vhosts/projexz.co.uk/httpdocs/redmine/files/2018/03/180309165815_projexz_logo2b.png' (4464 bytes) Completed 500 Internal Server Error in 24ms (ActiveRecord: 4.8ms) ActiveRecord::StatementInvalid (Mysql2::Error: Data too long for column 'digest' at row 1: INSERT INTO `attachments` (`filesize`, `author_id`, `filename`, `content_type`, `created_on`, `disk_directory`, `disk_filename`, `digest`) VALUES (4464, 5, 'projexz_logo2b.png', 'image/png', '2018-03-09 16:58:15', '2018/03', '180309165815_projexz_logo2b.png', '1d7e6b80325733921ab06e7141678d86b555b6cbb68dd8cc80415a1a60a991ec')): app/controllers/attachments_controller.rb:97:in `upload' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
RE: Can't upload or download files - Added by Mark Hutton over 6 years ago
Solved¶
I think I have fixed it.
I can see the project settings page in every project I tried, and can now correctly upload files.
As suspected, nothing to do with the plug ins.
I regenerated the secret token and then re migrated the database.
When I performed the original installation, to the following instructions How to deploy Redmine in Plesk step 1, Install Tools Required to Build Ruby GEMs was missing (it was me that informed the author), I installed the tools after the fact.
It is either this or some of the subsequent steps we have taken in the meantime, coupled with either the regeneration of the token (don’t understand that) or more likely the remigration of the database which appears to have solved the issue.