• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting resin to start at bootup

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
Thanks,
Scott
/etc/init.d/resin script contains:
#!/bin/sh
#
# Linux startup script for Resin
#
# chkconfig: 345 85 15
# description: Resin is a Java Web server.
# processname: wrapper.pl
#
# 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"
#
JAVA_HOME=/usr/java
RESIN_HOME=/usr/local/resin
SERVER_ROOT=/usr/local/web
PID=$RESIN_HOME/resin.pid
#export JAVA_HOME RESIN_HOME
#
# 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.
#
USER=
#
# You can change this to $RESIN_HOME/bin/resin if you need Resin to
# bind to port 80, but run as a different user.
#
EXE=$RESIN_HOME/bin/httpd.sh
#
# Sets the commandline arguments.
#
ARGS="-java_home $JAVA_HOME -resin_home $RESIN_HOME -server_root $SERVER_ROOT"
case "$1" in
start)
echo -n "Starting resin: "
if test -n "$USER"; then
su $USER -c "$EXE -pid $PID start $ARGS"
else
$EXE -pid $PID start $ARGS
fi
echo
;;
stop)
echo -n "Shutting down resin: "
$EXE -pid $PID stop
echo
rm -f $PID
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic