Monday, August 13, 2012

DB2 Express 10.1 auto start on Open Suse 12.1

Found the solution on this link http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/475468-search-inittab-entry-replacement-systemd.html


The idea is translate old initab to new systemd style.

1. /etc/systemd/system/fmc.service

[Unit]
Description=DB2 Fault Monitor Coordinator
After=getty.target

[Service]
ExecStart=/opt/ibm/db2/V10.1/bin/db2fmcd
Restart=always

[Install]
WantedBy=multi-user.target
2. systemctl enable fnc.service


Lotus Notes 8.5 fails to start

Part I. I don't known why my lotus notes can't start up anymore.
My OS is RHEL 6 I check my process, I saw a program /opt/ibm/lotus/notes/taskldr /opt/ibm/lotus/notes/taskldr still running. After I kill this process, I can start  the lotus notes now.
Lesson learn: Some program depend on the other program and some program didn't tell you what's it depend on.

Part II. Today (5/29/2013) after Lotus Note 8.5 freeze, then I do an update. It just wouldn't start again. There is no process I can kill, I try Zap program many time. At the end, I just move the ~/lotus folder to ~/lotus.bak, and start lotus note 8.5 again. Now it like brand new, add note id file, then it work.
Lesson learn: Don't fight too hard for problem, sometime start over is most easy way to keep thing going.

Saturday, June 16, 2012

rvm mongrel init.d non-root

  I need init.d script to start my mongrel cluster , because my machine always reboot with no reason by hosting company.
Here is what I do in 3 steps:

1. Create a wrapper - https://rvm.io/integration/init-d/
    rvm wrapper ruby-1.8.7-p334 bootup mongrel_rails
    rvm wrapper ruby-1.8.7-p334 bootup starling


2. Create /etc/init.d/mongrel
#!/usr/bin/env ruby
#
# mongrel Startup script for Mongrel by Tim Morgan, modifyed by Eric
#
# chkconfig: - 85 15
# description: mongrel manages Mongrel
#


apps = [
  {:app => 'eric', :cluster_config_path => '/home/u/apps/eric/current/config/mongrel_cluster.yml'} ]
default_port = 9300
default_options ={
  :app_dir => '/home/u/apps/eric/current',
  :enviroment => 'production'
}


if ['start','restart','stop', 'status'].include? ARGV.first
  apps.each do |app|
    options = default_options.merge(app)
    puts "#{ARGV.first}:  #{options[:app]} using #{options[:cluster_config_path]}..."
    puts `su eric -c 'bootup_mongrel_rails cluster::#{ARGV.first}  -v  -C #{options[:cluster_config_path]}' `
  end
end


if ['start'].include? ARGV.first
    puts `su eric -c 'bootup_starling -d -P /home/u/apps/pfs/current/tmp/pids/starling.pid -q /home/u/apps/pfs/current/starling'`
end


unless ['start','stop','restart','status'].include? ARGV.first
  puts "Usage: service mongrel {start|stop|restart|status}"
  exit
end


3. Add into runlevel by chkconfig
     chkconfig --add mongrel
     chkconfig --level 3 mongrel on

Sunday, April 29, 2012

Error: uninitialized constant MysqlCompat::MysqlRes

After upgrade to Ubuntu 12.04, my rails application show this error. It turn out the upgrade did upgrade mysql to version 5.5 , then we need rebuild the mysql gem. Just uninstall the mysql gem then install it again.