users@glassfish.java.net

Glassfish and Apache could not start automatically on reboot Suse Linux 10.

From: <glassfish_at_javadesktop.org>
Date: Mon, 21 Jul 2008 08:26:49 PDT

Dear All

We have a problem when rebooting our SUSE Linux Enterprise 10.2.

The Glassfish (glassfish-installer-v2ur1-b09d-linux-ml) and the apache (httpd-2.2.8) could not start.

We have configured a glassfish script in the init.d directory with following content:

[b]#! /bin/bash

source /etc/profile.local

GLASSFISHPATH=$GLASSFISH_HOME/bin

case "$1" in
start)
echo "starting glassfish from $GLASSFISHPATH"
sudo -u fdmnet sh -c "source /etc/profile.local; $GLASSFISHPATH/asadmin start-database"
sudo -u fdmnet sh -c "source /etc/profile.local; $GLASSFISHPATH/asadmin start-domain"
#sudo -u fdmnet $GLASSFISHPATH/asadmin start-database
#$GLASSFISHPATH/asadmin start-domain domain1
;;
restart)
$0 stop
$0 start
;;
stop)
echo "stopping glassfish from $GLASSFISHPATH"
sudo -u fdmnet $GLASSFISHPATH/asadmin stop-domain
sudo -u fdmnet $GLASSFISHPATH/asadmin stop-database
#$GLASSFISHPATH/asadmin stop-domain domain1
;;
*)
echo $”usage: $0 {start|stop|restart}”
exit 3
;;
esac
:[/b]

and an apache skript in the init.d awith the following content:

[b]#! /bin/bash
#
# apache Start the apache HTTP server
#

NAME=apache
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/apache2/bin
PIDFILE=/usr/local/apache2/var/$NAME.pid
CONF=/usr/local/apache2/conf/httpd.conf
APACHECTL=/usr/local/apache2/bin/apachectl

trap "" 1
export LANG=C

test -f $APACHECTL || exit 0

case "$1" in
  start)
    echo -ne "Starting web server: $NAME.\n"
    $APACHECTL start
    ;;

  stop)
    echo -ne "Stopping web server: $NAME.\n"
    $APACHECTL stop
    ;;
    
  reload)
    echo -ne "Reloading $NAME configuration.\n"
    $APACHECTL graceful
    ;;

  reload-modules)
    echo -ne "Reloading $NAME modules.\n"
    if [ -f $PIDFILE ]
    then
      $APACHECTL stop
      sleep 4
    fi
    $APACHECTL start
    ;;

  restart)
    $0 reload-modules
    ;;

  force-reload)
    $0 reload-modules
    ;;

  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|reload|reload-modules|force-reload|restart}"
    exit 1
    ;;

esac

exit 0
[/b]

The Skripts are timed:
K09glassfish
K10apache
S12apache
S13glassfish

The attached files are the logs from the glassfish and the apache.

Could you have an idea where the problem could be?

If we run the two skripts manually when the server is already running, they work withot any exeptions.

Do we have any missing variables?

I need help!
[Message sent by forum member 'larsstrahm' (larsstrahm)]

http://forums.java.net/jive/thread.jspa?messageID=288093