Project

General

Profile

Redmine crashes on cURL issue updates

Added by Robert Klebe over 12 years ago

I'm trying to update issues in a working Redmine 1.3.0 system using PHP/cURL and/or PHP/cURL/ActiveResource.

But every request I do results in internal server error 500 and a crash detailed in Apache error log

I have now gone so far that I've tried to run cURL separately (exe-file in Windows...) - same result, a crash.
I followed this: http://www.redmine.org/projects/redmine/wiki/Rest_api_with_curl

My curl command (credentials removed, issue exists):

curl -k -v -H "Content-Type: application/json" -X PUT --data "@1234.json" -u ****:**** https://****/issues/1234.json

The 1234.json file:

{
    "issue": {
        "subject": "Test",
        "notes": "Test using Win32" 
    }
}

Error log:

NoMethodError (undefined method `[]' for nil:NilClass):
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

What is wrong?


Replies (2)

RE: Redmine crashes on cURL issue updates - Added by Jean-Philippe Lang over 12 years ago

As you can see in the stack trace, the error occurs in your rack request handler, before Redmine actually "sees" your request.
So it doesn't seem to be a Redmine issue.

RE: Redmine crashes on cURL issue updates - Added by Robert Klebe over 12 years ago

Yes, now I see it. It seems to be in the request handler in Passenger?

Do you have any idea what the error can be?

I have been around in the folders and files of /usr/lib/ruby/1.8/phusion_passenger trying to find an answer.

Could this have something to do with #5123 ?

EDIT:

Seems to be something with PUT requests.
If I switch to GET/POST I don't get this error (I get 405 then etc...).

    (1-2/2)