view · edit · sidebar · attach · print · history

Index>

20160713-sandoz-on-fastpower

Summary

  • Migrate sandoz.bbmb.ch on fastpower to Ruby 2.3.1
  • Test polling e-mails and handling them for vetoquinol
  • Keep in Mind

Commits

Index

Migrate sandoz.bbmb.ch on fastpower to Ruby 2.3.1

sandoz.bbmb.ch and sandox.xmlconv.bbmb.ch on fastpower should run on Ruby 2.3.1

Tested locally that changing /service/sandoz.bbmb.ch-yus to Ruby 2.3.1 works. The run script calls now sudo -u bbmb /usr/local/bin/ruby231 /usr/local/bin/yusd config=/var/www/sandoz.bbmb.ch/etc/yus.yml. Migrated using sudo -u bbmb /usr/local/bin/ruby231 ./yus_migrate_to_utf_8 config=/var/www/sandoz.bbmb.ch/etc/yus.yml

Was able to log in to sandoz.bbmb.ngiger.ch and http://sandoz.xmlconv.bbmb.ngiger.ch/ without a problem.

Removed doc and lib directories from /var/www/sandoz.xmlconv.bbmb.ch and /var/www/sandoz.bbmb.ch and did a git checkout there.

Pushed a commit that lay around here for a few days Renamed flavor sandoz -> bbmb

Preparing to install sandoz(.xmlconv).bbmb.ch on fastpower

  • sudo /usr/local/bin/gem231 install sandoz.bbmb.ch xmlconv

Prepared the following sevice/run scripts:

  • /service/sandoz.bbmb.ch-yus/run
  • /service/sandoz.bbmb.ch/run
  • /service/sandoz.xmlconv.bbmb.ch/run
  • cd /var/www/sandoz.bbmb.ch && git remote add https://github.com/zdavatz/sandoz.bbmb.ch.git
  • cd /var/www/sandoz.bbmb.ch && git pull
  • cd /var/www/sandoz.xmlconv.bbmb.ch && git remote add https://github.com/zdavatz/sandoz.xmlconv.bbmb.ch.git
  • cd /var/www/sandoz.xmlconv.bbmb.ch && git pull
  • activate new service/run
  • sudo svc -d /service/sandoz*
  • cd /usr/local/share/src/yus && git pull
  • cd /usr/local/share/src/yus && sudo -u bbmb /usr/local/bin/ruby231 ./yus_migrate_to_utf_8 config=/var/www/sandoz.bbmb.ch/etc/yus.yml
  • sudo -u bbmb /usr/local/bin/ruby231 /var/www/sandoz.bbmb.ch/bbmb_migrate_to_utf_8 config=/var/www/sandoz.bbmb.ch/etc/config.yml
  • sudo -u bbmb /usr/local/bin/ruby231 /usr/local/bin/migrate_xmlconv_to_utf_8 /var/www/sandoz.xmlconv.bbmb.ch/etc/xmlconv.yml
  • Remove no longer use RubyAddPath from /etc/apache2/vhosts.d/sandoz.bbmb.ch.conf?

Now we see the login for sandoz and sandoz.xml but cannot log in.

Also we find in the /var/www/sandoz.xmlconv.bbmb.ch/log/error_log entries like

[Wed Jul 13 14:13:09 2016] [error] uninitialized constant #<Module:0x7f33396e3f48>::XmlConv
[Wed Jul 13 14:13:09 2016] [error] /var/www/sandoz.xmlconv.bbmb.ch/doc/sunstore.rbx:28\n/usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-debug.rb:54:in `load'\n/usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-debug.rb:54:in `handler'
[Wed Jul 13 14:15:02 2016] [notice] Received Request POST
[Wed Jul 13 14:15:02 2016] [notice] from 81.62.27.192
[Wed Jul 13 14:15:02 2016] [notice] content-length: 2080
[Wed Jul 13 14:15:02 2016] [error] NameError
[Wed Jul 13 14:15:02 2016] [error] uninitialized constant #<Module:0x7f3339410938>::XmlConv

On oddb-ci2 I have the following line ins /etc/apache2/vhosts.d/sandoz.xmlconv.bbmb.ch.conf

  RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/xmlconv-1.0.7/lib
  RubyRequire 'xmlconv/util/destination'
  RubyRequire 'xmlconv/util/transaction'

Installing xmlconv für Ruby 1.8.6 on fastpower fails

sudo /usr/local/bin/ruby186/bin/gem install xmlconv
Password: 
Fetching: ydbi-0.5.3.gem (100%)
Fetching: pg-0.17.0.gem (100%)
ERROR:  Error installing xmlconv:
        pg requires Ruby version >= 1.8.7.

Specicified the local installation /usr/local/share/src/xmlconv in the RubyAddPath directive.

Used the HttpFox of firefox to compare the login steps of sandoz.bbmb.ch on fastpower and oddb-ci2. The rows look similar

00:00:02.106	0.092	410	(2345)	GET	(Cache)	text/html	http://sandoz.bbmb.ngiger.ch/de/bbmb/logout/
00:00:02.188	0.012	532	(4861)	GET	304	text/css	http://sandoz.bbmb.ngiger.ch/resources/bbmb/bbmb.css
00:00:02.204	4.307	517	(13111)	GET	(Aborted)	image/png (NS_BINDING_ABORTED)	http://sandoz.bbmb.ngiger.ch/resources/bbmb/logo.png
00:00:06.511	0.395	598	(11513)	POST	(Cache)	text/html	http://sandoz.bbmb.ngiger.ch/de/bbmb
00:00:06.896	0.014	380	(4732)	GET	(Cache)	text/css	http://sandoz.bbmb.ngiger.ch/resources/bbmb/bbmb.css
00:00:06.910	19.619	365	(12982)	GET	(Aborted)	image/png (NS_BINDING_ABORTED)	http://sandoz.bbmb.ngiger.ch/resources/bbmb/logo.png
00:00:26.530	0.142	348	(2282)	GET	(Cache)	text/html	http://sandoz.bbmb.ch/
00:00:26.650	1.364	477	(4861)	GET	304	text/css	http://sandoz.bbmb.ch/resources/bbmb/bbmb.css
00:00:26.675	6.233	462	(13111)	GET	(Aborted)	image/png (NS_BINDING_ABORTED)	http://sandoz.bbmb.ch/resources/bbmb/logo.png
00:00:32.909	0.105	575	(2297)	POST	(Cache)	text/html	http://sandoz.bbmb.ch/de/bbmb
00:00:32.994	0.025	366	(4732)	GET	(Cache)	text/css	http://sandoz.bbmb.ch/resources/bbmb/bbmb.css
00:00:33.020	*	351/351	*	GET	*	*	http://sandoz.bbmb.ch/resources/bbmb/logo.png

The two POST statement contain the same Header, Cookies, QueryString, Post Daten (ignoring session ID and URL related fields). But on fastpower the Content returns the same Login HTML, whereas on oddb-ci2 the new page (with the list of the customer) is returned.

Putting some $stderr.puts statements into /var/www/sandoz.bbmb.ch/doc/index.rbx produced output in /var/log/apache2/error_log that showed, that calling SBSM::Request.new(ENV["DRB_SERVER"]).process returned nil. I get the same return value when I add the same debug statement on oddb-ci2, where the login succeeds. Why?

Test polling e-mails and handling them for vetoquinol

This is similar to the poll problem of sandoz.xmlconv. First must make the unit tests pass.

Pushed commit Fixed CSV-Importer and running non selenium tests

Looking on thinpower at the file /var/www/vetoquinol.bbmb.ch/test.rb. This could be adapted to test the connection. But how can I see an old email-invoice?

view · edit · sidebar · attach · print · history
Page last modified on July 13, 2016, at 04:44 PM