To unsubscribe from this group and stop receiving emails from it, send an email to bibapp+un...@googlegroups.com.
To post to this group, send email to bib...@googlegroups.com.
Visit this group at http://groups.google.com/group/bibapp.
For more options, visit https://groups.google.com/groups/opt_out.
From: bib...@googlegroups.com [mailto:bib...@googlegroups.com]
On Behalf Of Jason Stirnaman
Sent: Tuesday, June 25, 2013 10:33 AM
To: bib...@googlegroups.com
Subject: Re: [bibapp] Importing Citations
Tom,
Do you have the directory [BibApp]/tmp/delayed_job_production_pids and is there a file "delayed_job.pid" in there? Do you also have a [BibApp]/log/delayed_job.log file.
Yes I have a [BibApp]/tmp/delayed_job_production_pids directory. There is no file “delayed_job.pid” it is empty.
Yes I have a delayed_job.log file.
I'm thinking that some of those were introduced within in the upgrade you did and if the tasks can't create them then delayed_job won't start.
Also you might run rake with --trace and also watch the logs to see if there's any indication why delayed_job isn't starting, e.g.
RAILS_ENV=production rake --trace bibapp:start
and tail your logs with
tail -f {log-file-path}
Output of the trace and of the log in delayed_jobs.log
[root@bibapp bibapp]# RAILS_ENV=production rake --trace bibapp:start
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top ( required)>': iconv will be deprecated in the future, use String#encode instead.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically lo aded 2.7.6
** Invoke bibapp:start (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute bibapp:start
== Starting all BibApp services: solr, delayed_jobs, passenger
* Starting - Solr.
** Execute solr:start
production Solr started successfully on 8983, pid: 15043.
* Starting - Delayed Job.
script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids start
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6
DELAYED JOB ENV production
ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids:start
* Starting - Passenger.
touch tmp/restart.txt
Finished bibapp:start
From delayed_job.log
2013-06-25T10:46:35-0400: [Worker(delayed_job host:bibapp.lib.fit.edu pid:15085)] Starting job worker
--
[root@bibapp log]# ps 15085
PID TTY STAT TIME COMMAND
I stand corrected. It's dying for some reason.
And you have the daemons gem? bundle show daemons
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9
You might try starting up with RAILS_ENV=development and see if that gives you a clue unless Howard knows better how to turn up the logging on delayed_job.
Is all that is in log: 2013-06-25T12:01:43-0400: [Worker(delayed_job host:bibapp.lib.fit.edu pid:17459)] Starting job worker
[root@bibapp bibapp]# bundle exec rake --trace bibapp:start
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6
WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred until env.rb is called.
To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.
If already in the :test group, be sure you are specifying ':require => false'.
** Invoke bibapp:start (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute bibapp:start
== Starting all BibApp services: solr, delayed_jobs, passenger
* Starting - Solr.
** Execute solr:start
development Solr started successfully on 8982, pid: 17417.
* Starting - Delayed Job.
script/delayed_job -p development --pid-dir=/srv/bibapp/tmp/delayed_job_development_pids start
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6
WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred until env.rb is called.
To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.
If already in the :test group, be sure you are specifying ':require => false'.
DELAYED JOB ENV development
ARGUMENTS: -p:development:--pid-dir=/srv/bibapp/tmp/delayed_job_development_pids:start
Is there a way to start the worker directly? Or a way to get more detail from the logs, as to why it might be dying?
Thanks!
Tom
You can see the script called by rake in your trace below:
script/delayed_job -p development --pid-dir=/srv/bibapp/tmp/delayed_job_development_pids start
You can execute that directly like
ruby script/delayed_job -p development --pid-dir=/srv/bibapp/tmp/delayed_job_development_pids start
You might check delayed_job project documentation for more logging options.
Here is what I get when I run the delayed_job in the foreground, any ideaas? Could the file itself be the problem?
[root@bibapp bibapp]# ./script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/ run
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6
WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred until env.rb is called.
To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.
If already in the :test group, be sure you are specifying ':require => false'.
DELAYED JOB ENV
ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/:run
delayed_job: process with pid 6718 started.
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 424 column 22 (Psych::SyntaxError)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:85:in `payload_object'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:72:in `name'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:251:in `handle_failed_job'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:212:in `block in run'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:212:in `rescue in run'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:202:in `run'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:259:in `block in reserve_and_run_one_job'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:259:in `reserve_and_run_one_job'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:187:in `block in work_off'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:186:in `times'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:186:in `work_off'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:151:in `block (4 levels) in start'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:150:in `block (3 levels) in start'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:149:in `block (2 levels) in start'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:148:in `loop'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:148:in `block in start'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/plugins/clear_locks.rb:7:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `block in add'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:147:in `start'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:104:in `run'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:92:in `block in run_process'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `block in start_proc'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:264:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:264:in `start_proc'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:296:in `start'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/controller.rb:73:in `run'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons.rb:197:in `block in run_proc'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `call'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `catch_exceptions'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons.rb:196:in `run_proc'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:90:in `run_process'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:83:in `block in daemonize'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:81:in `times'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:81:in `daemonize'
from ./script/delayed_job:7:in `<main>'
[root@bibapp bibapp]#
I currently have 251 rows in my delayed jobs, is this normal? When I Truncated the table the delayed_jobs script didn’t die and stayed running, however nothing was processed. ( I have restored the table for the time being)
Is there a way to regenerate the delayed jobs table from the files that have been uploaded already and are waiting to be processed?
Thanks,
Hi Jason,
I must have missed this email.
Here is what I get after updating the gems/bundle.
* Starting - Delayed Job.
script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids start
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6
/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- zip/zip (LoadError)
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:312:in `depend_on'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:225:in `require_dependency'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:443:in `each'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:443:in `block in eager_load!'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:441:in `each'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:441:in `eager_load!'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /srv/bibapp/config/environment.rb:2:in `<top (required)>'
from script/delayed_job:3:in `require'
from script/delayed_job:3:in `<main>'
### ERROR - Starting - Delayed Job.
Thanks for the continued help!
Tom
Never mind fixed the zip problem, by requiring rubygem < 1.0.0
However, I am still getting the previous error about psych
ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/:run
delayed_job: process with pid 25277 started.
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 424 column 22 (Psych::SyntaxError)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
…
Thanks
rubyzip not rubygem
Thanks that got it to start. I use “RAILS_ENV=production bundle exec rake bibapp:start” to start bibapp.
However, the delay jobs still do not seem to run.
[root@bibapp bibapp]# ./script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/ run
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6
WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred until env.rb is called.
To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.
If already in the :test group, be sure you are specifying ':require => false'.
DELAYED JOB ENV
ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/:run
delayed_job: process with pid 27795 started.
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 424 column 22 (Psych::SyntaxError)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:85:in `payload_object'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:72:in `name'
from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:251:in `handle_failed_job'
…
gem list psych shows none
*** LOCAL GEMS ***
Thanks,
Tom
Okay, I got it running by doing rake jobs:clean, is there a way to make it reprocess the submitted files? As 4 of them still talk about having a status of Processing still.
Or did that delete the jobs completely including the uploaded data?