view · edit · sidebar · attach · print · history




  • Fix error in YDIM html



Keep in Mind for work to do
  • Fix dojo error
  • 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!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for, too.
  • Use refdatabase for, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search
  • Remove parser for minifi (but keep the minifi)
  • BSV-Plugin does not send mail. Is it sending two mails at once?
  • remove obsolete pdf_patinfo in model, admin/views

Fix error in YDIM html

It was probably a bad I idea yesterday to add the gem rclconf via "require 'rubygems'". Therefore adding all needed logical links found in /usr/lib64/ruby/site_ruby/1.8/ from thinpower under /usr/lib64/ruby/site_ruby/1.8/x86_64 on oddb-ci2. These are:

lrwxrwxrwx 1 root root    29  6. Apr 2009  cgi -> /home/ywesee/git/sbsm/lib/cgi
lrwxrwxrwx 1 root root    41  7. Apr 2009  currency.rb -> /home/ywesee/git/currency/lib/currency.rb
lrwxrwxrwx 1 root root    34  8. Feb 2010  ebps -> /home/ywesee/cogito/ebps/lib/ebps/
lrwxrwxrwx 1 root root    66  7. Apr 2009  encoding -> /usr/lib/ruby/gems/1.8/gems/character-encodings-0.4.1/lib/encoding
lrwxrwxrwx 1 root root    38  6. Apr 2009  fixes -> /home/ywesee/git/
lrwxrwxrwx 1 root root    43  8. Apr 2009  holidaymanager -> /home/ywesee/git/holiday_manager/src/model/
lrwxrwxrwx 1 root root    30  6. Apr 2009  odba -> /home/ywesee/git/odba/lib/odba
lrwxrwxrwx 1 root root    33  6. Apr 2009  odba.rb -> /home/ywesee/git/odba/lib/odba.rb
lrwxrwxrwx 1 root root    42  7. Apr 2009  pdfinvoice -> /home/ywesee/git/pdfinvoice/lib/pdfinvoice
lrwxrwxrwx 1 root root    36  6. Apr 2009  rclconf -> /home/ywesee/git/rclconf/lib/rclconf
lrwxrwxrwx 1 root root    39  6. Apr 2009  rclconf.rb -> /home/ywesee/git/rclconf/lib/rclconf.rb
lrwxrwxrwx 1 root root    45  6. Apr 2009  rpdf2txt-rockit -> /home/ywesee/git/rpdf2txt/lib/rpdf2txt-rockit
lrwxrwxrwx 1 root root    30  7. Apr 2009  rrba -> /home/ywesee/git/rrba/lib/rrba
lrwxrwxrwx 1 root root    30  7. Apr 2009  rwv2 -> /home/ywesee/git/rwv2/lib/rwv2
lrwxrwxrwx 1 root root    30  6. Apr 2009  sbsm -> /home/ywesee/git/sbsm/lib/sbsm
lrwxrwxrwx 1 root root    55  6. Apr 2009  swissmedic-diff.rb.bak.20100824 -> /home/ywesee/git/swissmedic-diff/lib/swissmedic-diff.rb
lrwxrwxrwx 1 root root    30  6. Apr 2009  ydim -> /home/ywesee/git/ydim/lib/ydim
lrwxrwxrwx 1 root root    30  8. Apr 2009  ydpm -> /home/ywesee/git/ydpm/lib/ydpm
lrwxrwxrwx 1 root root    28  6. Apr 2009  yus -> /home/ywesee/git/yus/lib/yus

I think rwv2, ebps is not needed.

Verifying that on oddb-ci2 mod_ruby I have with Ruby 1.9. On thinpower I have

-rwxr-xr-x 1 root   root   2797837 15. Mär 23:15 /home/ywesee/software/mod_ruby/
-rwxr-xr-x 1 root   root   2797837 16. Mär 19:14 /usr/lib64/apache2/modules/

In /home/ywesee/software/mod_ruby/Makefile I see

srcdir = /home/ywesee/software/mod_ruby
topdir = /usr/local/include/ruby-1.9.1
hdrdir = /usr/local/include/ruby-1.9.1

On oddb-ci2 I have in /home/niklaus/mod_ruby/Makefile. Same in /opt/src/mod_ruby

srcdir = /home/niklaus/mod_ruby
topdir = /usr/include/ruby-1.9.1
hdrdir = /usr/include/ruby-1.9.1

The following files lay around

-rwxr-xr-x 1 root    root  185128 12. Nov 2013  /opt/src/mod_ruby/
-rwxr-xr-x 1 root    root  185289 24. Nov 2014  /opt/src/mod_ruby.niklaus/
-rwxr-xr-x 1 niklaus users 185348 13. Apr 08:56 /home/niklaus/mod_ruby/
-rwxr-xr-x 1 root    root  143736 13. Apr 09:12 /usr/lib64/apache2/modules/

The /usr/lib64/apache2/modules/ is different. Therefore git clone /home/niklaus/mod_ruby.1.9. When calling make after ./configure.rb --with-apr-includes=/usr/include/apr-1 --with-apxs=/usr/sbin/apxs I get the following error

gcc -shared -o mod_ruby.o ruby_config.o apachelib.o array_header.o table.o connection.o server.o request.o upload.o cookie.o paramtable.o multival.o bucket.o uri.o error.o apache_request.o apache_multipart_buffer.o apache_cookie.o -L/usr/lib64  -L/usr/local/lib -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby-static  -lpthread -lrt -ldl -lcrypt -lm 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/local/lib/libruby-static.a(array.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libruby-static.a: could not read symbols: Bad value
collect2: ld gab 1 als Ende-Status zurück
Makefile:182: recipe for target '' failed
make: *** [] Error 1

Therefore it looks as if apache was not build with static libraries. This were done using /usr/local/bin/ruby (ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]).

When I use /usr/bin/ruby (ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-linux]). Then running make && sudo make install completes. Now I have the same

-rwxr-xr-x 1 niklaus users 181088 13. Apr 09:26 /home/niklaus/mod_ruby.1.9/
-r-xr-xr-x 1 root    root  181088 13. Apr 09:31 /usr/lib/apache2/modules/

Restarting apache2 works, but now I get an "Internal Server Error" when accessing I don't find any useful information in the apache logs nor the output of ydim/ydim-html.

Gem files will remain installed in /usr/local/lib64/ruby/gems/1.8/gems/character-encodings-0.4.1 for inspection. Results logged to /usr/local/lib64/ruby/gems/1.8/gems/character-encodings-0.4.1/ext/encoding/character/utf-8/gem_make.out sudo gem18 install character-encodings

On oddb-ci2 it is impossible to install character-encoding 0.4.1 error is

$ sudo gem18 install character-encodings --version=0.4.1
rb_utf_tr.c: In Funktion »tr_trans_do«:
rb_utf_tr.c:107:14: Fehler: Variable »modified« gesetzt, aber nicht verwendet [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Makefile:153: recipe for target 'rb_utf_tr.o' failed
make: *** [rb_utf_tr.o] Error 1

rkj-character-encodings (0.4.1) does not have this problem.

But first I must compile and install ruby-1.8.6. Modified the gen_ruby_186 to download the original tar. see Attach:gen_ruby_186_niklaus.txt. Copied /usr/local/src/patches_ruby_186/openssl-1.0.patch, /usr/local/src/patches_ruby_186/syck.patch and /usr/local/src/oniguruma_patch_for_ruby-1.8.6_p369.20100615_from_Hannes-san.tar.gz to the same place on oddb-ci2.

I must use p388 as I patching p114 with the onigurama-patch for p369 fails. Checking Ruby Version via /usr/local/bin/ruby186 --version returns the expected value ruby 1.8.6 (2010-01-11 patchlevel 388) [x86_64-linux].

Trying to to start ydim with the newly generated ruby fails

sudo -u apache /usr/local/bin/ruby186 -rubygems /usr/bin/ydimd
/usr/local/bin/ruby186: no such file to load -- ubygems (LoadError)

Changing in the script the prefix from /usr/local -> /usr/ and rebuilding it again. Now getting a different error

 sudo -u apache /usr/bin/ruby186 -rubygems /usr/bin/ydimd
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:296: warning: parenthesize argument(s) for future version
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:465: warning: parenthesize argument(s) for future version
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:18:in `require': /usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:53: syntax error, unexpected ',', expecting '|' (SyntaxError)
... define_method name do |*args, &block| # TODO: really works ...
/usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:54: syntax error, unexpected tCONSTANT, expecting '}'
/usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63: syntax error, unexpected kEND, expecting '}'
/usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:69: syntax error, unexpected kEND, expecting '}'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:18
        from /usr/lib/ruby/site_ruby/1.8/ubygems.rb:10:in `require'
        from /usr/lib/ruby/site_ruby/1.8/ubygems.rb:10
gem18  list | grep deprecate
/usr/lib64/ruby/1.8/x86_64-linux/rbconfig.rb:7: ruby lib version (1.8.6) doesn't match executable version (1.8.7) (RuntimeError)
        from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:8:in `require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:8
        from /usr/bin/gem18:8:in `require'
        from /usr/bin/gem18:8

This gem ist not on thinpower. Therefore manually removing it using rm /usr/lib64/ruby/site_ruby/1.8/rubygems/deprecate.rb. But I think I have got build rubygems, too. Comparing the /usr/lib/ruby/site_ruby/1.8/rubygems.rb of thinpower and oddb-ci2 shows that they are two very different beats. On thinpower git directly patches module Gem/Kernl, after some requires to 'rubygems/defaults', 'thread' and 'etc'. On oddb-ci2 it was created today and has lines like

require "rubygems/version"
require "rubygems/deprecate"
Gem.load_yaml if defined? ::YAML
class Gem::Requirement

Copied /usr/local/src/rubygems-1.4.1 to oddb-ci2 and executed there sudo ruby18 setup.rb. No gem --version returns 1.4.1 and gem18 list works. But getting the next error

udo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd
/usr/local/lib/ruby/gems/1.8/gems/color-1.8/lib/color/rgb.rb:681:in `__named_color': wrong argument type Symbol (expected Proc) (TypeError)
        from /usr/local/lib/ruby/gems/1.8/gems/color-1.8/lib/color/rgb/colors.rb:5:in `named'
        from /usr/local/lib/ruby/gems/1.8/gems/color-1.8/lib/color/rgb/colors.rb:9
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/color-1.8/lib/color/rgb.rb:716
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/color-1.8/lib/color.rb:134
         ... 11 levels...
        from /usr/lib/ruby/site_ruby/1.8/ydim/server.rb:10
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
        from /usr/bin/ydimd:5

Uninstalling and reinstalling the color gem did not help. But downgrading from version 1.8 to 1.4.0 on thinpower fixed the problem. Now tackling the next problem on how to install character-encoding. Was easy, as now gem18 install character-encodings -v 0.4.1 -- --with-cflags=\"-Wno-unused-but-set-variable\" completed without any problem.

Next error is

sudo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- encoding/character/utf-8 (LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
        from /usr/lib/ruby/site_ruby/1.8/ydim/root_session.rb:5

Fixed by sudo ln -s /usr/local/lib/ruby/gems/1.8/gems/character-encodings-0.4.1/lib/encoding /usr/lib64/ruby/site_ruby/1.8/. Must install fastthread 1.0.7, too. Dito for needle (1.3.0), pdf-writer (1.1.8), rmail (1.0.0), deprecated (2.0.1), dbi (0.4.1).

Now it complains about the missing postgres DBI

 sudo -u apache /usr/bin/ruby18 -rubygems /usr/bin/ydimd
#<RCLConf::RCLConf:0x7fa5f8242548 @defaults={"vat_rate"=>8.0, "mail_from"=>"", "conf_dir"=>"/var/www/.ydim/conf", "smtp_from"=>"", "invoice_number_start"=>10000, "detach"=>false, "server_url"=>"druby://localhost:12375", "smtp_user"=>"", "smtp_domain"=>"", "salutation"=>{""=>"Sehr geehrter Herr", "Frau"=>"Sehr geehrte Frau", "Herr"=>"Sehr geehrter Herr"}, "root_key"=>"root_dsa", "data_dir"=>"/var/www/.ydim/data", "config"=>["/var/www/.ydim/ydimd.yml", "/etc/ydim/ydimd.yml"], "smtp_port"=>587, "db_driver_url"=>"DBI:Pg:ydim", "smtp_authtype"=>:plain, "mail_charset"=>"iso-8859-1", "home_country"=>"Schweiz", "currencies"=>["CHF", "EUR", "USD"], "smtp_server"=>"localhost", "log_file"=>#<IO:0x7fa5fb6d5eb8>, "db_user"=>"ydim", "currency_update_hour"=>2, "mail_recipients"=>[], "smtp_pass"=>nil, "root_name"=>"Root", "root_email"=>"", "log_level"=>"INFO", "db_auth"=>"", "autoinvoice_hour"=>1, "mail_body"=>"%s %s\n%s"}, @argv={}, @loaded={"mail_from"=>"Niklaus Giger (ydim) <>", "smtp_from"=>"", "server_url"=>"druby://localhost:12375", "smtp_user"=>"", "smtp_domain"=>"", "root_key"=>"/etc/ydim/id_dsa", "smtp_port"=>587, "smtp_server"=>"", "mail_recipients"=>[""], "md5_pass"=>"Digest::MD5.hexdigest('7219c5fc20d4862fa9ef7fe9beb0788d')", "smtp_pass"=>"N9baA4uuNP4r", "root_email"=>"", "log_level"=>"DEBUG", "mail_body"=>"%s %s\n\nAnbei die Rechnung f\303\274r %s.\n\nBesten Dank f\303\274r Ihren Auftrag!\n\nMit freundlichen Gr\303\274ssen\nZeno Davatz\n043 540 05 50\n", "email"=>""}, @runtime={}>
/usr/local/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:294:in `load_driver': Unable to load driver 'Pg' (underlying error: uninitialized constant DBI::DBD::Pg) (DBI::InterfaceError)

Okay. I forgot to install dbi from source. Done with rm -rf pkg; rake dbi; sudi gem18 install pg --version=0.9.0; sudo gem18 install pkg/dbi-0.4.5.gem; sudo gem18 install dbd-pg --version=0.3.9

Nice. Now ydim starts up without any problem.

After checking the version e7a67ef8b675ff2d881cbefdcc144025441367cf under ~git/sbsm and e25abf72a7cb61b1ec8b1c5bfe8ca47aa01924f6 under ~/githtmlgrid ydim-html started up again. Restarted apache2. Reloaded and found the following error under /var/www/

Wed Apr 13 12:59:55 2016] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Wed Apr 13 13:00:07 2016] [error] mod_ruby: error in ruby
[Wed Apr 13 13:00:07 2016] [error] mod_ruby: /var/www/ `expand_path': Insecure operation - expand_path (SecurityError)
[Wed Apr 13 13:00:07 2016] [error] mod_ruby:   from /var/www/ `<top (required)>'
[Wed Apr 13 13:00:07 2016] [error] mod_ruby:   from /usr/lib64/ruby/1.9.1/apache/ruby-run.rb:53:in `load'
[Wed Apr 13 13:00:07 2016] [error] mod_ruby:   from /usr/lib64/ruby/1.9.1/apache/ruby-run.rb:53:in `handler'

This might related to the commit 87db4da4475f6d4ce2074de816e422b11f166afe 24.10.12 08:46 by Yasu in sbsm or a similar d0dcc6f61e135a272cd55cfa85d78b84824059f4 in ydim-html

Patched doc/index.rbx to use File.dirname(File.dirname(__FILE__))+ '/etc/config.rb' instead of load File.expand_path('../../etc/config.rb', __FILE__)

Now got the error [Wed Apr 13 13:29:28 2016] [warn] Unable to load url configuration: No such file or directory - /var/www/ Fixed with copying /var/www/ from thinpower.

Now all errors vanished, but nothing gets displayed at all. In /var/log/apache2/error_log I found

==> /var/log/apache2/error_log <==
ydim-html Client Error: uninitialized constant #<Module:0x00000001ed90d0>::YDIM
/var/www/ `<top (required)>'
/usr/lib64/ruby/1.9.1/apache/ruby-run.rb:53:in `load'
/usr/lib64/ruby/1.9.1/apache/ruby-run.rb:53:in `handler'

Now I ask myself, why we have a ruby-run from a 1.9 ruby here, as ydim-html should have ruby 1.8. Checking my apache setup. Checking installed mod_ruby.os

 readelf -d /usr/lib64/apache2/modules/

Dynamic section at offset 0x21b70 contains 29 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: []
 0x0000000000000001 (NEEDED)             Shared library: []
 0x0000000000000001 (NEEDED)             Shared library: []
 0x0000000000000001 (NEEDED)             Shared library: []
 0x0000000000000001 (NEEDED)             Shared library: []
 0x0000000000000001 (NEEDED)             Shared library: []
 0x0000000000000001 (NEEDED)             Shared library: []
 0x000000000000000f (RPATH)              Library rpath: [/usr/lib64]
 0x000000000000001d (RUNPATH)            Library runpath: [/usr/lib64]
 0x000000000000000c (INIT)               0x82e8
 0x000000000000000d (FINI)               0x1a708
 0x0000000000000004 (HASH)               0x1c8
 0x000000006ffffef5 (GNU_HASH)           0xc70
 0x0000000000000005 (STRTAB)             0x37a0
 0x0000000000000006 (SYMTAB)             0x1088
 0x000000000000000a (STRSZ)              7250 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x222000
 0x0000000000000002 (PLTRELSZ)           7200 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x66c8
 0x0000000000000007 (RELA)               0x5798
 0x0000000000000008 (RELASZ)             3888 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x5738
 0x000000006fffffff (VERNEEDNUM)         2
 0x000000006ffffff0 (VERSYM)             0x53f2
 0x000000006ffffff9 (RELACOUNT)          55
 0x0000000000000000 (NULL)               0x0

This looks similar to thinwpower. Main differences are that it contains an additional and its library Path ar /usr/lib/64 instead of /usr/local/lib

Created a (executable) file /var/www/ with the following content


puts "Hello World!<br><pre>"

ENV.each { |k,v|
  puts "#{k}=#{v}"

puts "</pre>"

this outputs

Hello World!<br><pre>
HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.76 Safari/537.36
HTTP_COOKIE=sbsm-persistent-cookie=language%3Dde; __utma=120231382.1194233752.1396442573.1460532874.1460545202.68; __utmc=120231382; __utmz=120231382.1441631577.25.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
SERVER_SIGNATURE=<address>Apache Server at Port 443</address>
SERVER_ADMIN=[no address given]

I am asking myself why I get mod_ruby/1.3.0 when I installed mod_ruby/1.4.1?

Fixed the error by using a absolute path in the doc/index.rbx. Now it complained about a missing etc/config.rb. Copyied a (slighly altered version from thinpower /var/www/ I get an almost white login scrren. See . And trying to entern name/psI get the following output in ydmin-html

error in SBSM::Session#process: /
undefined method `[]' for #<DRb::DRbUnknown:0x7eff59983410>
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:208:in `import_cookies'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:360:in `process'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:172:in `drb_process'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:171:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:171:in `drb_process'

and in the apache error log

Wed Apr 13 15:08:10 2016] [error] access to /var/www/ failed for (null), reason: file permissions deny server execution
[Wed Apr 13 15:08:10 2016] [error] access to /var/www/ failed for (null), reason: file permissions deny server execution
[Wed Apr 13 15:08:10 2016] [error] access to /var/www/ failed for (null), reason: file permissions deny server execution

Why the hell I get now suddenly file permissions errors?

But the import_cookies error was already reported by masa The same solution worked also for /usr/lib/ruby/site_ruby/1.8/sbsm/session.rb. Now I can login (still with a white background). See

Pressing "Neuer Kunde" works. See

. But "Speichern" does not work. Result is the display. In the Apache error log I see
[Wed Apr 13 15:45:57 2016] [error] access to /var/www/ failed for (null), reason: file permissions deny server execution
[Wed Apr 13 15:45:57 2016] [error] access to /var/www/ failed for (null), reason: file permissions deny server execution
[Wed Apr 13 15:45:57 2016] [error] access to /var/www/ failed for (null), reason: file permissions deny server execution

After chmod +x /var/www/ the apache log shows

Wed Apr 13 15:48:32 2016] [error] mod_ruby: error in ruby
[Wed Apr 13 15:48:32 2016] [error] mod_ruby: /usr/lib64/ruby/1.9.1/apache/ruby-run.rb:53:in `load': /var/www/ target of repeat operator is not specified: /* (SyntaxError)
[Wed Apr 13 15:48:32 2016] [error] mod_ruby: \tCopyright (c) 2004-2005, The Dojo Foundation
[Wed Apr 13 15:48:32 2016] [error] mod_ruby: \tAll Rights Reserved.
[Wed Apr 13 15:48:32 2016] [error] mod_ruby: 

I think the file is interpreted as a ruby script and not as Javascript. Why? Removed the lines RubyAddPath /var/www/ and RubyHandler Apache::RubyRun.instance. And know the created customer appears. See


When starting the debugger for ydim-htmld using sudo -u apache /usr/bin/ruby18 -rubygems -rdebug /var/www/ I first must press several time 'c' to continue when getting errors like no marshal_dump is defined for class Proc' (TypeError). But when I press "Neue Rechnung" I get the following output

(rdb:8) c
/usr/lib/ruby/1.8/drb/drb.rb:375: `0x3faa7b9c0120 is recycled object' (RangeError)
        from /usr/lib/ruby/1.8/drb/drb.rb:1582:in `main_loop'
        from /usr/lib/ruby/1.8/drb/drb.rb:1431:in `run'
        from /usr/lib/ruby/1.8/drb/drb.rb:1428:in `start'
        from /usr/lib/ruby/1.8/drb/drb.rb:1428:in `run'
        from /usr/lib/ruby/1.8/drb/drb.rb:1348:in `initialize'
        from /usr/lib/ruby/1.8/drb/drb.rb:1628:in `new'
        from /usr/lib/ruby/1.8/drb/drb.rb:1628:in `start_service'
        from /var/www/
/usr/lib/ruby/1.8/drb/drb.rb:375:      ObjectSpace._id2ref(ref)
(rdb:8) ref
(rdb:8) ref.class
which might be related to the error we are chasing. After setting $VERBOSE=true we continue without halting. Setting $VERBOSE to true for ydim and ydim-html.

Got once the following stack-trace

/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:402: warning: instance variable @redirected not initialized
/usr/lib/ruby/site_ruby/1.8/sbsm/state.rb:184: warning: instance variable @redirected not initialized
/usr/lib/ruby/site_ruby/1.8/sbsm/state.rb:244: warning: instance variable @filter not initialized
error in SBSM::Session#to_html: /de/debitor/unique_id/3
0x3faecfa7ff04 is not id value
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:375:in `_id2ref'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:375:in `to_obj'
(druby://localhost:12375) /usr/lib/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1403:in `to_obj'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1705:in `to_obj'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:613:in `recv_request'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:911:in `recv_request'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1531:in `init_with_client'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1543:in `setup_message'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1495:in `perform'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1590:in `main_loop'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1586:in `loop'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1586:in `main_loop'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1582:in `start'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1582:in `main_loop'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1431:in `run'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1428:in `start'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1428:in `run'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1348:in `initialize'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1628:in `new'
(druby://localhost:12375) /usr/lib/ruby/1.8/drb/drb.rb:1628:in `start_service'
(druby://localhost:12375) /usr/bin/ydimd:48
/usr/lib/ruby/site_ruby/1.8/sbsm/drb.rb:17:in `respond_to?'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/value.rb:33:in `init'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/component.rb:139:in `initialize'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/namedcomponent.rb:34:in `initialize'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/composite.rb:147:in `new'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/composite.rb:147:in `create'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:33:in `compose'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `each'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/divcomposite.rb:13:in `compose'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/composite.rb:57:in `init'
/usr/lib/ruby/site_ruby/1.8/htmlgrid/component.rb:139:in `initialize'
/usr/lib/ruby/site_ruby/1.8/sbsm/state.rb:245:in `new'
/usr/lib/ruby/site_ruby/1.8/sbsm/state.rb:245:in `view'
/usr/lib/ruby/site_ruby/1.8/sbsm/state.rb:181:in `to_html'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:448:in `to_html'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:173:in `drb_process'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:171:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/sbsm/session.rb:171:in `drb_process'
/usr/lib/ruby/1.8/drb/drb.rb:1556:in `__send__'
/usr/lib/ruby/1.8/drb/drb.rb:1556:in `perform_without_block'
/usr/lib/ruby/1.8/drb/drb.rb:1516:in `perform'
/usr/lib/ruby/1.8/drb/drb.rb:1590:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1586:in `loop'
/usr/lib/ruby/1.8/drb/drb.rb:1586:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1582:in `start'
/usr/lib/ruby/1.8/drb/drb.rb:1582:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1431:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1428:in `start'
/usr/lib/ruby/1.8/drb/drb.rb:1428:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1348:in `initialize'
/usr/lib/ruby/1.8/drb/drb.rb:1628:in `new'
/usr/lib/ruby/1.8/drb/drb.rb:1628:in `start_service'
YDIM::Html::View::Debitors::COMPONENTS[[0, 0]] in create(subnavigation)

When I tried to load the 3 customer I had created. But now the whoe process just hangs and hangs.

Even after stopping then starting ydim, ydim-html, postgres and apache accessing hangs without consuming CPU power. Did I crash the database? Will continue tomorrow.

view · edit · sidebar · attach · print · history
Page last modified on April 26, 2016, at 05:09 PM