This forum is no longer active. Please post your questions to our new community site

Forums Redmine

Autolaunching Redmine Stack at OS X boot

Subscribe to Autolaunching Redmine Stack at OS X boot 2 post(s), 2 voice(s)

 
Avatar bill.mclean 1 post

When I manually launch Redmine every thing is right with the world :) However when i use the following .plist called com.bitnami.redmine.plist in /Library/LaunchDaemons:

<?xml version=“1.0” encoding=“UTF-8”?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>


Label
com.bitnami-redmine.services
OnDemand

ProgramArguments

/Application/redmine-0.9.2-0/ctlscript.sh
start

RunAtLoad UserName root

Using launchctl to test it, the log shows the following:

10-03-11 2:07:03 PM com.bitnami-redmine.services970 100311 14:07:03 mysqld_safe Logging to ‘/Applications/redmine-0.9.2-0/mysql/data/mysqld.log’.
10-03-11 2:07:03 PM com.apple.launchd1 (0×1142e0.anonymous.nohup1057) Bug: launchd_core_logic.c:8250 (23932):0
10-03-11 2:07:03 PM com.apple.launchd1 (0×1142e0.anonymous.nohup1057) Switching sessions is not allowed in the system Mach bootstrap.
10-03-11 2:07:03 PM com.apple.launchd1 (0×1142e0.anonymous.nohup1057) vprocmgr_switch_to_session(): kr = 0×44c
10-03-11 2:07:03 PM com.apple.launchd1 (0×1142e0.anonymous.nohup1058) Bug: launchd_core
logic.c:8250 (23932):0
10-03-11 2:07:03 PM com.apple.launchd1 (0×1142e0.anonymous.nohup1058) Switching sessions is not allowed in the system Mach bootstrap.
10-03-11 2:07:03 PM com.apple.launchd1 (0×1142e0.anonymous.nohup1058) vprocmgr_switch_to_session(): kr = 0×44c
10-03-11 2:07:03 PM com.bitnami-redmine.services970 100311 14:07:03 mysqld_safe Starting mysqld.bin daemon with databases from /Applications/redmine-0.9.2-0/mysql/data
10-03-11 2:07:06 PM com.bitnami-redmine.services970 /Applications/redmine-0.9.2-0/mysql/scripts/ctl.sh : mysql started at port 4096
10-03-11 2:07:15 PM com.bitnami-redmine.services970 starting port 3001
10-03-11 2:07:15 PM com.bitnami-redmine.services970 starting port 3002
10-03-11 2:07:16 PM com.bitnami-redmine.services970 Syntax OK
10-03-11 2:07:16 PM com.bitnami-redmine.services970 (48)Address already in use: make_sock: could not bind to address [::]:80
10-03-11 2:07:17 PM com.bitnami-redmine.services970 /Applications/redmine-0.9.2-0/apache2/scripts/ctl.sh : httpd started at port 80
10-03-11 2:07:30 PM com.bitnami-redmine.services970 /Applications/redmine-0.9.2-0/subversion/scripts/ctl.sh : subversion started at port 3690
10-03-11 2:07:32 PM com.bitnami-redmine.services1154 /Applications/redmine-0.9.2-0/mysql/scripts/ctl.sh : mysql (pid 1079) already running
10-03-11 2:07:37 PM com.bitnami-redmine.services1154 already started port 3001
10-03-11 2:07:37 PM com.bitnami-redmine.services1154 already started port 3002
10-03-11 2:07:37 PM com.bitnami-redmine.services1154 Syntax OK
10-03-11 2:07:37 PM com.bitnami-redmine.services1154 /Applications/redmine-0.9.2-0/apache2/scripts/ctl.sh : httpd (pid 1136) already running
10-03-11 2:07:42 PM com.bitnami-redmine.services1154 /Applications/redmine-0.9.2-0/subversion/scripts/ctl.sh : subversion (pid 1149) already running
10-03-11 2:07:42 PM com.bitnami-redmine.services1189 100311 14:07:42 mysqld_safe Logging to ‘/Applications/redmine-0.9.2-0/mysql/data/mysqld.log’.
10-03-11 2:07:42 PM com.apple.launchd1 (0×302ec0.anonymous.nohup1276) Bug: launchd_core
logic.c:8250 (23932):0
10-03-11 2:07:42 PM com.apple.launchd1 (0×302ec0.anonymous.nohup1276) Switching sessions is not allowed in the system Mach bootstrap.
10-03-11 2:07:42 PM com.apple.launchd1 (0×302ec0.anonymous.nohup1276) vprocmgr_switch_to_session(): kr = 0×44c
10-03-11 2:07:42 PM com.apple.launchd1 (0×302ec0.anonymous.nohup1277) Bug: launchd_core
logic.c:8250 (23932):0
10-03-11 2:07:42 PM com.apple.launchd1 (0×302ec0.anonymous.nohup1277) Switching sessions is not allowed in the system Mach bootstrap.
10-03-11 2:07:42 PM com.apple.launchd1 (0×302ec0.anonymous.nohup1277) vprocmgr_switch_to_session(): kr = 0×44c
10-03-11 2:07:42 PM com.bitnami-redmine.services1189 100311 14:07:42 mysqld
safe Starting mysqld.bin daemon with databases from /Applications/redmine-0.9.2-0/mysql/data
10-03-11 2:07:45 PM com.bitnami-redmine.services1189 /Applications/redmine-0.9.2-0/mysql/scripts/ctl.sh : mysql started at port 4096

Any suggestions on how to the fix this problem?

Thanks again

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

The problem is that OS X services should be daemon process and ctlscript.sh is not a daemon script. When the script finishes, all process are killed. Try to create a different plist for MySQL like I wrote in this post http://bitnami.org/forums/forums/redmine/topics…

You can also create other plist files for apache “ctlscript.sh start apache” or for Ruby On Rails mongrel servers “ctlscript.sh start redmine”.

I hope it helps.

Forums Redmine