Project

General

Profile

Internal server error upload files

Added by Sergey M about 10 years ago

Good day.
I have a problem I can not solve. When you try to download file, js-script in apache logs and outputs on page gives 500 error - Internal Server error. In the log files Redmine also did not understand, according to him there is no error. Enclose a screenshot and access rights to the folder. But on the issue, the error is not in the rights to the folder.


SYSTEM:
[root@test-hosting public_html]# RAILS_ENV=production script/about

sh: darcs: command not found
sh: hg: command not found
sh: cvs: command not found
sh: bzr: command not found
sh: git: command not found
Environment:
Redmine version 2.5.0.stable
Ruby version 1.9.3-p547 (2014-05-14) [x86_64-linux]
Rails version 3.2.17
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.11
Filesystem
Redmine plugins:
no plugin installed

REDMINE Log:
Started GET "/projects/test/files/new" for 192.168.3.77 at 2014-11-05 16:02:06 +0300
Processing by FilesController#new as HTML
Parameters: {"project_id"=>"test"}
Current user: admin (id=1)
Rendered attachments/_form.html.erb (1.7ms)
Rendered files/new.html.erb within layouts/base (2.9ms)
Completed 200 OK in 27.0ms (Views: 19.1ms | ActiveRecord: 2.6ms)

APACHE Log:
192.168.3.77 - - [05/Nov/2014:16:02:02 +0300] "GET /projects/test/files HTTP/1.0" 200 4950 "http://redmine.testsvn.com/projects/test/files" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36"
192.168.3.77 - - [05/Nov/2014:16:02:06 +0300] "GET /projects/test/files/new HTTP/1.0" 200 5242 "http://redmine.testsvn.com/projects/test/files" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36"
192.168.3.77 - - [05/Nov/2014:16:02:17 +0300] "POST /uploads.js?attachment_id=1&filename=PUTTY.EXE HTTP/1.0" 500 68 "http://redmine.testsvn.com/projects/test/files/new" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36"

Folders:
[root@test-hosting public_html]# ls -l
total 80
drwxr-xr-x 7 admin admin 4096 Mar 2 2014 app
drwxr-xr-x 5 admin admin 4096 Nov 5 15:56 config
-rwxr-xr-x 1 admin admin 160 Mar 2 2014 config.ru
-rwxr-xr-x 1 admin admin 240 Mar 2 2014 CONTRIBUTING.md
drwxr-xr-x 3 admin admin 4096 Oct 16 11:15 db
drwxr-xr-x 2 admin admin 4096 Mar 2 2014 doc
drwxr-xr-x 5 admin admin 4096 Mar 2 2014 extra
drwxr-xr-x 2 admin admin 4096 Mar 2 2014 files
-rwxr-xr-x 1 admin admin 3481 Mar 2 2014 Gemfile
-rwxr-xr-x 1 admin admin 3479 Oct 16 11:11 Gemfile.lock
drwxr-xr-x 8 admin admin 4096 Mar 2 2014 lib
drwxr-xr-x 2 admin admin 4096 Nov 5 17:06 log
drwxr-xr-x 2 admin admin 4096 Mar 2 2014 plugins
drwxr-xr-x 8 admin admin 4096 Oct 16 17:07 public
-rwxr-xr-x 1 admin admin 275 Mar 2 2014 Rakefile
-rwxr-xr-x 1 admin admin 205 Mar 2 2014 README.rdoc
drwxr-xr-x 2 admin admin 4096 Mar 2 2014 script
drwxr-xr-x 9 admin admin 4096 Mar 2 2014 test
drwxr-xr-x 8 admin admin 4096 Mar 2 2014 tmp
drwxr-xr-x 2 admin admin 4096 Mar 2 2014 vendor

error.PNG (24.9 KB) error.PNG

Replies (8)

RE: Internal server error upload files - Added by Martin Denizet (redmine.org team member) about 10 years ago

Hello Sergey,

My guess is that your file directory is not writable by the Apache2 user (I guess admin is not your Apache2 user).
You can check that in Administration/Information (/admin/info).

Cheers,

RE: Internal server error upload files - Added by Sergey M about 10 years ago

Thanks, Martin.

[root@test-hosting ~]# cat /etc/group |grep admin
desktop_admin_r:x:498:
apache:x:48:admin
admin:x:501:

But the problem remained. I noticed one feature when trying to upload a file less than 8 kilobytes - booting fine. But it is worth trying to download large files, as soon as an error... I do not even know what kind of error can be...

RE: Internal server error upload files - Added by Sergey M about 10 years ago

Yes, Chrome 38.0.2125.111
Use Internet Explorer 9. Situation not change.
Tell me please, if this proc right?

[root@test-hosting log]# ps axu|grep Pa
root 17652 0.0 0.1 216644 2000 ? Ssl 16:29 0:00 PassengerWatchdog
nobody 17660 0.0 0.1 215568 3640 ? Sl 16:29 0:00 PassengerLoggingAgent
root 18356 0.0 0.2 578584 4004 ? Sl 16:33 0:00 PassengerHelperAgent
admin 18804 0.6 5.4 402120 104176 ? Sl 16:36 0:02 Passenger RackApp: /home/admin/web/redmine.testsvn.com/public_html

Passenger not runnig root?

RE: Internal server error upload files - Added by Pavel Potcheptsov about 10 years ago

Have you tried to use FF instead of Chrome?
And could you make chmod -R a+w ./files in your redmine folder just to be sure it's not a permission trouble.

RE: Internal server error upload files - Added by Sergey M about 10 years ago

I tried to use IE9 and Chrome.
Make chmod -R a+w ./files situation not change.

RE: Internal server error upload files - Added by Pavel Potcheptsov about 10 years ago

It could be Chrome related problem.
There is a patch something here for this.

RE: Internal server error upload files - Added by Ryosuke Hirai over 8 years ago

Thanks for the info!! This helped me out

    (1-8/8)