<!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;">
    Urgently need your help to resolve the following issue
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/karthik_pasc">Karthikeyan S</a> in <i>Beginner's Corner</i> - <a href="https://community.jboss.org/message/787802#787802">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: Arial, sans-serif;"> i used the following script for add the jboss service in my server we are using CentOS 5.6.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';">#!/bin/sh<br/> #<br/> # JBoss Control Script<br/> #<br/> # chkconfig: 3 80 20<br/> # description: JBoss EJB Container<br/> # <br/> # To use this script<br/> # run it as root - it will switch to the specified user<br/> # It loses all console output - use the log.<br/> #<br/> # Here is a little (and extremely primitive) <br/> # startup/shutdown script for RedHat systems. It assumes <br/> # that JBoss lives in /usr/local/jboss, it's run by user <br/> # 'jboss' and JDK binaries are in /usr/local/jdk/bin. All <br/> # this can be changed in the script itself. <br/> # Bojan <br/> #<br/> # Either amend this script for your requirements<br/> # or just ensure that the following variables are set correctly <br/> # before calling the script<br/> <br/> # [ #420297 ] JBoss startup/shutdown for RedHat<br/> <br/> #define where jboss is - this is the directory containing directories log, bin, conf etc<br/> JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss-4.0.2"}<br/> <br/> #make java is on your path<br/> JAVAPTH=${JAVAPTH:-"/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin"}<br/> <br/> #define the classpath for the shutdown class<br/> JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}<br/> <br/> #define the script to use to start jboss<br/> JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c all"}<br/> <br/> if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then<br/> # ensure the file exists<br/> touch $JBOSS_CONSOLE<br/> fi<br/> <br/> if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then<br/> echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"<br/> echo "WARNING: ignoring it and using /dev/null"<br/> JBOSS_CONSOLE="/dev/null"<br/> fi<br/> <br/> #define what will be done with the console log<br/> JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}<br/> <br/> #define the user under which jboss will run, or use RUNASIS to run as the current user<br/> JBOSSUS=${JBOSSUS:-"root"}<br/> <br/> CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH" <br/> CMD_STOP="java -classpath $JBOSSCP org.jboss.Shutdown --shutdown"<br/> <br/> if [ "$JBOSSUS" = "RUNASIS" ]; then<br/> SUBIT=""<br/> else<br/> SUBIT="su - $JBOSSUS -c "<br/> fi<br/> <br/> if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then<br/> export PATH=$PATH:$JAVAPTH<br/> fi<br/> <br/> if [ ! -d "$JBOSS_HOME" ]; then<br/> echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME<br/> exit 1<br/> fi<br/> <br/> <br/> echo CMD_START = $CMD_START<br/> <br/> <br/> case "$1" in<br/> start)<br/> cd $JBOSS_HOME/bin<br/> if [ -z "$SUBIT" ]; then<br/> eval $CMD_START &gt;${JBOSS_CONSOLE} 2&gt;&amp;1 &amp;<br/> else<br/> $SUBIT "$CMD_START &gt;${JBOSS_CONSOLE} 2&gt;&amp;1 &amp;" <br/> fi<br/> ;;<br/> stop)<br/> if [ -z "$SUBIT" ]; then<br/> $CMD_STOP<br/> else<br/> $SUBIT "$CMD_STOP"<br/> fi <br/> ;;<br/> restart)<br/> $0 stop<br/> $0 start<br/> ;;<br/> *)<br/> echo "usage: $0 (start|stop|restart|help)"<br/> esac<br/> <br/> <br/><strong style="font-size: 12pt;"> this was the default script given by jboss</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';">i add the new file in <span style="font-size: 12pt;"><strong>/etc/init.d</strong></span> file. the file name is jboss and copied the above mentioned script in this file with execute permission</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';">i added this service permanetly use <span style="font-size: 12pt;"><strong>chkconfig --add jboss</strong></span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';">fine now i start my service.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 12pt;"><strong style="font-family: 'Courier New';">#service jboss start </strong><span style="font-family: 'Courier New'; font-size: 10pt;">after start my service it show like this</span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><strong style="font-size: 10pt; font-family: 'Courier New';">CMD_START = cd /opt/jboss-4.0.2/bin; /opt/jboss-4.0.2/bin/run.sh</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';">after start my service i moved to log file and execute the following command it shows the folling log information</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="font-size: 12pt;"><strong>[root@localhost log]# tail -f server.log</strong></span> <br/> <br/> 2013-01-05 02:53:46,107 DEBUG [org.jboss.system.ServiceController] no need to remove jboss.web.deployment:war=invoker.war,id=-2059061738 from server<br/> 2013-01-05 02:53:46,107 DEBUG [org.jboss.system.ServiceController] removing service: jboss.system:service=ServiceDeployer<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.ServiceController] removing jboss.system:service=ServiceDeployer from server<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.ServiceController] removing service: jboss.system:service=JARDeployer<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.ServiceController] removing jboss.system:service=JARDeployer from server<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.ServiceController] removing service: jboss.system:service=MainDeployer<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.ServiceController] removing jboss.system:service=MainDeployer from server<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.ServiceController] Stopped 9 services<br/> 2013-01-05 02:53:46,108 DEBUG [org.jboss.system.server.Server] Deleting server tmp/deploy directory<br/> 2013-01-05 02:53:46,109 INFO [org.jboss.system.server.Server] Shutdown complete<br/> </span></p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';"><br/></span></p><p style="margin-bottom: .0001pt;"><span style="font-size: 10pt; font-family: 'Courier New';">please help me to solve the issue</span></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/787802#787802">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>