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
CHKCONFIG(8)						      System Manager's Manual						      CHKCONFIG(8)

NAME
chkconfig - updates and queries runlevel information for system services SYNOPSIS
chkconfig [--list] [--type type] [name] chkconfig --add name chkconfig --del name chkconfig --override name chkconfig [--level levels] [--type type] [--no-redirect] name <on|off|reset|resetpriorities> chkconfig [--level levels] [--type type] [--no-redirect] name DESCRIPTION
chkconfig provides a simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories. This implementation of chkconfig was inspired by the chkconfig command present in the IRIX operating system. Rather than maintaining con- figuration information outside of the /etc/rc[0-6].d hierarchy, however, this version directly manages the symlinks in /etc/rc[0-6].d. This leaves all of the configuration information regarding what services init starts in a single location. chkconfig has five distinct functions: adding new services for management, removing services from management, listing the current startup information for services, changing the startup information for services, and checking the startup state of a particular service. When chkconfig is run with only a service name, it checks to see if the service is configured to be started in the current runlevel. If it is, chkconfig returns true; otherwise it returns false. The --level option may be used to have chkconfig query an alternative runlevel rather than the current one. When chkconfig is run with the --list argument, or no arguments at all, a listing is displayed of all services and their current configura- tion. If one of on, off, reset, or resetpriorities is specified after the service name, chkconfig changes the startup information for the speci- fied service. The on and off flags cause the service to be started or stopped, respectively, in the runlevels being changed. The reset flag resets the on/off state for all runlevels for the service to whatever is specified in the init script in question, while the resetpri- orities flag resets the start/stop priorities for the service to whatever is specified in the init script. By default, the on and off options affect only runlevels 2, 3, 4, and 5, while reset and resetpriorities affects all of the runlevels. The --level option may be used to specify which runlevels are affected. Note that for every service, each runlevel has either a start script or a stop script. When switching runlevels, init will not re-start an already-started service, and will not re-stop a service that is not running. chkconfig also can manage xinetd scripts via the means of xinetd.d configuration files. Note that only the on, off, and --list commands are supported for xinetd.d services. chkconfig supports a --type argument to limit actions to only a specific type of services, in the case where services of either type may share a name. Possible values for type are sysv and xinetd. OPTIONS
--level levels Specifies the run levels an operation should pertain to. It is given as a string of numbers from 0 to 6. For example, --level 35 specifies runlevels 3 and 5. --no-redirect When chkconfig is run on a system that uses systemd as its init system, chkconfig will forward commands to systemd if a systemd ser- vice file exists for it. This switch turns off the redirection to systemd and only operates on the symlinks in /etc/rc[0-6].d. This option is only valid when on, off, or no command (to check enablement) is passed to a service. --add name This option adds a new service for management by chkconfig. When a new service is added, chkconfig ensures that the service has either a start or a kill entry in every runlevel. If any runlevel is missing such an entry, chkconfig creates the appropriate entry as specified by the default values in the init script. Note that default entries in LSB-delimited 'INIT INFO' sections take prece- dence over the default runlevels in the initscript; if any Required-Start or Required-Stop entries are present, the start and stop priorities of the script will be adjusted to account for these dependencies. --del name The service is removed from chkconfig management, and any symbolic links in /etc/rc[0-6].d which pertain to it are removed. Note that future package installs for this service may run chkconfig --add, which will re-add such links. To disable a service, run chkconfig name off. --override name If service name is configured exactly as it would be if the --add option had been specified with no override file in /etc/chkcon- fig.d/name, and if /etc/chkconfig.d/name now exists and is specified differently from the base initscript, change the configuration for service name to follow the overrides instead of the base configuration. --list name This option lists all of the services which chkconfig knows about, and whether they are stopped or started in each runlevel. If name is specified, information in only display about service name. RUNLEVEL FILES
Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chkconfig what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash continuation. For example, random.init has these three lines: # chkconfig: 2345 20 80 # description: Saves and restores system entropy pool for # higher quality random number generation. This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop prior- ity should be 80. You should be able to figure out what the description says; the causes the line to be continued. The extra space in front of the line is ignored. chkconfig also supports LSB-style init stanzas, and will apply them in preference to "chkconfig:" lines where available. A LSB stanza looks like: ### BEGIN INIT INFO # Provides: foo # Required-Start: bar # Defalt-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Foo init script ### END INIT INFO In this case, the start priority of "foo" would be changed such that it is higher than the "bar" start priority, if "bar" is enabled. Care must be taken when adding dependencies, as they can cause vast shifts in the start and stop priorities of many scripts. OVERRIDE FILES
File in /etc/chkconfig.d/servicename are parsed using the same comments that chkconfig notices in init service scripts, and override values in the init service scripts themselves. SEE ALSO
init(8) ntsysv(8) system-config-services(8) AUTHOR
Erik Troan <ewt@redhat.com> 4th Berkeley Distribution Wed Oct 8 1997 CHKCONFIG(8)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy