<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Init script of jboss 4.2.3 GA - jdk6 for Debian 7
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/mikelvadillo">Mikel Vadillo</a> in <i>Beginner's Corner</i> - <a href="https://community.jboss.org/message/820557#820557">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi all, ultra noob mega newbie here.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm an student of Informatics Ingeniering in the university of Basque Country, Spain. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>For my last year project i'm trying to make work a server with OpenACS (</span><a class="jive-link-external-small" href="http://sourceforge.net/projects/openacs/" rel="nofollow" target="_blank">http://sourceforge.net/projects/openacs/</a><span>) 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.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"><tbody><tr><td style="border:1px solid black;border: 1px solid #000000;"><p>#!/bin/sh</p><p>### BEGIN INIT INFO</p><p># Provides: jboss</p><p># Required-Start: $local_fs $remote_fs $network $syslog</p><p># Required-Stop: $local_fs $remote_fs $network $syslog</p><p># Default-Start: 2 3 4 5</p><p># Default-Stop: 0 1 6</p><p># Short-Description: Start/Stop JBoss AS v7.0.0</p><p>### END INIT INFO</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>JBOSS_HOME=/opt/jboss</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-i386</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#JBOSS_BIND_ADDR="-b 192.168.1.205"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>#configuration to use, usually one of 'minimal', 'default', 'all'</p><p>#JBOSS_CONF=${JBOSS_CONF:-"default"}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>export JAVA_HOME</p><p>export JBOSS_HOME</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>EXEC=${JBOSS_HOME}/bin/run.sh</p><p>#JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -b 192.168.1.205"}</p><p>#define the script to use to start jboss</p><p>#JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF"}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>do_start(){&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; start-stop-daemon --start --chuid jboss --user jboss --name jboss -b --exec ${EXEC}</p><p>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>do_stop(){</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; start-stop-daemon --stop -u jboss</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; rm -f ${PIDFILE}</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>case "$1" in</p><p>&#160;&#160;&#160; start)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo "Starting JBoss 4.2.3"</p><p>&#160;&#160;&#160; do_start</p><p>&#160;&#160;&#160; ;;</p><p>&#160;&#160;&#160; stop)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo "Stopping JBoss 4.2.3"</p><p>&#160;&#160;&#160; do_stop</p><p>&#160;&#160;&#160; ;;</p><p>&#160;&#160;&#160; restart)</p><p>&#160;&#160;&#160; echo "Restarting JBoss 4.2.3"</p><p>&#160;&#160;&#160; do_stop</p><p>&#160;&#160;&#160; sleep 20</p><p>&#160;&#160;&#160; do_start</p><p>&#160;&#160;&#160; ;;</p><p>&#160;&#160;&#160; *)</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo "Usage: /etc/init.d/jboss4.2.3 {start|stop|restart}"</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; exit 1</p><p>&#160;&#160;&#160; ;;</p><p>esac</p></td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My problem is the ip binding. Untill now i have been starting Jboss through console using:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>cd /opt/jboss/bin</p><p>./run.sh -b 192.168.1.205</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>but now what i get with this script is the web only working in localhost as URL.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have even tryed to add this two things (not at the same time) in the /opt/jboss/bin/run.conf file:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>-Dbind.address=192.168.1.205</p><p>-Djgroups.bind_addr=192.168.1.205</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But it's not worth it. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any ideas?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in advance.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/820557#820557">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>