Defect #14787

Problems to with file loading

Added by Moises G. over 9 years ago. Updated about 9 years ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:2.3.2

Description

I have problems loading a file.

Redmine latest version & Apache passenger passenger-3.0.19

Firebug Console:
POST domain/uploads.js?attachment_id=3&filename=logo2.png 404 Not Found
"NetworkError: 404 Not Found - domain/uploads.js?attachment_id=3&filename=logo2.png"

log/production.log

ActionController::RoutingError (No route matches [GET] "/uploads.js"):
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
railties (3.2.13) lib/rails/railtie/configurable.rb:30:in `method_missing'
passenger (3.0.19) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.19) lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
passenger (3.0.19) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
passenger (3.0.19) lib/phusion_passenger/utils.rb:470:in `safe_fork'
passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.19) lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
passenger (3.0.19) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
passenger (3.0.19) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
<internal:prelude>:10:in `synchronize'
passenger (3.0.19) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
passenger (3.0.19) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.19) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.19) helper-scripts/passenger-spawn-server:99:in `<main>'

error-subir-archivo.png (20.5 KB) Moises G., 2013-08-27 19:47


Related issues

Duplicated by Redmine - Defect #14780: Please how solvet this problem in redmine 2,3,2 centos 6 Closed

History

#1 Updated by Daniel Felix over 9 years ago

  • Subject changed from error al adjuntar archivo to Problems to with file loading
  • Description updated (diff)

Please post your request in English. I translated it using an automatic translator.

#2 Updated by Daniel Felix over 9 years ago

Maybe some errors regarding the .htaccess?
Do you have some plugins installed?

#3 Updated by Toshi MARUYAMA about 9 years ago

  • Duplicated by Defect #14780: Please how solvet this problem in redmine 2,3,2 centos 6 added

#4 Updated by Toshi MARUYAMA about 9 years ago

  • Status changed from New to Needs feedback

#5 Updated by Pavel Potcheptsov about 9 years ago

Hello, I have the exactly same error, during file upload.
My setup is redmine+puma+nginx.
And I think this is nginx setup related, especially with this part of nginx.conf:

            location ~* \.(html|css|js)$ {
                      root /var/www/rm2.3.2/public;
                      expires 30d;
                      access_log /var/log/nginx/rmruby_access.log combined;
                      error_log /var/log/nginx/rmruby_error.log error; }

The rmruby_error.log says:
2013/09/06 13:49:39 [error] 20326#0: *6493 open() "/var/www/rm2.3.2/public/uploads.js" failed (2: No such file or directory), client: 192.168.5.1, server: ruby.redmine.net, request: "POST /uploads.js?attachment_id=1&filename=BPM_Buyers_Kit_SampleRFP_EN.pdf HTTP/1.1", host: "ruby.redmine.net", referrer: "http://ruby.redmine.net/issues/3" 

and "File not found" appears as on attached screenshot.
But when I remove js from this part of code (html|css|*js*) then upload works fine.

#6 Updated by Lyubomir Gardev about 9 years ago

Hello, I have the same problem, but under Apache2. Everything is working fine, except on the upload.

Since production log shows no error about that, even with log_level = :debug, I tried to find uploads.js file or route definition or something that contains uploads.js on the file system, all with no luck.

Access log of the apache says 500 640(status), nothing in the error log, and only that ActionController::RoutingError (No route matches [GET] "/uploads.js"):, which is normal error caused by executing GET request (resulting in 404 Not Found), while only POST is defined (somewhere in the dark) - resulting in 500 Internal Server Error.

ADDL The get problem appears, when inspecting the request from firebug in new tab (open in new tab - sends get request to the url).

However there is not trace of serving POST uploads.js in that log file.

I have only one plugin installed, named timelog_timer adding time counter in an issue. I have reinstalled redmine, but even fresh install without any plugins did not helped to upload any file.

These files are small, and it says 5MB are allowed, so I think its not from the max file size.

Also I gave permissions and 777 policy to ./files and ./tmp directories, still no luck... Checked attachment_controller.rb, if the route magically brings the flow here and again no luck.

ADD: I found some method upload_path which has some argument :format, called with :format => js, could it be related to this issue and possible location of upload.js?

Can anybody at least point me where to look for the problem?
Thank you

PS: Config Info:
Environment:
Redmine version 2.3.3.stable
Ruby version 1.8.7-p302 (2010-08-16) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
timelog_timer 2.0.0

PS2: Forgot to mention, removing js from the request results in Not Found.

Also available in: Atom PDF