Sponsored Content
Full Discussion: Jboss Stop Issue
Special Forums UNIX and Linux Applications Jboss Stop Issue Post 302540521 by Hari_Ganesh on Thursday 21st of July 2011 02:37:45 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/ksh93 /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/ksh93 /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/sfw/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. NOTES
Restricted shells should not be listed in /etc/shells. SunOS 5.11 1 Nov 2007 getusershell(3C)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy