This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Getting resin to start at bootup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Getting resin to start at bootup" Watch "Getting resin to start at bootup" New topic

Getting resin to start at bootup

Scott Glaser

Joined: Jan 20, 2003
Posts: 10
It seems I'm unable to get resin-2.1.6 to start at bootup on my 2.4.7-10 RH Linux box when I add /etc/init.d/resin and link /etc/rc5.d/S85resin to it. But it works after I boot up and run "/etc/init.d/resin start" on the command line. Anyone have suggestions?
/etc/init.d/resin script contains:
# Linux startup script for Resin
# chkconfig: 345 85 15
# description: Resin is a Java Web server.
# processname:
# To install, configure this file as needed and copy init.resin
# to /etc/rc.d/init.d as resin. Then use "# /sbin/chkconfig resin reset"
# If you want to start the entire Resin process as a different user,
# set this to the user name. If you need to bind to a protected port,
# e.g. port 80, you can't use USER, but will need to use bin/resin.
# You can change this to $RESIN_HOME/bin/resin if you need Resin to
# bind to port 80, but run as a different user.
# Sets the commandline arguments.
ARGS="-java_home $JAVA_HOME -resin_home $RESIN_HOME -server_root $SERVER_ROOT"
case "$1" in
echo -n "Starting resin: "
if test -n "$USER"; then
su $USER -c "$EXE -pid $PID start $ARGS"
$EXE -pid $PID start $ARGS
echo -n "Shutting down resin: "
$EXE -pid $PID stop
rm -f $PID
$0 stop
$0 start
echo "Usage: $0 {start|stop|restart}"
exit 1
exit 0
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
This looks like a user-priveleges issue. My guess would be that the default user ("nobody", maybe) used to invoke the init scripts at startup time does not have some privelege or setting required to run the server.
Try using "su" to change your shell to the user used for starting init scripts rather than your own user, then try the script again.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
jQuery in Action, 2nd edition
subject: Getting resin to start at bootup
Similar Threads
how to redirect from apache to tomcat..?
Java SocketServer running as a Linux Service .exec() question
Installation Guide (Tomcat on Linux)
error starting up 2nd instance of tomcat
how to execute thread on linux web server?