view · edit · sidebar · attach · print · history

< Niklaus.20170808-sl-update-error | Index | Niklaus.20170726-rapflag >>

20170807-sl-update-error

Summary

  • Error in SL-Update
  • Sandoz XMLconv error when article not found
  • Add link on oddb.org for drugshortage
  • Keep in Mind

Commits

Index

Error in SL-Update

Got the following error

Plugin: ODDB::BsvXmlPlugin

Error: ODDB::Persistence::InvalidPathError
Message: :!bsv_sl!log,2017-08-01. -> undefined Method ODDB::App::log_group(bsv_sl)
Backtrace:
/var/www/oddb.org/src/util/persistence.rb:314:in `block in resolve'
/var/www/oddb.org/src/util/persistence.rb:297:in `each'
/var/www/oddb.org/src/util/persistence.rb:297:in `resolve'
/var/www/oddb.org/src/util/updater.rb:495:in `log_notify_bsv'
/var/www/oddb.org/src/util/updater.rb:304:in `block in update_bsv'
/var/www/oddb.org/src/util/updater.rb:544:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:297:in `update_bsv'
/var/www/oddb.org/src/util/updater.rb:221:in `run'
jobs/import_daily:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'

Added a pry statement in log_notify_bsv and started running sudo -u apache bundle exec /usr/local/bin/ruby-240 jobs/import_bsv on oddb-ci2. It took over 2.5 hours before I hit the breakpoint.

Found the problem. The log for the BSV is created differently in updater.rb. Corrected problem locally. Restarting import.

My first try was not good enough. Trying second solution and restarting import at 15:54.

Sandoz XMLconv error when article not found

The Pharmacode 5552566 is not present in the Artikel.txt.

Found the following info on fastpower in the file /var/www/sandoz.xmlconv.bbmb.ch/log/2017/08/02/app.log

I, [2017-08-02T11:40:18.614351 #28040]  INFO -- : session.rb:115:in `initialize' initialize th #<SBSM::TransHandler:0x007fa0f9c6bd48> validator XmlConv::Util::Validator app XmlConvApp multi_threaded false
D, [2017-08-02T11:40:18.614531 #28040] DEBUG -- : session.rb:136:in `initialize' session initialized #<XmlConv::Util::Session:0x007fa0d3e90360> with @cgi #<CGI:0x007fa0d3e86838> multi_threaded false app 70164672932060 and user SBSM::UnknownUser @unknown_user XmlConv::Util::KnownUser
D, [2017-08-02T11:40:18.614607 #28040] DEBUG -- : app.rb:126:in `call' starting session_id 22b480d81a420e41066f80f2d13  session XmlConv::Util::Session /pharmatic: cookies  are {} @cgi NilClass
D, [2017-08-02T11:40:18.614720 #28040] DEBUG -- : session.rb:231:in `block in process_rack' @post_content is <?xml version="1.0" encoding="iso-8859-1"?><customerOrder xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://www.e-galexis.com/schemas/ http://www.e-galexis.com/schemas/POS/customerOrder/customerOrder.xsd" language="fr" roundUpForCondition="false" backLogDesired="false" productDescriptionDesired="true" communicationSoftwareId="ERGO" xmlns="http://www.e-galexis.com/schemas/"><client number="4100602575" password="martiSandoz !7!Gs16E" /><orderHeader referenceNumber="30179" /><orderLines><productOrderLine orderQuantity="5"><pharmaCode id="5552566" /></productOrderLine></orderLines></customerOrder>
D, [2017-08-02T11:40:18.615042 #28040] DEBUG -- : login.rb:16:in `initialize' XmlConv::State::Login POST params were {}
D, [2017-08-02T11:40:18.615097 #28040] DEBUG -- : login.rb:17:in `initialize'  xml_src ASCII-8BIT now <?xml version="1.0" encoding="iso-8859-1"?><customerOrder xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://www.e-galexis.com/schemas/ http://www.e-galexis.com/schemas/POS/customerOrder/customerOrder.xsd" language="fr" roundUpForCondition="false" backLogDesired="false" productDescriptionDesired="true" communicationSoftwareId="ERGO" xmlns="http://www.e-galexis.com/schemas/"><client number="4100602575" password="martiSandoz !7!Gs16E" /><orderHeader referenceNumber="30179" /><orderLines><productOrderLine orderQuantity="5"><pharmaCode id="5552566" /></productOrderLine></orderLines></customerOrder>
I, [2017-08-02T11:40:18.615231 #28040]  INFO -- : application.rb:44:in `_execute' Starting_transaction 34529
I, [2017-08-02T11:40:18.618388 #28040]  INFO -- : transaction.rb:38:in `execute' _execute REXML::Document => ,4100602575,02082017,,5552566,,,5,,30179,""
 #<XmlConv::Util::DestinationDir:0x007fa0d3e4fb80 @path="/var/www/sandoz.xmlconv.bbmb.ch/var/output", @status=:open>
I, [2017-08-02T11:40:18.624376 #28040]  INFO -- : transaction.rb:90:in `block in postprocess' Postprocess calling for klass Soap ["update_partner"]
I, [2017-08-02T11:40:18.624460 #28040]  INFO -- : transaction.rb:93:in `block in postprocess' Postprocess returned 4100602575 for klass Soap
I, [2017-08-02T11:40:18.624577 #28040]  INFO -- : transaction.rb:90:in `block in postprocess' Postprocess calling for klass Bbmb2 ["inject", "druby://localhost:12004", "customer_id"]
I, [2017-08-02T11:40:18.633649 #28040]  INFO -- : application.rb:51:in `rescue in _execute' error_transaction 34529 error Bestellung OK, Eintrag in BBMB fehlgeschlagen:
RuntimeError
can't commit empty order

(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/model/order.rb:100:in `commit!'
(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/persistence/odba/model/order.rb:44:in `commit!'
(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/model/customer.rb:90:in `block in inject_order'
(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/model/customer.rb:88:in `synchronize'
(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/model/customer.rb:88:in `inject_order'
(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/persistence/odba/model/customer.rb:36:in `inject_order'
(druby://localhost:12004) /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2/lib/bbmb/util/server.rb:79:in `inject_order'
(druby://localhost:12004) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1624:in `perform_without_block'
(druby://localhost:12004) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1584:in `perform'
(druby://localhost:12004) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1668:in `block (2 levels) in main_loop'
(druby://localhost:12004) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `loop'
(druby://localhost:12004) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `block in main_loop'
/var/www/sandoz.xmlconv.bbmb.ch/lib/postprocess/bbmb2.rb:38:in `block in inject'
/var/www/sandoz.xmlconv.bbmb.ch/lib/postprocess/bbmb2.rb:16:in `each'
/var/www/sandoz.xmlconv.bbmb.ch/lib/postprocess/bbmb2.rb:16:in `each_with_index'
/var/www/sandoz.xmlconv.bbmb.ch/lib/postprocess/bbmb2.rb:16:in `inject'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/util/transaction.rb:92:in `block in postprocess'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/util/transaction.rb:88:in `each'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/util/transaction.rb:88:in `postprocess'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/util/application.rb:46:in `_execute'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/util/application.rb:36:in `execute'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/util/application.rb:148:in `execute_with_response'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/xmlconv-1.1.7/lib/xmlconv/state/login.rb:30:in `initialize'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:417:in `new'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:417:in `logout'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:253:in `block in process_rack'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `synchronize'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `process_rack'
/var/www/sandoz.xmlconv.bbmb.ch/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/app.rb:127:in `call'
ospital: 4100602575

order:~
{:pcode=>"5552566", :quantity=>5}

info:~
reference => 30179

The error stems from the fact that we reference still /var/www/sandoz.bbmb.ch/vendor/ruby/2.4.0/gems/bbmb-2.3.2. Updating to bbmb 2.3.3 should fix the problem with missing pharmacode.

We must upgrade and restart /var/www/sandoz.bbmb.ch to use BBMB 2.3.3! The Gemfile.lock on /var/www/sandoz.bbmb.ch is modified locally. Pulled the newest version, removed the versions of BBMB and called bundle-240 install. Restarted /service/sandoz.bbmb.ch.

Looking at http://sandoz.bbmb.ch/de/bbmb/orders/customer_id/4100602575 confirmed, that the order was not processed.

Add link on oddb.org for drugshortage

We must add a link to the drugshortag in the column "Kategorie". It should be a red light (HTLM bulls, not pictures) when the product is not available, else green.

The detailed status info should be available via Ajax-MouseOver. Clicking on the info should open a new tab.

Verifying that we indeed imported the drugshortage state via bin/admin

ch.oddb> package_by_ean13('7680004170027')
-> #<ODDB::Package:0x007f2716e5f4b8>
ch.oddb> package_by_ean13('7680004170027').class
-> ODDB::Package
ch.oddb> package_by_ean13('7680004170027').name_base
-> Tollwut Impfstoff Mérieux
ch.oddb> package_by_ean13('7680004170027').shortage_state
-> 1 aktuell keine Lieferungen

Analyse errors found for oddb.org

http://www.nachahmer.ch/en/gcc/feedbacks/reg/56235/seq/03/pack/022 or http://oddb-ci2.dyndns.org/en/gcc/feedbacks/reg/56235/seq/03/pack/022 throws

==> /var/www/oddb.org/log/2017/08/07/user_log <==
NoMethodError: undefined method `[]' for nil:NilClass
        /var/www/oddb.org/src/state/feedbacks.rb:34:in `feedback_list'
        /var/www/oddb.org/src/view/drugs/feedbacks.rb:102:in `feedback_list'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:83:in `create'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:284:in `compose_component'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:213:in `block in compose'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `each'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `compose'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:72:in `init'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize'
        /var/www/oddb.org/src/view/publictemplate.rb:71:in `new'
        /var/www/oddb.org/src/view/publictemplate.rb:71:in `content'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:83:in `create'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:284:in `compose_component'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:213:in `block in compose'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `each'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `compose'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:72:in `init'
        /var/www/oddb.org/src/view/publictemplate.rb:68:in `init'
        /var/www/oddb.org/src/view/resulttemplate.rb:29:in `init'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:240:in `new'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:240:in `view'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:173:in `to_html'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:548:in `to_html'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:280:in `block in process_rack'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `synchronize'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `process_rack'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/app.rb:127:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/chunked.rb:54:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
        /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/handler/webrick.rb:86:in `service'
        /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:140:in `service'
        /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:96:in `run'
        /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'
        ODDB::View::Drugs::FeedbacksComposite::COMPONENTS[[1, 2]] in create(feedback_list)
        ODDB::View::Drugs::Feedbacks::COMPONENTS[[0, 2]] in create(content)
192.168.0.75 - - [07/Aug/2017 14:49:11] "GET http://oddb-ci2.dyndns.org/en/gcc/feedbacks/reg/56235/seq/03/pack/022 HTTP/1.1" 500 131133 0.1814  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.

Here the fix is easy. Also added a unit test for it.

Next error is

W, [2017-08-07T03:08:45.581544 #1567]  WARN -- : session_store.rb:115:in `clean' Cleaned 0 sessions. Took 0 seconds
NameError: uninitialized constant ODDB::State::Interactions::Basket
Did you mean?  Base64
  /var/www/oddb.org/src/state/global.rb:460:in `interaction_basket'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:197:in `_trigger'
  /var/www/oddb.org/src/state/global.rb:1040:in `_trigger'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:186:in `trigger'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:257:in `block in process_rack'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `synchronize'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `process_rack'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/app.rb:127:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/chunked.rb:54:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/handler/webrick.rb:86:in `service'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:140:in `service'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:96:in `run'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'
216.244.66.201 - - [07/Aug/2017 03:08:51] "GET http://ch.oddb.org/fr/gcc/fachinfo/reg/57509/chapter/contra_indications/currency/EUR HTTP/1.1" 200 16616 6.8207  "Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.

This could not be reproduced locally. But probably there are situations where the required 'basket.rb' was not loaded. Trying to reproduce it via test case.

But it can be reproduced when calling http://oddb-ci2.dyndns.org/en/gcc/interaction_basket/substance_ids/5893+4020+6129+1755.

Fix is easy, but I must look whether there is not much more to be removed, as the interaction_basket is only a session method and no longer a state.

Next problem is

79.211.79.248 - - [07/Aug/2017 08:50:52] "GET http://epilepsie-therapie.ch/de/desitin/show/reg/48143/seq/01/pack/016 HTTP/1.1" 200 17634 0.6452  "Mozilla/5.0 (compatible; MJ12bot/v1.4.7; http://mj12bot.com/)"
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/www/oddb.org/data/rss/nd/price_rise.rss
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/app.rb:133:in `size'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/app.rb:133:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/chunked.rb:54:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/handler/webrick.rb:86:in `service'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:140:in `service'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:96:in `run'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'
82.82.224.194 - - [07/Aug/2017 08:50:52] "GET http://ch.oddb.org/nd/gcc/rss/channel/price_rise.rss HTTP/1.1" 500 61192 0.0291  "Mozilla/5.0 (compatible; MJ12bot/v1.4.7; http://mj12bot.com/)"

This mean, that somebody just tried to pass nd instead of on of the 3 supported languages value en, fr, de.

But this is an error in the SBSM gem, which should return a 404 HTML error if it cannot find the file. This should be easy to fix.

Next error is

178.154.171.28 - - [07/Aug/2017 14:46:38] "GET http://answer.oddb.org/en/gcc/price_history/reg/47543/seq/01/pack/045/currency/EUR HTTP/1.1" 200 16865 0.0357  "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
TypeError: can't convert nil into Float
  /var/www/oddb.org/src/view/ajax/ddd_chart.rb:260:in `sprintf'                                                                                                                                                                                          /var/www/oddb.org/src/view/ajax/ddd_chart.rb:260:in `block in init'
  /var/www/oddb.org/src/view/ajax/ddd_chart.rb:252:in `each'
  /var/www/oddb.org/src/view/ajax/ddd_chart.rb:252:in `each_with_index'
  /var/www/oddb.org/src/view/ajax/ddd_chart.rb:252:in `init'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize'                                                                                                                                                  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:240:in `new'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:240:in `view'                                                                                                                                                                    /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/state.rb:173:in `to_html'                                                                                                                                                                 /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:548:in `to_html'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:280:in `block in process_rack'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `synchronize'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/session.rb:209:in `process_rack'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.6/lib/sbsm/app.rb:127:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:37:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/show_exceptions.rb:23:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/chunked.rb:54:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/content_length.rb:15:in `call'
  /var/www/oddb.org/vendor/ruby/2.4.0/gems/rack-2.0.3/lib/rack/handler/webrick.rb:86:in `service'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:140:in `service'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:96:in `run'
  /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'
34.228.219.118 - - [07/Aug/2017 14:46:38] "GET http://generika.cc/dt/generika/search/search_query/Duodart HTTP/1.1" 200 38932 0.0967  "Mozilla/5.0 (compatible; proximic; +http://www.proximic.com/info/spider.php)"

It was easy to create a test case for this failure. Fixed also another skipped test in test/test_view/ajax/ddd_chart.rb.

view · edit · sidebar · attach · print · history
Page last modified on August 07, 2017, at 04:52 PM