< Niklaus.20180109-ydim-html | Index | 2017 >>
I want to release a new version of ydim. Running bundle exec rake release fails with object 91546d243bfad281b8f21ccab2f0558e34ffccd4: missingSpaceBeforeDate: invalid author/committer line - missing space before date
Using a new clone fixed this probem. Waiting that Zeno gives me the permission to push the new gem. Done.
On thinpower ydim 1.0.1 was installed. Updating to 1.0.6 by calling as super user /usr/local/bin/gem231 install ydim
.
Now I see in the /service/ydim/log/main/current
lines like
400000005a53418a0d2cd35c FEHLER: Syntaxfehler bei �NOT� @400000005a53418a0d2cd35c LINE 1: CREATE INDEX IF NOT EXISTS target_id_ydim_invoice_un... @
Looking whether upgrading to Ruby 2.4.0 fixes the problem. But I see the following error when running /usr/local/bin/gem-240 install ydim
Installing ri documentation for transaction-simple-1.4.0.2 Parsing documentation for ypdf-writer-1.3.3 unable to convert "\x93" from ASCII-8BIT to UTF-8 for lib/pdf/writer/object/image.rb, skipping unable to convert "\x93" from ASCII-8BIT to UTF-8 for lib/pdf/writer/object/page.rb, skipping
Changed the command in /service/ydim/run
to exec sudo -u apache /usr/local/bin/ruby-240 /var/www/oddb.org/vendor/ruby/2.4.0/bin/ydimd
. Now ydimd starts fine. https://ydim.ywesee.com/de/ydim shows the login, but I forgot the username/password to login.
Release a new version of the ydim-html gem 1.0.3. Now starting the service always fails with
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:745:in `rescue in block in open': druby://192.168.0.36:12375 - #<Errno::ECONNREFUSED: Connection refused - connect(2) for "192.168.0.36" port 12375> (DRb::DRbConnError)
Removed some files from /var/www/ydim.ywesee.com. Added a correct .git/config which points to https://github.com/zdavatz/ydim-html.git. Now bundle-240 install works.
Bundle exec work now for ydim and ydim-html. But I still get an error
sudo -u apache /usr/local/bin/bundle-240 exec /usr/local/bin/ruby-240 bin/ydim-htmld config=/var/www/ydim.ywesee.com/etc/ydim-htmld.yml `/root` is not writable. Bundler will use `/tmp/bundler/home/ywesee' as your home directory temporarily. /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `initialize' may cause serious problems /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `object_id' may cause serious problems /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/definition-context.rb:36: warning: undefining `__send__' may cause serious problems /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:16: warning: already initialized constant HtmlGrid::Component::HTTP_HEADERS /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:38: warning: previous definition of HTTP_HEADERS was here /var/www/ydim.ywesee.com/lib/ydim/html/view/htmlgrid.rb:81: warning: already initialized constant HtmlGrid::List::STRIPED_BG /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/list.rb:46: warning: previous definition of STRIPED_BG was here (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/rrba-1.0.0/lib/rrba/user.rb:17:in `email=': Invalid Email (RuntimeError) from (druby://localhost:12375) /home/ywesee/git/ydim/lib/ydim/server.rb:29:in `block in initialize' from (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:42:in `block in call' from (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40:in `synchronize' from (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/lifecycle/singleton.rb:40:in `call' from (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/service-point.rb:122:in `instance' from (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/container.rb:308:in `get' from (druby://localhost:12375) /home/ywesee/git/ydim/vendor/ruby/2.4.0/gems/needle-1.3.0/lib/needle/container.rb:380:in `method_missing' from (druby://localhost:12375) /home/ywesee/git/ydim/lib/ydim/server.rb:80:in `login' from (druby://localhost:12375) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/invokemethod.rb:15:in `perform_with_block' from (druby://localhost:12375) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1582:in `perform' from (druby://localhost:12375) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1668:in `block (2 levels) in main_loop' from (druby://localhost:12375) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `loop' from (druby://localhost:12375) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `block in main_loop' from /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/ydim-1.0.6/lib/ydim/client.rb:16:in `login' from /var/www/ydim.ywesee.com/lib/ydim/html/util/server.rb:27:in `method_missing' from /var/www/ydim.ywesee.com/vendor/ruby/2.4.0/gems/sbsm-1.2.7/lib/sbsm/drbserver.rb:137:in `block in run_cleaner'
Checked the md5sum in /etc/ydim/ydim-htmld.yml and /var/www/ydim.ywesee.com/etc/ydim-htmld.yml. Both the same and correct.
Changed ydim.gemspec and ydim-html.gemspec locally on thinpower to used ybdb-pg and ydbi in version 0.5.3 to see whether we can avoid the the error postgresql error. This did not help.
In /service/ydim/log/main/current
we see many errors now E, [2018-01-08T15:34:32.662884 #7628] ERROR -- unknown user: RuntimeError - Invalid Email
, as the ydim-html can connect to ydim, but is not using a correct user. Is this a problem with yus?
Checked the example_site yml files and compared them. Did not find any issue.
Debugging in /var/www/ydim.ywesee.com/lib/ydim/html/util/server.rb (around line 20 where the server startes) gives me
[1] pry(YDIM::Html)> ydim_server => #<DRb::DRbObject:0x007f482d617458 @ref=nil, @uri="druby://localhost:12375"> [3] pry(#<YDIM::Html::Util::Server>)> Html.config.root_key => "/etc/ydpm/root_dsa" [4] pry(#<YDIM::Html::Util::Server>)> Html.config => #<RCLConf::RCLConf:0x007f482cb0af10 @argv={"config"=>"/etc/ydim/ydim-htmld.yml", nil=>nil}, @defaults= {"client_url"=>"druby://localhost:0", "config"=>["etc/ydim-htmld.yml", "/root/.ydim/ydim-htmld.yml", "/etc/ydim/ydim-htmld.yml"], "currency"=>"CHF", "email"=>nil, "html_url"=>"druby://localhost:12376", "http_server"=>"http://localhost", "log_file"=>#<IO:<STDOUT>>, "log_level"=>"DEBUG", "md5_pass"=>nil, "proxy_url"=>"druby://localhost:0", "server_url"=>"druby://localhost:12375", "root_key"=>nil, "user"=>nil, "ydim_dir"=>"/root/.ydim"}, @loaded={"server_url"=>"druby://localhost:12375", "email"=>"zdavatz@xxx", "md5_pass"=>"7219c5fc20d4862fa9ef7fe9beb0788d", "root_key"=>"/etc/ydpm/root_dsa"}, @runtime={}> Html.config.email => "zdavatz@xxx" [9] pry(#<YDIM::Html::Util::Server>)> Html.config.md5_pass => "some good valud" [10] pry(#<YDIM::Html::Util::Server>)> Html.config.root_key => "/etc/ydpm/root_dsa"
A few steps (and debugging inside ydim. I see the at /home/ywesee/git/ydim/lib/ydim/server.rb @ line 81
@serv.auth_server RuntimeError: Invalid Email
And the auth_server was a problem when porting to rack!
Adding the lines config.load(config.config)
after line 22 of bin/ydimd fixed the problem. The config yaml file was not loaded early enough.
Must check tomorrow whether I can use ydbi 0.5.4 (postgresql) instead of 0.5.3.
I am concerned, that upgrading to postgres 10 for oddb.org might have the following side effects:
Also I am asking myself whether it is a small job (<3h) to get rid of the ydbi and ydbd-pg gems and replace them by sequel and (for increased speed) sequel_pg. ydbi and ydbi-pg are a pain in the ass to maintain and no longer supported upstream and contain some ugly hacks.
Zeno is ready to take this risk. Therefore I test again using only postgresql 10.1 on oddb-ci2.
Switching to postgresql-10.1 is done with the following commands
sudo svc -d /service/* sudo /etc/init.d/postgresql-8.4 stop sudo /etc/init.d/postgresql-10.1 start sudo svc -u /service/* # wait some seconds and testing we see that the following services are up sudo svstat /service/*
Up are:
Missing are the services
Starting the import_daily.job and running the watir spec tests again. Manually tested that searching for migel articles,hospitals and doctors work.
Running the watir tests shows the following failures
rspec ./spec/address_correction_spec.rb[1:1] # ch.oddb.org should be possible to correct an address for a company rspec ./spec/address_correction_spec.rb[1:2] # ch.oddb.org should be possible to correct an address for a doctor rspec ./spec/address_correction_spec.rb[1:3] # ch.oddb.org should be possible to correct an address for a hospital rspec ./spec/address_correction_spec.rb[1:4] # ch.oddb.org should be possible to correct an address for a pharmacy rspec ./spec/evidentia_spec.rb:213 # ch.oddb.org should work all the time for Cellcept when evidenita LNF is not enabled rspec ./spec/home_2_list_spec.rb:82 # ch.oddb.org admin in home_companies we should see all companies when logged in as admin rspec ./spec/home_2_list_spec.rb:87 # ch.oddb.org admin in home_companies we should have the link active_companies if logged in as admin rspec ./spec/paypal_spec.rb:113 # ch.oddb.org should show the poweruser dialog with the top left logo rspec ./spec/searchbar_spec.rb:325 # ch.oddb.org should set best_result when searching Rivoleve via search_type rspec ./spec/snapback_spec.rb:182 # ch.oddb.org snapback should work following a fachinfo rspec ./spec/snapback_spec.rb:194 # ch.oddb.org snapback should work following a search via IKSNR rspec ./spec/welcome_spec.rb[1:1] # ch.oddb.org should be possible to see the sponsored log-in in zone analysis rspec ./spec/welcome_spec.rb[1:2] # ch.oddb.org should be possible to see the sponsored log-in in zone pharmacies rspec ./spec/welcome_spec.rb[1:3] # ch.oddb.org should be possible to see the sponsored log-in in zone doctors rspec ./spec/welcome_spec.rb[1:4] # ch.oddb.org should be possible to see the sponsored log-in in zone interactions rspec ./spec/welcome_spec.rb[1:5] # ch.oddb.org should be possible to see the sponsored log-in in zone migel rspec ./spec/welcome_spec.rb[1:6] # ch.oddb.org should be possible to see the sponsored log-in in zone user rspec ./spec/welcome_spec.rb[1:7] # ch.oddb.org should be possible to see the sponsored log-in in zone hospitals rspec ./spec/welcome_spec.rb[1:8] # ch.oddb.org should be possible to see the sponsored log-in in zone companies
Running spec/welcome_spec.rb does not show any problems. This must be a problem inside the watir tests, which I will not solve today.
Correcting an address is not possible. This must be investigated. Backtrace of the errors is
NoMethodError at /de/gcc undefined method `lines' for #<Hash:0x007f7538285938> Ruby /var/www/oddb.org/src/model/address.rb: in to_diffable, line 150 Web POST oddb-ci2.dyndns.org/de/gcc Jump to: GET POST Cookies ENV Traceback (innermost first) /var/www/oddb.org/src/model/address.rb: in to_diffable result = (element.lines + /var/www/oddb.org/src/model/address.rb: in diff Diffy::Diff.new(to_diffable(self), to_diffable(other), options).to_s /var/www/oddb.org/src/util/persistence.rb: in issue_update diff = obj.diff(values, hook) /var/www/oddb.org/src/util/oddbapp.rb: in block in update item = pointer.issue_update(self, values, origin) /var/www/oddb.org/src/util/failsafe.rb: in failsafe
Running import_daily failed, too. The error message contains
Plugin: ODDB::SwissmedicPlugin Error: SystemExit Message: SystemExit Backtrace: /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/document.rb:216:in `decorate' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:190:in `[]' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:190:in `block in each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:189:in `upto' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:189:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:144:in `parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:156:in `block in parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:190:in `block in each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:189:in `upto' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:189:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:144:in `parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:156:in `block in parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:190:in `block in each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:189:in `upto' /var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:189:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:144:in `parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/worksheet.rb:734:in `parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:427:in `block in parse_file' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyzip-1.2.1/lib/zip/entry.rb:501:in `get_input_stream' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/ooxml_object.rb:427:in `parse_file' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:90:in `block in load_related_files' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:75:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:75:in `load_related_files' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:172:in `load_relationships' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:91:in `block in load_related_files' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:75:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:75:in `load_related_files' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/relationships.rb:172:in `load_relationships' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/root.rb:68:in `block in parse_file' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyzip-1.2.1/lib/zip/file.rb:101:in `open' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/objects/root.rb:64:in `parse_file' /var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/parser.rb:4:in `parse' /var/www/oddb.org/vendor/ruby/2.4.0/gems/swissmedic-diff-0.2.2/lib/compatibility.rb:10:in `open' /var/www/oddb.org/vendor/ruby/2.4.0/gems/swissmedic-diff-0.2.2/lib/swissmedic-diff.rb:148:in `diff' /var/www/oddb.org/src/plugin/swissmedic.rb:319:in `update' /var/www/oddb.org/src/util/updater.rb:427:in `block in update_swissmedic' /var/www/oddb.org/src/util/updater.rb:532:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:425:in `update_swissmedic' /var/www/oddb.org/src/util/updater.rb:216:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `run'