Mikel Vadillo [
https://community.jboss.org/people/mikelvadillo] created the discussion
"Init script of jboss 4.2.3 GA - jdk6 for Debian 7"
To view the discussion, visit:
https://community.jboss.org/message/820557#820557
--------------------------------------------------------------
Hi all, ultra noob mega newbie here.
I'm an student of Informatics Ingeniering in the university of Basque Country, Spain.
For my last year project i'm trying to make work a server with OpenACS (
http://sourceforge.net/projects/openacs/ http://sourceforge.net/projects/openacs/) in a
Debian 7 distribution with many routers. This opensource web service goes over Jboss
(author recomends 4.2.x versions) and at least i have managed to configure almost all.
I'm glad because is my first contact with this and it is very interesting.
My only problem is to use a good init script to use with Debian 7. I have composed one,
using several i have found over internet and mixing them. Finally it works, it seems to my
noob eyes, fine. This is the script:
| #!/bin/sh
### BEGIN INIT INFO
# Provides: jboss
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop JBoss AS v7.0.0
### END INIT INFO
JBOSS_HOME=/opt/jboss
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-i386
#JBOSS_BIND_ADDR="-b 192.168.1.205"
#configuration to use, usually one of 'minimal', 'default', 'all'
#JBOSS_CONF=${JBOSS_CONF:-"default"}
export JAVA_HOME
export JBOSS_HOME
EXEC=${JBOSS_HOME}/bin/run.sh
#JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -b 192.168.1.205"}
#define the script to use to start jboss
#JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF"}
do_start(){
start-stop-daemon --start --chuid jboss --user jboss --name jboss -b --exec
${EXEC}
}
do_stop(){
start-stop-daemon --stop -u jboss
rm -f ${PIDFILE}
}
case "$1" in
start)
echo "Starting JBoss 4.2.3"
do_start
;;
stop)
echo "Stopping JBoss 4.2.3"
do_stop
;;
restart)
echo "Restarting JBoss 4.2.3"
do_stop
sleep 20
do_start
;;
*)
echo "Usage: /etc/init.d/jboss4.2.3 {start|stop|restart}"
exit 1
;;
esac |
My problem is the ip binding. Untill now i have been starting Jboss through console
using:
cd /opt/jboss/bin
./run.sh -b 192.168.1.205
but now what i get with this script is the web only working in localhost as URL.
I have read many articles in the internet about this but i can't make it work. As you
can see in the script, there are several tryes i have done in commented lines but none of
them have worked well.
I have even tryed to add this two things (not at the same time) in the
/opt/jboss/bin/run.conf file:
-Dbind.address=192.168.1.205
-Djgroups.bind_addr=192.168.1.205
But it's not worth it.
Any ideas?
Perhaps, due to my poor english, you should have questions about what i have done or how
bad i have explained it....feel free to ask.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/820557#820557]
Start a new discussion in Beginner's Corner at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]