Unable to start JBoss when the JBoss group name is different from the user name

Solution Verified - Updated -

Issue

When starting JBoss, the startup scripts check if the jboss group exists but the test is incorrect.
It works "by chance" most of the time because the jboss user and the jboss group usually have the same name, but fails when they are different.

if [ -z "`id -g $JBOSS_GROUP 2>/dev/null`" ]; then
   failure "${NAME} startup"
   echo -n -e "\nGroup $JBOSS_GROUP does not exist. Create group first."
   echo -n -e "\n"
   return 3
fi

Instead, it should perform something like this :

if [ "`id -gn $JBOSS_USER 2>/dev/null`" = $JBOSS_GROUP ]; then

This affect both domain and standalone startup scripts:
/etc/init.d/jbossas
/etc/init.d/jbossas-domain

Environment

Red Hat JBoss Enterprise Application Platform 6.2.0 rpm installation only

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content