view · edit · sidebar · attach · print · history

Index>

20140922-fix-paypal-ipn

Summary

  • ipn.ywesee.com does not work

Commits

Index

Keep in Mind
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!

---

ipn.ywesee.com does not work

Our problems with paypal might be related to the fact that paypal did sent warnings/errors like

Please check your server that handles PayPal Instant Payment
Notification (IPN) messages. Messages sent to the following URL(s) are
not being received:
http://ipn.ywesee.com/paypal

Zeno did receive these messages since quite a few months, but is unsure whether we really use it somewhere in the code. On thinpower found /etc/apache2/vhosts.d/ipn.ywesee.com.conf. Checking the error logs there. Found the following entries

[Sat Sep 20 14:02:39 2014] [error] [client 84.73.49.252] Directory index forbidden by Options directive: /var/www/ipn.ywesee.com/doc/
[Sat Sep 20 14:02:40 2014] [error] [client 84.73.49.252] File does not exist: /var/www/ipn.ywesee.com/doc/favicon.ico
[Sat Sep 20 14:02:40 2014] [error] [client 84.73.49.252] File does not exist: /var/www/ipn.ywesee.com/doc/favicon.ico

 cat  /var/www/ipn.ywesee.com/log/2014/04/23/error_log 
[Wed Apr 23 04:28:08 2014] [notice] Received Request POST from 173.0.81.1
[Wed Apr 23 04:28:08 2014] [notice] content-length: 835
[Wed Apr 23 04:28:10 2014] [error] mod_ruby: error in ruby
[Wed Apr 23 04:28:10 2014] [error] mod_ruby: /usr/lib64/ruby/1.8/net/protocol.rb:206:in `initialize': getaddrinfo: Name or service not known (SocketError)
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/net/protocol.rb:206:in `new'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/net/protocol.rb:206:in `old_open'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/timeout.rb:56:in `timeout'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/timeout.rb:76:in `timeout'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/net/protocol.rb:206:in `old_open'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/net/smtp.rb:393:in `do_start'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/net/smtp.rb:378:in `start'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /var/www/ipn.ywesee.com/doc/index.rbx:62
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `load'
[Wed Apr 23 04:28:10 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `handler'

Must check the paypal doc to see about ipn. Also checking our code base.

Must see whether /etc/apache2/vhosts.d/ipn.ywesee.com.conf:ScriptAlias /paypal /var/www/ipn.ywesee.com/doc/index.rbx works or not.

Looking we for RubyPath under /etc/apache2 and found that most use the src directory (e.g.

  • /etc/apache2/vhosts.d/oddb.org.conf.fcgi:#RubyAddPath /var/www/oddb.org/src

But a few ones use lib, namely

  • /etc/apache2/vhosts.d/10_ch.oddb.org.conf:RubyAddPath /var/www/ch.oddb.org/lib
  • /etc/apache2/vhosts.d/ipn.ywesee.com.conf:RubyAddPath /var/www/ipn.ywesee.com/lib

and ydim uses /

  • /etc/apache2/vhosts.d/ydim.ywesee.com.conf:RubyAddPath /var/www/ydim.ywesee.com/

It is probably time to clean up this stuff.

[Mon Sep 22 09:19:34 2014] [warn] Unable to load url configuration: No such file or directory - /var/www/ydim.ywesee.com/etc/trans_handler.yml
[Mon Sep 22 09:19:34 2014] [notice] Hint: store configuration in a YAML-File at DOCUMENT_ROOT/../etc/trans_handler.yml

Looking under /var/www/de.oddb.org/log/mm/error_log found

[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: Mon Sep 22 07:01:05 +0200 2014 - 70259324886960 - DRb::DRbConnError - druby://localhost:11000 - #<Errno::ECONNREFUSED:  
Connection refused - connect(2)>  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:736:in `open'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:729:in `each'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:729:in `open'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1189:in `initialize'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1169:in `new'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1169:in `open'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1085:in `method_missing'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1103:in `with_friend'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1084:in `method_missing'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/cgi/drbsession.rb:20:in `initialize'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/cgi/session.rb:273:in `new'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/cgi/session.rb:273:in `initialize'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:88:in `new'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:88:in `drb_process'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:61:in `process'  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /var/www/de.oddb.org/doc/index.rbx:11  
[Mon Sep 22 07:01:05 2014] [error] access to / failed for (null), reason: /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `load'  

[Mon Sep 22 09:01:09 2014] [error] [client 54.191.244.235] File does not exist: /var/www/de.oddb.org/doc/"+(dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"  

[Mon Sep 22 09:15:55 2014] [error] [client 66.249.65.136] File does not exist: /var/www/de.oddb.org/var/captcha/c5df9df2ba2d4b78cf3808fe1a8b021ff18ae6b31d464d0dd84073a51fc166c3.jpg  

[Mon Sep 22 09:19:02 2014] [error] [client 66.249.65.140] File does not exist: /var/www/de.oddb.org/var/captcha/c7bee8b84baada4175e59339a33fe6d657645f9be22d3112505e53e22153b8b6.jpg  

It looks to me that ipn.ywesee.com should be working because in its doc/index.rbx file I found stuff about using ipn. Also it references the rmail gem and other stuff I changed in June. /var/www/ipn.ywesee.com is a directory with a git repository but no remote defined and a few commits dating from 2008. And a local not yet commited change

diff --git a/doc/index.rbx b/doc/index.rbx
index 4019f69..e322dc0 100755
--- a/doc/index.rbx
+++ b/doc/index.rbx
@@ -30,7 +30,7 @@ begin

   if notify.complete?
     drb_uris = config.drb_uris
-    target = drb_uris[notify.params['custom']]
+    target = drb_uris[notify.params['custom']] || drb_uris['ch.oddb.org']
     DRb::DRbObject.new(nil, target).ipn(notify)
     request.status = 200
     unless(notify.acknowledge)

As I had forced remove the the vim lock the file doc/index.rbx had the timestamp of today even when I had no intent do change anything in it.

But I think the code lives under http://scm.ywesee.com/?p=yipn/.git;a=summary But there I find code and changes not present on thinpower.

Checking out this code to oddb-ci2 and trying to make a failing test, as I want to fix the problem sending the confirmation log (as seen in /var/www/ipn.ywesee.com/log/2014/04/23/error_log). Added a .ruby_version, Gemfile(.lock) and now bundle exec ruby test/test_ipn.rb has too many failures. Trying to fix them. After adding rclconf to the Gemfile all tests pass. Must look whether sending the e-mail is tested, too.

After changing from rmail to mail (as in oddb.org), I get now in the test exactly the same error as in the errorlog from ipn.ywesee.com. Added also .gitignore, Rakefile and .travis.yml to make tests under travis-ci.org pass. Tests pass now under travis-ci.

Pushed commits:

Adding now a test case to decide whether I want to bring the local change on thinpower for doc/index.rbx target = drb_uris[notify.params['custom']] || drb_uris['ch.oddb.org']. Yes. See commit Added default drb_uri

Also must add a mail_from to etc/yipn.yml. Needed commit Add missing fields for deliveryng e-mails

Still seeing errors in /var/www/ipn.ywesee.com/log/*log

[Mon Sep 22 10:04:50 2014] [error] [client 84.73.49.252] File does not exist: /var/www/ipn.ywesee.com/doc/favicon.ico
[Mon Sep 22 12:58:23 2014] [error] mod_ruby: error in ruby
[Mon Sep 22 12:58:23 2014] [error] mod_ruby: /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- mail (MissingSourceFile)
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /var/www/ipn.ywesee.com/doc/index.rbx:7
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `load'
[Mon Sep 22 12:58:23 2014] [error] mod_ruby:   from /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `handler'

Added favicon.ico to ydin/doc. Asking myself why ipn is running ruby 1.8. and not 1.9 like oddb.org. Is this because of require 'rubygems' in doc/index.rbx?. Pushed commit Added favicon.ico. Remove call to rubygems

Changed the Gemfile to install under ruby 1.8.7, too. This installed the following gem using bundle install

Resolving dependencies...
Using i18n 0.7.0.beta1
Using multi_json 1.10.1
Using activesupport 3.2.19
Using mime-types 1.25.1
Using mail 2.6.1
Using money 6.3.0
Using paypal 2.0.0
Using rclconf 1.0.0
Using bundler 1.7.3

Changed .travis.yml to test under Ruby 1.8.7, 1.9.3, 2.1.2 and ruby-head. Pushed commit Made unit-tests pass unter ruby 1.9.3, 1.8.7 and 2.1.2

Running as root on thinpower

/usr/bin/gem18 install  mime-types --version=1.25.1

but this failed with an exception.

view · edit · sidebar · attach · print · history
Page last modified on September 22, 2014, at 03:05 PM