Jboss Stop Issue

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Jboss Stop Issue
# 1  
Old 07-21-2011
Jboss Stop Issue

Hello Everybody,

I have recently setup a Jboss-4.2.3 server in a RHEL machine.I copied the "/etc/init.d/jboss" script from another Jboss server and added the same to chkconfig.
When i run - "service jboss start" - the Jboss server starts fine.
However when i run - "service jboss stop" - it reyurns the following error - "No JBossas is currently running".

I debugged the jboss script and found that the script is not able to get the pid of run.sh and hence returning above error.

Code:
 
[root@jboss-dev1 init.d]# sh -x /etc/init.d/jboss stop
+ JBOSS_HOME=/usr/local/jboss/jboss-4.2.3.GA
+ JBOSS_USER=hpinadmin
+ JAVAPTH=/usr/local/jdk/jdk1.6.0_18
+ JBOSS_CONF=all
+ JBOSS_BIND_ADDR='-b 16.181.233.224'
+ JBOSSSH='/usr/local/jboss/jboss-4.2.3.GA/bin/run.sh -c all -b 16.181.233.224'
+ '[' hpinadmin = RUNASIS ']'
+ SUBIT='su - hpinadmin -c '
+ '[' -n '' -a '!' -d '' ']'
+ '[' -n '' -a '!' -f '' ']'
+ JBOSS_CONSOLE=/dev/null
+ JBOSS_CMD_START='cd /usr/local/jboss/jboss-4.2.3.GA/bin; /usr/local/jboss/jboss-4.2.3.GA/bin/run.sh -c all -b 16.181.233.224'
++ grep /usr/local/jdk/jdk1.6.0_18
++ echo /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
+ '[' -z '' ']'
+ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/jdk/jdk1.6.0_18
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/jdk/jdk1.6.0_18
+ '[' '!' -d /usr/local/jboss/jboss-4.2.3.GA ']'
+ case "$1" in
+ stop
+ pid=0
+ procrunning
+ procid=0
++ sed 's/\//\\\//g'
++ awk '{print $1}'
++ echo /usr/local/jboss/jboss-4.2.3.GA/bin/run.sh -c all -b 16.181.233.224
+ JBOSSSCRIPT='\/usr\/local\/jboss\/jboss-4.2.3.GA\/bin\/run.sh'
++ /sbin/pidof -x '\/usr\/local\/jboss\/jboss-4.2.3.GA\/bin\/run.sh'
+ '[' 0 = 0 ']'
+ echo -n -e '\nNo JBossas is currently running\n'
No JBossas is currently running
+ exit 1

I manually ran the pidof command and found it working fine. attached is the output:

Code:
 
[root@jboss-dev1 init.d]# /sbin/pidof -x '\/usr\/local\/jboss\/jboss-4.2.3.GA\/bin\/run.sh'
[root@jboss-dev1 init.d]# pidof -x /usr/local/jboss/jboss-4.2.3.GA/bin/run.sh
11847

This is pretty strange and i am not able to make anything out of above.

Any inputs is appreciated.

Thanks
HG
# 2  
Old 10-28-2011
#JBOSSSCRIPT=$(echo $JBOSSSH | awk '{print $1}' | sed 's/\//\\\//g')
JBOSSSCRIPT=$(echo $JBOSSSH | awk '{print $1}')
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

Starting Web Application on Jboss

Hello, I installed Jboss EAP 6 on a remote Linux server in standalone mode, and deployed a HelloWorld war file successfully. Opened a browser on my PC and pointed to http://127.0.0.1:8080/filename. I can see “Hello World!” on my browser. However, if the browser points to http://server's... (3 Replies)
Discussion started by: learnix
3 Replies

2. Shell Programming and Scripting

JBOSS process quits on shell exit

I decided to add this here as it's related to bash (IMHO) and not necessarily to JBOSS. The problem started happening a few weeks ago on some of the test systems that I have. When I exit my shell (putty) it hangs forcing me to close the window, which then also stops the JBOSS server. I did not... (7 Replies)
Discussion started by: victorbrca
7 Replies

3. Shell Programming and Scripting

Recycle Jboss server script

Hello, I need help writing a script to restart our Jboss server when it crashes. I am not very good with scripting but here is the basics. 1) I'm hoping to use KornShell 2) The command to stop the Jboss is "/var/opt/HP/ALM/jboss/bin/run.sh stop" 3) I want to verify the jboss is stopped before... (1 Reply)
Discussion started by: Blogger11
1 Replies

4. Shell Programming and Scripting

Single Startup script for Apache/jboss

Hi, I have apache ,jboss and jon instances on various linux boxes.I need to create a generic startup script to restart those instances on server reboot.The script requirement is : It should take the name of instances from one text file named active-servers and recycle those instances. 1.... (6 Replies)
Discussion started by: saurau
6 Replies

5. Red Hat

How to get jboss pid?

I am writing SSH (actually Python via SSH) commandline to get jboss PID from a remote machine (Redhat), how can I do it? I usually have the patten like: run('some_linux_command') What should be 'some_linux_comand' be here? I also tried a shell script (I found in internet) local on... (3 Replies)
Discussion started by: pbsdis
3 Replies

6. AIX

Installing jboss on aix

Hi, anybody knows how to configure and install jboss on aix. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

7. AIX

Creating startup service for JBoss

Hello Friends, Does anyone know how to create a startup script for Jboss on IBM AIX 5.3? Please help me, I'd be highly grateful to you... Thanks & Regards, Vinit (0 Replies)
Discussion started by: vpatil6688
0 Replies

8. Red Hat

JBoss Application Server 5 CR1 available

The first candidate release (CR1) for JBoss Application Server 5 has been released. There is a lot of good background from Sacha Labourey and feature details from project lead Dimitris Andreadis. Now that version 5 of the new application server has been through alpha and beta stages, this... (0 Replies)
Discussion started by: Linux Bot
0 Replies

9. UNIX for Advanced & Expert Users

jboss and websphere monitoring scripts for hobbit

HI, A very good morning.... i need extensions/plugins for monitoring jboss and websphere for hobbit.. kindly if any one has the ext. or associated scripts pls send me the script or the link from where i can download the scripts(and any dependency for those scripts). Await ur reply.. ... (0 Replies)
Discussion started by: suvra
0 Replies

10. UNIX for Advanced & Expert Users

how to stop others users to stop viewing what i am doing ?

Hi , I have one question, suppose i am a normal user and when i use 'w' command , it shows who is logged on and what they are doing . Now i want to stop others users to know what i am doing accept the root ? can i do this ? thanks (5 Replies)
Discussion started by: mobile01
5 Replies
Login or Register to Ask a Question