This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

JBoss 6 EAP crash recovery

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm extremely new to Java and JBoss and need to find a solution for restarting crashed Jboss 6 EAP slaves (we use domain mode) on CentOS.

Background Question1
I found something called jsvc that is supposed to restart the slaves but our installation does not have it for some reason. with yum I was able to install apache-commons-daemon-jsvc but this did not seem to the thing that JBoss manual was describing?

Jboss 6 docs: 8.1.1. About Jsvc
Jsvc is a set of libraries and applications which allow Java applications run on UNIX and UNIX-like platforms as a background service. It allows an application to perform operations as a privileged user, and then switch identity to a non-privileged user. Jsvc uses three processes: a launcher process, a controller process and a controlled process. The controlled process is also the main Java thread. If the JVM crashes the controller process will restart it within 60 seconds. Jsvc is a daemon process and for JBoss EAP 6 it must be started by a privileged user.

Background Question2
Do I understand correctly that JBoss EAP 7 should do it automatically? As from the manual I see this description:

JBoss 7 manual: 8.1.3. About Process Controllers
A process controller is a small, lightweight process that is responsible for spawning the host controller process and monitoring its lifecycle. If the host controller crashes, the process controller will restart it. It also starts server processes as directed by the host controller; however, it will not automatically restart server processes that crash.

The most important Question3
I am now considering testing Monit and I also found something called  Java Service Wrapper
Does anybody have any experience with this or any other options or any suggestions on how to do it properly?

Posts: 21756
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Peeter!

I don't know enough about that mechanism to tell you what to do in strictly JBoss terms, but if you're runnin CentOS 7 or later, you might be running your JBoss instances via systemd. The systemd facility has the ability to detect dead processes and restart them if the resource is defined with the appropriate options. While it's trickier to do with Java, it's not impossible.
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!