-
1. Re: Check the correctness of jbossesb.spec and jbossesb.init
goldmann Nov 2, 2010 4:48 AM (in response to ingedeut)Spec file looks pretty good.
You need to build it and test it - there is no other way to be sure if the package is ok. Install it on vm or somewhere and execute start/stop methods for esb init script. This will show you if everything works.
--Marek
-
2. Re: Check the correctness of jbossesb.spec and jbossesb.init
ingedeut Nov 2, 2010 5:06 AM (in response to goldmann)Thanks Marek,
What do you mean with vm please ? is this VMare?
how to execute start/stop methods? With which command?
Thanks
Younes
-
3. Re: Check the correctness of jbossesb.spec and jbossesb.init
goldmann Nov 2, 2010 5:07 AM (in response to ingedeut)Virtual machine.
service jboss-esb start or /etc/init.d/jboss-esb start
--Marek
-
4. Re: Check the correctness of jbossesb.spec and jbossesb.init
ingedeut Nov 6, 2010 11:52 AM (in response to goldmann)Thanks Marek,
i have test the RPM in a VMWare Virtuelle Machine and it works fine, but when installing it in an EC2 AMI the following issue is appeared:
JBoss ESB comes with its own jUDDI Registry which will be need to register the EPR (EndPointReference) of each registred service. The problem is when starting JBoss AS, the EPR of service are added to the database associated with jUDDI but when shutting down the EC2 Instance in which the AMI runs, the EPR still existing in the database which is wrong.
These problem are not occured when testing with VMWare Virtuelle Machine. (EPR added normally when startin JBoss AS and then deleted normally when shutting down the service).
Can you please help me? Do you have any idea?
Thanks
younes
-
5. Re: Check the correctness of jbossesb.spec and jbossesb.init
goldmann Nov 8, 2010 4:40 AM (in response to ingedeut)Most probably your init script is not shutting down JBoss AS properly and AWS kills it. Check console log – maybe there you'll find some pointers.
--Marek
-
6. Re: Check the correctness of jbossesb.spec and jbossesb.init
ingedeut Nov 13, 2010 2:08 PM (in response to goldmann)Thanks Marek,
the stop function is like this:
stop() { echo -n $"Stopping ${NAME}: " pid=0 procrunning if [ $pid = '0' ]; then failure $"${NAME} shutdown" echo -n -e "\nNo JBossas is currently running\n" if [ -f $JBOSSLOCK ]; then rm -f $JBOSSLOCK fi if [ -f $JBOSSPID ]; then rm -f $JBOSSPID fi return 1 fi pid=0 RETVAL=1 procrunning # If process is still running # First, try to kill it nicely if [ $RETVAL != 0 ] ; then for id in `ps --ppid $pid | awk '{print $1}' | grep -v "^PID$"`; do $SUBIT "kill -15 $id" 2>/dev/null done sleep=0 while [ $sleep -lt $JBOSS_STOP_TIMEOUT -a $RETVAL -eq 1 ]; do sleep 5 sleep=`expr $sleep + 5` pid=0 procrunning if [ $pid == '0' ]; then RETVAL=0 fi done fi # Still not dead... notify user count=0 pid=0 procrunning if [ $pid != '0' ] ; then jboss_java_pid=`ps --ppid $pid | grep java | awk '{print $1}'` echo -e "\nTimeout: Shutdown command was sent, but process is still running with PID $jboss_java_pid" failure $"${NAME} shutdown" else rm -f /var/lock/subsys/${NAME} if [ -r /etc/rc.d/init.d/functions ]; then success $"${NAME} shutdown" fi fi echo [ $RETVAL -eq 0 ] && rm -f $JBOSSLOCK $JBOSSPID return $RETVAL }
$JBOSSLOCKfiif [ -f $JBOSSPID ]; thenrm -f $JBOSSPIDfireturn 1fipid=0RETVAL=1procrunning# If process is still running# First, try to kill it nicelyif [ $RETVAL != 0 ] ; thenfor id in `ps --ppid $pid | awk '{print $1}' | grep -v "^PID$"`; do$SUBIT "kill -15 $id" 2>/dev/nulldonesleep=0while [ $sleep -lt $JBOSS_STOP_TIMEOUT -a $RETVAL -eq 1 ]; dosleep 5sleep=`expr $sleep + 5`pid=0procrunningif [ $pid == '0' ]; thenRETVAL=0fidonefi# Still not dead... notify usercount=0pid=0procrunningif [ $pid != '0' ] ; thenjboss_java_pid=`ps --ppid $pid | grep java | awk '{print $1}'`echo -e "\nTimeout: Shutdown command was sent, but process is still running with PID $jboss_java_pid"failure $"${NAME} shutdown"elserm -f /var/lock/subsys/${NAME}if [ -r /etc/rc.d/init.d/functions ]; thensuccess $"${NAME} shutdown"fifiecho[ $RETVAL -eq 0 ] && rm -f $JBOSSLOCK $JBOSSPIDreturn $RETVAL}when shtting down this Info is shown:
13:51:29,299 INFO [Server] Runtime shutdown hook called, forceHalt: true 13:51:29,305 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
can you please check the jbossesb.init and jbossesb.spec. I can't find the error causing this problem.
--regards
younes
-
jboss-boot.log.zip 12.4 KB
-
jbossesb.spec.zip 861 bytes
-
jbossesb.init.zip 4.2 KB
-
-
7. Re: Check the correctness of jbossesb.spec and jbossesb.init
ingedeut Nov 19, 2010 1:27 PM (in response to ingedeut)Hello Marek,
i have used the same .init like this for jboss-as6.init using in CirrAS, but i still have the same problem when shutting down the JBoss AS server, the EPR are not deleting from the juddidb. When testing the same jbossesb.rpm with VMware Machine it works without error (EPR are deleting form database when shutting down the JBoss AS). Is there any additional Package that must be added to the jbossesb.appl file? Please help me . It's urgent!
Thanks in advance
--Regards
Younes
-
jboss-as6.init.zip 4.6 KB
-
jbossesb.appl.zip 336 bytes
-
f13-basic.appl.zip 343 bytes
-
log.zip 389.7 KB
-
-
8. Re: Check the correctness of jbossesb.spec and jbossesb.init
greyfairer2 Dec 14, 2010 11:49 AM (in response to ingedeut)Hi Younes,
You might want to call the shutdown.sh script to shut down, before you try to kill -15.
In the JBoss-RPM Google Code project, there is a 'stop' and a 'force-stop' command.
The force-stop goes for the kill, but the normal stop calls the Shutdown class, like the shutdown.sh script.
See e.g. http://code.google.com/p/jboss-rpm/source/browse/#svn/trunk/src/main/etc/init.d