Bug 137027

Summary: BEA Java Run Time Analyzer not working with jonas
Product: [Retired] Red Hat Application Server Reporter: Bastien Nocera <bnocera>
Component: jonasAssignee: Permaine Cheung <pcheung>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: dzickus, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-26 20:32:19 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 Bastien Nocera 2004-10-25 10:26:50 UTC
Description of problem:
the JRA doesn't work, and comes back with error message:
[JRockit] New Management Server connection from host-41.support.localnet
[JRockit] Error opening JRA recording file: jrarecording.xml
Recording canceled.

Version-Release number of selected component (if applicable):
jonas-4.1.2-1jpp_14rh
java-1.4.2-bea-1.4.2.04-1jpp_11rh

How reproducible:
Every time

Steps to Reproduce:
1. Launch jonas with the java options "-Xmanagement"
2. On the console, launch /usr/lib/jvm/java-1.4.2-bea-1.4.2.04/bin/console
3. and try to connect 
  
Actual results:
Error message that it can't write to the log file

Expected results:
It can write the log file

The problem is because JRockit will try to write to the $CWD of the
jonas process rather than its home directory. Jonas should cwd to its
home directory better starting:
$ ls -ld /proc/`pidof java`/cwd
lrwxrwxrwx    1 jonas    jonas           0 Oct 25 11:29 /proc/3053/cwd
-> /root

Comment 1 Permaine Cheung 2004-10-25 17:52:31 UTC
Could you please specify how jonas is launched, and how/where the java
options "-Xmanagement" is specified?

RHAPS comes with a service script, and the recommended way to start
jonas is by using the service script, eg. service jonas start. To
specify the -Xmanagement option when starting jonas with the service
script, we would recommend adding the option in the /etc/sysconfig/jonas.

I've tried the above setting and it seems to be working fine.

Comment 3 Bastien Nocera 2004-10-26 09:44:31 UTC
The problem isn't with the way Jonas is started per se. The problem is
that the JVM will have a non-writable cwd, and that BEA JRockit is
very stupid and uses that cwd as a temp directory.
Adding a "cd /usr/share/jonas/work" in the init script before
jonas/the JVM is launched should be enough to allow jonas to write to
its current dir.

Comment 4 Permaine Cheung 2004-10-26 20:32:19 UTC
When using the BEA Java Run Time Analyzer to do JRA recording, there's
an option to specify where the file goes in the JRA Recording dialog,
by specifying /tmp/jrarecording.xml, the recording will go fine.

Comment 5 Don Zickus 2016-11-14 17:12:24 UTC
Hi,

A package has been built with a fix.  Please test the package at the
below link and see if that solves your issue.

http://people.redhat.com/dzickus/rhel7/.rts5227_831e5d3/

Cheers,
Don

Comment 6 Don Zickus 2016-11-14 17:13:36 UTC
Gah, wrong bz.  I apologize for that.

Cheers,
Don