view · edit · sidebar · attach · print · history

20130625-debug-ydim-injection-debug-index-therapeutics-export

<< | Index | >>


Summary

  • Check YDIM injection.
  • Debug Mnemonic EOFError.
  • Debug index_therapeutics export error.

Commits / Patches

Index / Status


Debug Ydim injection

Check YDIM Inject connection.
druby://localhost:12375 is ydim server.

vetoquinol.bbmb.ch
% cd var/www/vetoquinol.bbmb.yasuhiro.ch
% ruby -rrubygems -I/home/yasuhiro/.work/usr/ywesee/src/bbmb/lib ./test.rb config="etc/config.yml"

Restore data into local.

% sudo -u postgres dropdb ydim
% sudo -u postgres createdb -E UTF8 -T template0 ydim
% zcat 22\:00-postgresql_database-ydim-backup.gz | psql -U postgres ydim

YDIM server log.

@4000000051c919aa0c79ac14 D, [2013-06-25T13:16:10.815847 #14375] DEBUG -- druby://localhost:53235: attempting login
@4000000051c919aa0c79cb54 I, [2013-06-25T13:16:10.817477 #14375]  INFO -- root: login
@4000000051c919aa0c79daf4 D, [2013-06-25T13:16:10.818206 #14375] DEBUG -- root: create_invoice(68)
@4000000051c919aa0c79ea94 D, [2013-06-25T13:16:10.818314 #14375] DEBUG -- root: debitor 68
@4000000051c919aa0c79f64c I, [2013-06-25T13:16:10.845984 #14375]  INFO -- root: logout

I could checked YDIM injection via BBMB.

Attach:test.rb-20130625.txt


Debug Mnemonic Error on alloga.bbmb.ch

alloga.bbmb.ch process reboot by 500 sec.
Mnemonic got EOFError.

...
@4000000051c91ed731d79afc /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:163: warning: Object#type is deprecated; use Object#class
@4000000051c91ed731d8b054 /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:148: warning: Object#type is deprecated; use Object#class
@4000000051c91ed731d8eaec /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:163: warning: Object#type is deprecated; use Object#class
@4000000051c91ed731d9fc5c /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:148: warning: Object#type is deprecated; use Object#class
@4000000051c91ed731da42ac /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:163: warning: Object#type is deprecated; use Object#class
@4000000051c91ed731de039c /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/CommandIO.rb:50:in `load': end of file reached (EOFError)
@4000000051c91ed731de51bc   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/CommandIO.rb:50:in `nextCommand'
@4000000051c91ed731de55a4   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:134:in `recoverCommands'
@4000000051c91ed731de6544   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:94:in `initialize'
@4000000051c91ed731de692c   from /var/www/bbmb.ch/src/util/bbmbapp.rb:282:in `new'

/usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/mnemonic/CommandIO.rb:50

  def nextCommand
    if @logFile.eof? && test(?e, nextLogFile)
      fileName = nextLogFile
      @logFile.close
      @logFile = File.new(fileName, "r+")
    end 
    Marshal.load @logFile  #=> Here
  end

Debug

caller (in Mnemonic.rb:134)

  def recoverCommands
    while(!@commandIO.eof?)
      @commandIO.nextCommand.execute(system)
    end
  end
@logFile =>
  @4000000051c9254517870494 #<File:/var/www/bbmb.ch/log/mnemonic/000000015040.commandLog>
  @4000000051c925451789238c #<File:/var/www/bbmb.ch/log/mnemonic/000000015041.commandLog>
fastpower mnemonic $ ls -la /var/www/bbmb.ch/log/mnemonic/
total 368184
drwxr-xr-x 2 bbmb bbmb        40 Jun 24 01:00 .
drwxr-xr-x 6 bbmb bbmb        56 Jun 23 10:44 ..
-rw-r--r-- 1 bbmb bbmb 374698423 Jun 23 17:09 000000015039.snapshot
-rw-r--r-- 1 bbmb bbmb       128 Jun 23 17:20 000000015040.commandLog
-rw-r--r-- 1 bbmb bbmb         0 Jun 24 01:00 000000015041.commandLog  #=> empty
-rw-r--r-- 1 bbmb bbmb   2310246 Jun 24 01:00 generatingSnapshot

I wrote 2 patches for Mnemonic.

Attach:mnemonic-empty-logfile-20130625.patch.txt (Prevents this EOF ERROR)

Attach:object-type-warnning-20130625.patch.txt (Removes too many object#type Warnings)

Then, now works without errors and warnings.

fastpower mnemonic $ ls -al /var/www/bbmb.ch/log/mnemonic/
total 368196
drwxr-xr-x 2 bbmb bbmb      4096 Jun 25 08:48 .
drwxr-xr-x 6 bbmb bbmb        56 Jun 23 10:44 ..
-rw-r--r-- 1 bbmb bbmb 374698423 Jun 23 17:09 000000015039.snapshot
-rw-r--r-- 1 bbmb bbmb       128 Jun 23 17:20 000000015040.commandLog
-rw-r--r-- 1 bbmb bbmb       384 Jun 25 08:21 000000015041.commandLog  #=>
-rw-r--r-- 1 bbmb bbmb   2310246 Jun 24 01:00 generatingSnapshot

Link


Check alloga.bbmb.ch

in src/util/bbmbapp.rb

class BbmbApp < SBSM::DRbServer #SimpleDelegator
  ...
  SNAPSHOT_INTERVAL = 24*60*60
  STORAGE_PATH = File.expand_path('../../log/mnemonic',
    File.dirname(__FILE__))
  UPDATE_INTERVAL = 24*60*60 #=> But any codes don't read this value ...
  ...

Updater works from here

  def run_updater
    puts "running updater thread"
    Thread.new {
      Thread.current.priority=-10
      Thread.current.abort_on_exception = true
      today = (UPDATE_HOUR > Time.now.hour) ? Date.today : Date.today.next
      loop { 
        next_run = Time.local(today.year, today.month, today.day, UPDATE_HOUR)
        sleep(next_run - Time.now)
        update()
        today = Date.today.next
      }
    }
  end

Bootup log (Update to display next_run of updater)

@4000000051c931b606fad7a4 starting drb-service
...
...
@4000000051c936dc3ad99aec running updater thread   #=> Updater thread
@4000000051c936dc3ad99ed4 running cleaner thread
@4000000051c936dc3ad99ed4 running statistics thread
@4000000051c936dc3ad99ed4 running cleaner thread
@4000000051c936dc3ad99ed4 starting drb-service
...
@4000000051c9470601b23a1c Wed Jun 26 01:00:00 +0200 2013 # => next_run of Updater thread
...

REMOTE_ACCESS (FTP) information is etc/access_gag.rb.


debug-index-thrapeutics-export-error

Continue tomorrow. (suspend)

view · edit · sidebar · attach · print · history
Page last modified on June 26, 2013, at 09:59 AM