Bug 175776

Summary: Jonas startup failure with fresh install of RHAPSV2U1 on a machine with SELinux enabled
Product: [Retired] Red Hat Application Server Reporter: Gregory Lapouchnian <glapouch>
Component: jonasAssignee: Fernando Nasser <fnasser>
Status: CLOSED EOL QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 2.0CC: dbhole
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 16:49:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gregory Lapouchnian 2005-12-14 21:03:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7

Description of problem:
After installing RHAPSv2u1 and trying to deploy olstore using jonasAdmin got this in the log:

2005-12-14 15:18:10,089 : Server.start : JOnAS server 'jonas' started on rmi/jrmp
/var/lib/jonas/apps/olstore.ear is using DTDs, WsGen needs Schema only : META-INF/application.xml use a DTD. Only XML Schema are accepted for J2EE 1.4 webservices
2005-12-14 15:19:03,391 : JContainer.addBean : Impossible to instanciate the entity factory: null
javax.ejb.EJBException: Unable to retrieve mapperName for jdbc_1
        at org.objectweb.jonas_ejb.container.JContainer.addBean(JContainer.java:347)


....


        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:570)
Caused by: java.io.FileNotFoundException: Cannot find properties for /usr/share/jonas/conf/mapper.properties
        at org.objectweb.jonas.common.JProp.readPropsFile(JProp.java:342)
        at org.objectweb.jonas.common.JProp.readFile(JProp.java:316)
        at org.objectweb.jonas.common.JProp.<init>(JProp.java:163)
        at org.objectweb.jonas.common.JProp.getInstance(JProp.java:216)
        at org.objectweb.jonas_ejb.container.JContainer.addBean(JContainer.java:344)
        ... 59 more

Problem is caused because the PQSQL .rars are missing including PostgreSQL1_DM.rar


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install RHAPSv2u1 using up2date
2. service rhdb-jonas start
3. service jonas start
4. go to jonasAdmin and try to deploy olstore.ear
  

Additional info:

Comment 1 Deepak Bhole 2005-12-14 23:04:22 UTC
This is not a consistently reproducable bug. If/when it does happen, it is on
machines with SELinux enabled.

It may show up during one install, and disappear if the install is attempted
again -- thus providing no consistent way to reproduce.

The cause of this seems to be the use of the "su" command. When SELinux is
enabled on a system, one should use "runuser" instead of "su" to perform
operations that require a user change. The "su" command is used in %post of the
jonas-examples RPM to create the appropriate Resource Adapter (.rar) for
accessing PostgreSQL.

WORKAROUND:
If this bug manifests itself, run the following command as root:

runuser - jonas -s /bin/sh -c "cd /usr/share/jonas/rars/autoload/; .
/usr/share/jonas/bin/unix/RAConfig -j jdbc_1 -dm -p
/usr/share/jonas/conf/PostgreSQL1 /usr/share/jonas/rars/autoload/JOnAS_jdbcDM
PostgreSQL1_DM"

This will re-create the PostgreSQL1_DM rar, allowing jonas to acccess the
example PostgreSQL database that is set up by the jonas-examples RPM.