view · edit · sidebar · attach · print · history

20130616-sandoz-xmlconv-and-vetoquinol-bbmb

<< | Index | >>


Summary

  • Setup
    • sandoz.xmlconv.bbmb.ch/propharma
    • vetoquinol.bbmb.ch
    • globpharm.xmlconv.bbmb.ch
    • globpharm.xmlconv.bbmb.ch/wbmb

Index


Debug propharma error

  • sandoz.xmlconv.bbmb.ch/propharma
[Sun Jun 16 03:58:19 2013] [error] mod_ruby: error in ruby
[Sun Jun 16 03:58:19 2013] [error] mod_ruby: /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- xmlconv/util/destination (LoadError)
[Sun Jun 16 03:58:19 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
[Sun Jun 16 03:58:19 2013] [error] mod_ruby:   from /var/www/sandoz.xmlconv.bbmb.ch/doc/propharma.rbx:7
[Sun Jun 16 03:58:19 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `load'
[Sun Jun 16 03:58:19 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
[Sun Jun 16 04:26:45 2013] [error] mod_ruby: error in ruby
[Sun Jun 16 04:26:45 2013] [error] mod_ruby: /usr/local/share/src/xmlconv/lib/xmlconv/util/destination.rb:7:in `require': no such file to load -- odba (LoadError)
[Sun Jun 16 04:26:45 2013] [error] mod_ruby:   from /usr/local/share/src/xmlconv/lib/xmlconv/util/destination.rb:7
[Sun Jun 16 04:26:45 2013] [error] mod_ruby:   from /var/www/sandoz.xmlconv.bbmb.ch/doc/propharma.rbx:7:in `require'
[Sun Jun 16 04:26:45 2013] [error] mod_ruby:   from /var/www/sandoz.xmlconv.bbmb.ch/doc/propharma.rbx:7
[Sun Jun 16 04:26:45 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `load'
[Sun Jun 16 04:26:45 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'

Then added RubyAddPath

RubyAddPath /usr/local/share/src/xmlconv/lib

xmlconv-in-secure-error

This means xmlconv cannot use Dir.glob under $SAFE=1. (mode_ruby use $SAFE=1 as default).
xmlconv can not use rubygems. (xmlconv must have Dir.glob )

All dependencies must be in site_ruby or RubyAddPath into configuration of Apache (mod_ruby).

[Sun Jun 16 04:54:56 2013] [error] mod_ruby: error in ruby
[Sun Jun 16 04:54:56 2013] [error] mod_ruby: /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/specification.rb:504:in `file?': Insecure operation - file? (SecurityError)
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/specification.rb:504:in `load'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:121:in `load_gems_in'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:120:in `each'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:120:in `load_gems_in'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:117:in `reverse_each'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:117:in `load_gems_in'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:313:in `refresh!'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:72:in `from_gems_in'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:    ... 6 levels...
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /var/www/sandoz.xmlconv.bbmb.ch/doc/propharma.rbx:10
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `load'
[Sun Jun 16 04:54:56 2013] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'

Then I added RubyAddPath to http.conf

# for propharma.idx
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/deprecated-2.0.1/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/odba-1.1.0/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/tmail-1.2.7.1/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/rclconf-1.0.0/lib
RubyAddPath /usr/local/share/src/xmlconv/lib

Test POST Request to sandoz.xmlconv.bbmb.ch

Tested with cURL.

% curl http://sandoz.xmlconv.bbmb.ch/propharma -X POST -H "Content-type: text/xml" -d "<test></test>"
<?xml version='1.0' encoding='UTF-8'?>
<customerOrderResponse backLogDesired='false' language='de' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.e-galexis.com/schemas/ http://www.e-galexis.com/schemas/POS/customerOrder/customerOrderResponse.xsd' version='1.0' productDescriptionDesired='false' roundUpForCondition='false' xmlns='http://www.e-galexis.com/schemas/'>
</customerOrderResponse>

Finaly,(in sandoz.xmlconv.bbmb.ch),

  • Web-Interface uses libraries directly (without rubygems) via RubyAddPath (instead of site_ruby).
  • Application (xmlconvd) uses rubygems.

Debug errors on vetoquinol.bbmb.ch

  • bbmbd
  • yusd

works correctly.
But result mail is:

Errno::ECONNREFUSED
Connection refused - connect(2)
["/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `initialize'",
"/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `new'",
"/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `old_open'",
"/usr/local/bin/ruby186/lib/ruby/1.8/timeout.rb:62:in `timeout'",
"/usr/local/bin/ruby186/lib/ruby/1.8/timeout.rb:93:in `timeout'",
"/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `old_open'",
"/usr/local/bin/ruby186/lib/ruby/1.8/net/pop.rb:438:in `do_start'",
"/usr/local/bin/ruby186/lib/ruby/1.8/net/pop.rb:426:in `start'",
"/usr/local/bin/ruby186/lib/ruby/1.8/net/pop.rb:329:in `start'",
"/usr/local/share/src/bbmb/lib/bbmb/util/polling_manager.rb:50:in `poll'",
"/usr/local/share/src/bbmb/lib/bbmb/util/polling_manager.rb:130:in `poll_sources'",
"/usr/local/share/src/bbmb/lib/bbmb/util/polling_manager.rb:123:in `call'",
"/usr/local/share/src/bbmb/lib/bbmb/util/polling_manager.rb:123:in `load_sources'",
"/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:217:in `call'",
"/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:217:in `load_documents'",
"/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:217:in `each_document'",
"/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:232:in `load_documents'",
"/usr/local/share/src/bbmb/lib/bbmb/util/polling_manager.rb:122:in `load_sources'",
"/usr/local/share/src/bbmb/lib/bbmb/util/polling_manager.rb:129:in `poll_sources'",
"/usr/local/share/src/bbmb/lib/bbmb/util/updater.rb:12:in `run'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:153:in `update'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:122:in `run_updater'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:109:in `loop'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:109:in `run_updater'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:108:in `initialize'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:108:in `new'",
"/usr/local/share/src/bbmb/lib/bbmb/util/server.rb:108:in `run_updater'",
"/var/www/vetoquinol.bbmb.ch//bin/bbmbd:43"]
class PollingManager
  def load_sources(&block)
    file = File.open(BBMB.config.polling_file)
    YAML.load_documents(file) { |mission|
      block.call(mission)
    }   
  ensure
    file.close if(file)
  end 
  def poll_sources(&block)
    load_sources { |source|
      source.poll(&block)
    }   
  end 
end

class PopMission 
  ...
  def poll(&block)
    Net::POP3.start(@host, @port || 110, @user, @pass) { |pop|
      pop.each_mail { |mail|
        poll_mail(mail, &block)
      }
    }
  end
  ...
end

This is wrong configuration for email in polling.yml


Debug globpharm-xmlconv

I, [2013-06-16T08:41:28.007078 #10609]  INFO -- XmlConv2: drb-service listening on druby://localhost:10012
E, [2013-06-16T08:41:28.072508 #10609] ERROR -- XmlConv2: Errno::ECONNREFUSED
Connection refused - connect(2)
/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `initialize'
/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `new'
/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
/usr/local/bin/ruby186/lib/ruby/1.8/timeout.rb:62:in `timeout'
/usr/local/bin/ruby186/lib/ruby/1.8/timeout.rb:93:in `timeout'
/usr/local/bin/ruby186/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
/usr/local/bin/ruby186/lib/ruby/1.8/net/smtp.rb:392:in `do_start'
/usr/local/bin/ruby186/lib/ruby/1.8/net/smtp.rb:377:in `start'
/usr/local/bin/ruby186/lib/ruby/1.8/net/smtp.rb:315:in `start'
/usr/local/share/src/xmlconv/lib/xmlconv/util/mail.rb:25:in `notify'
/usr/local/share/src/xmlconv/lib/xmlconv/util/polling_manager.rb:192:in `poll_sources'
/usr/local/share/src/xmlconv/lib/xmlconv/util/polling_manager.rb:178:in `call'
/usr/local/share/src/xmlconv/lib/xmlconv/util/polling_manager.rb:178:in `load_sources'
/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:217:in `call'
/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:217:in `load_documents'
/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:217:in `each_document'
/usr/local/bin/ruby186/lib/ruby/1.8/yaml.rb:232:in `load_documents'
/usr/local/share/src/xmlconv/lib/xmlconv/util/polling_manager.rb:177:in `load_sources'
/usr/local/share/src/xmlconv/lib/xmlconv/util/polling_manager.rb:184:in `poll_sources'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:147:in `start_polling'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:145:in `loop'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:145:in `start_polling'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:143:in `initialize'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:143:in `new'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:143:in `start_polling'
/usr/local/share/src/xmlconv/lib/xmlconv/util/application.rb:104:in `initialize'
/var/www/globopharm.xmlconv.bbmb.ch/bin/xmlconvd:37:in `new'
/var/www/globopharm.xmlconv.bbmb.ch/bin/xmlconvd:37

This is also wrong configuration for email in polling.yml

host: mail.ywesee.com
user: orders.propharma@bbmb.ch
pass: xxxxx

Then I used my password, temporary

svc -u /service/globpharm.xmlconv.ch

wbmb for globpharm.xmlconv.bbmb.ch

same with propharma againt sandoz.xmlconv.bbmb.ch.

# for wbmb.idx
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/deprecated-2.0.1/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/odba-1.1.0/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/tmail-1.2.7.1/lib
RubyAddPath /usr/local/bin/ruby186/lib/ruby/gems/1.8/gems/rclconf-1.0.0/lib
RubyAddPath /usr/local/share/src/xmlconv/lib

Check order at vetoquinol.bbmb.ch

001:7601001000681
002:ORDERX
003:220
010:16785-153-20130616160922.txt
100:YWESEE
101:
201:CU
202:16785
201:BY
202:1075
231:LINDENMATTE AG BOSS
237:61
238:1
250:ADE
251:1678500153
300:4
301:20130616
500:1
501:
502:404998
520:20
521:PCE
540:2
541:20130616
view · edit · sidebar · attach · print · history
Page last modified on June 17, 2013, at 01:46 AM