cruisecontrol.rb
cruisecontrol.rb copied to clipboard
Builder exits unexpectedly
We downloaded /thoughtworks-cruisecontrol.rb-422b3ee from https://github.com/thoughtworks/cruisecontrol.rb/downloads. Got it installed and running but some projects exit unexpectedly. Here is log trace from builder.log.
[fatal] Input/output error
[fatal] /home/X/cruise/app/models/polling_scheduler.rb:69:in `write'
[fatal] /home/X/cruise/app/models/polling_scheduler.rb:69:in `puts'
[fatal] /home/X/cruise/app/models/polling_scheduler.rb:69:in `log_error'
[fatal] /home/X/cruise/app/models/polling_scheduler.rb:20:in `run'
[fatal] /home/X/cruise/lib/cruise_control/../../script/builder:86
[fatal] /home/X/cruise/lib/cruise_control/../../script/builder:85:in `catch'
[fatal] /home/X/cruise/lib/cruise_control/../../script/builder:85
[fatal] /home/X/cruise/lib/cruise_control/init.rb:92:in `load'
[fatal] /home/X/cruise/lib/cruise_control/init.rb:92:in `builder'
[fatal] /home/X/cruise/lib/cruise_control/init.rb:12:in `send'
[fatal] /home/X/cruise/lib/cruise_control/init.rb:12:in `run'
[fatal] /home/X/cruise/cruise:10
[info] [2012-01-19 23:06:08] Builder for project 'Z' exited
Looks like there an exception which is not handled by this code in script/builder. Guys any recommendations what to do about it?
begin
project = load_project(project_path)
startup(project)
write_to_log_and_console "Builder for project '#{project.name}' started"
puts "Logging to: #{File.expand_path(CRUISE_OPTIONS[:log_file_name])}"
while (true) do
catch(:reload_project) do
project.scheduler.run
end
project = load_project(project_path)
# this will cause the next call to scheduler to run the build immediately
project.request_build rescue nil
end
rescue Interrupt
# this is okay, we're just control-c'ing the app
rescue Exception => e
begin
CruiseControl::Log.fatal(e)
rescue => logging_error
STDERR.puts e.message
STDERR.puts e.backtrace.map { |line| " #{line}" }
STDERR.puts "Attempt to log the above error failed with this:"
STDERR.puts logging_error.message
STDERR.puts logging_error.backtrace
end
CRUISE_OPTIONS[:verbose] ? raise : exit(1)
ensure
cleanup(project)
end
@crawlik - Which version of rails are you using? From a bit of research it seems that some older versions (2.3.x) may have a bug causing issues with STRERR stream writes in particular circumstances. I'm unable to find much in the way of compelling documentation on the specifics and/or practical fixes. If you are using an older version of rails I'd suggest upgrading if that's possible.
If that isn't a practical solution can you please post the specifics of your environment (ruby version/rails version/platform/anything else special you're doing).
Here is our environment
Ubuntu 10.04 Rails 3.0.7 thin 1.3.1 codename Triple Espress
Cruise started using this command
./cruise start thin -d