Bug 137027 - BEA Java Run Time Analyzer not working with jonas
BEA Java Run Time Analyzer not working with jonas
Status: CLOSED WORKSFORME
Product: Red Hat Application Server
Classification: Retired
Component: jonas (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Permaine Cheung
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-25 06:26 EDT by Bastien Nocera
Modified: 2007-04-18 13:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-26 16:32:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2004-10-25 06:26:50 EDT
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 13:52:31 EDT
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 05:44:31 EDT
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 16:32:19 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.