<< | Index | >>
As I was unable to reproduce this error even with the same Ruby version on my VM. Fortunately the export is a read-only operation and therefore I will clone on thinpower another copy of oddb.org and insert a few debug puts to nail down the problem.
Steps are:
ywesee@thinpower mkdir problem_therapeuticus; cd problem_therapeuticus; git clone /var/www/oddb.org
Why do we have to running bin/oddbd jobs on thinpower? apache 12309 2412 1 Jun18 ? 1-04:13:13 /usr/bin/ruby1.9 /var/www/ch.oddb.org/bin/oddbd apache 18234 2400 10 Jul12 ? 5-21:38:43 /usr/bin/ruby -rubygems /var/www/de.oddb.org/bin/oddbd apache 2409 2402 2 Jun11 ? 2-02:13:17 /usr/bin/ruby -rubygems /var/www/de.oddb.org/bin/exportd
Also I think that the oddbd server should really be restartet before we chase the error longer, as I have changed various things in the last three months and I have introduced various API changes between server and client while fixing the Swissmedicinfo.
Added some debug info ext/export/src/csv_exporter.rb. Ran test case. Started a screen on thinpower with the change. Updated my knowledge about screen via http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/ and man page.
The logs shows, that the error occurs in a different thread, as I get a Connect error and don't see any raised UTF-8 exception!
FEHLER: Relation »target_id_oddb_package_name_with_size_company_name_and_ean13« existiert bereits -> "220 mx.google.com ESMTP b45sm22411366eef.4 - gsmtp\r\n" <- "EHLO ywesee.com\r\n" -> "250-mx.google.com at your service, [62.12.131.38]\r\n" <... -> "221 2.0.0 closing connection b45sm22411366eef.4 - gsmtp\r\n" /usr/local/lib/ruby/1.9.1/drb/drb.rb:736:in `rescue in block in open': druby://localhost:10005 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> (DRb::DRbConnError) from /usr/local/lib/ruby/1.9.1/drb/drb.rb:730:in `block in open' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:729:in `each' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:729:in `open' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1191:in `initialize' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1171:in `new' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1171:in `open' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1105:in `with_friend' from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1086:in `method_missing' from /var/www/oddb.org/src/util/exporter.rb:106:in `export_doc_csv' from /var/www/oddb.org/src/util/exporter.rb:58:in `run' from jobs/export_daily:13:in `block in <module:Util>' from /var/www/oddb.org/src/util/job.rb:40:in `call' from /var/www/oddb.org/src/util/job.rb:40:in `run' from jobs/export_daily:12:in `<module:Util>' from jobs/export_daily:11:in `<module:ODDB>' from jobs/export_daily:10:in `<main>' could not find htmlgrid.so, falling back to pure-ruby class process: jobs/export_daily init system init system: 9.183381532 setup drb-delegation
And I think that the error in index_therapeuticus comes only because we have the UTF-8 problem here. I must therefore start the export in a separate screen.
Examinating the process again I see that the CH-exporter does not run on thinpower (it starts without any problem on my VM)
sudo -u apache /var/www/oddb.org/ext/export/bin/exportd /var/www/oddb.org/src/util/persistence.rb:11: undefined method `key' for class `Hash' (NameError) from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/www/oddb.org/src/model/activeagent.rb:6 from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/www/oddb.org/src/models.rb:8 from /var/www/oddb.org/src/models.rb:7:in `foreach' from /var/www/oddb.org/src/models.rb:7 from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/www/oddb.org/ext/export/src/odba_exporter.rb:11 from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/www/oddb.org/ext/export/bin/exportd:10 netstat -lptu | grep 10005 tcp 0 0 localhost:10005 *:* LISTEN 7612/Oddb (Export) ps -ef | grep 2353 root 2353 2345 0 Jun11 ? 00:00:00 supervise ch.oddb-exporter apache 7612 2353 2 16:27 ? 00:01:23 Oddb (Export)
I am a little confused, as I find exactly one process 7612 which is listening on port 10005 already. But a closer look at it shows that in ext/export/bin/exportd (line 15) the $0 is manipulated. $0 = "Oddb (Export)"
. I don't think that this is a good idea, therefore I commented this line out. Now I am able to launch and capture the output of the exportd sudo -u apache /usr/local/bin/ruby193 /var/www/oddb.org/ext/export/bin/exportd 2>&1 | tee exportd.log
. Running the daily_export again.
Curiosly the exportd terminated without any hint about why. See Attach:exportd.txt and Attach:export_daily.txt. The export_daily reports (as a consequence thereof) that the reports oddb.csv and oddb2.csv failed because the could not attach. Maybe some failure are masked because usually the daemontools restart the exportd. For the time being I reactived the ch.oddb-exporter.
We only get this error when the complete BAG update run. Call stack is
Report - Error: Swissindex Pharma - 09/2013 Plugin: ODDB::SwissindexPharmaPlugin Error: ArgumentError Message: wrong number of arguments (2 for 1) Backtrace: /var/www/oddb.org/src/plugin/plugin.rb:40:in `initialize' /var/www/oddb.org/src/util/updater.rb:508:in `new' /var/www/oddb.org/src/util/updater.rb:508:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:488:in `call' /var/www/oddb.org/src/util/updater.rb:488:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:506:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:423:in `update_package_trade_status_by_swissindex' /var/www/oddb.org/src/util/updater.rb:260:in `update_bsv_followers' /var/www/oddb.org/src/util/updater.rb:202:in `run' /var/www/oddb.org/jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `call' /var/www/oddb.org/src/util/job.rb:40:in `run' /var/www/oddb.org/jobs/import_daily:12:in `<module:Util>' /var/www/oddb.org/jobs/import_daily:11:in `<module:ODDB>' /var/www/oddb.org/jobs/import_daily:10:in `<main>'
Reason is that the SessionStub in plugin/plugin.rb does not accept an optional option
parameter for new. Fix is simple. I will apply it to my VM and show whether next import_daily is okay.
Import pass without problems. Pushed commit Add optional parameter for compatibility