Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 899361 (JBEWS-390)

Summary: EWS doc: Add section "Monitoring EWS with JBoss Operating Network (JON)"
Product: [JBoss] JBoss Enterprise Web Server 1 Reporter: Ondřej Žižka <ozizka>
Component: unspecifiedAssignee: Eva Kopalova <ekopalov>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: EWS 1.0.2CC: ekopalov, mturk, ozizka, pcheung, rebecca.jboss
Target Milestone: ---   
Target Release: EWS 1.0.2   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEWS-390
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-23 19:03:18 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
JBPAPP-6089-reworded.patch
none
ch-Monitoring_with_JBoss_Operating_Network.xml none

Description Ondřej Žižka 2011-03-12 12:17:45 UTC
project_key: JBEWS

We support monitoring of EWS by JON.
This should be mentioned in EWS docs.
Either a description of how to set up JON to monitor EWS, or a link to such doc.

Special attention should be paid to filesystem privileges:
In the current EWS docs, httpd is advised to run under apache:apache, tomcat under tomcat:tomcat.
RHQ/JON agent needs to read/write the files under httpd/ and tomcat[56]/ dirs,
so user may need to handle this by creating groups or so.

# usermod -a -G tomcat rhq-agent-user
# usermod -a -G apache rhq-agent-user


http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/1.0/html-single/JBoss_EWS_Installation_Guide/index.html#sec-CSP-Running_T56

Comment 1 Jared MORGAN 2011-03-13 22:13:21 UTC
Hi Bec

This is one of your books, right?

Cheers

J

Comment 2 Rebecca Newton 2011-03-13 23:34:06 UTC
Hi Eva,

Could you please take a look at this and see if you can work it into the Installation Guide? Thanks!

Bec

Comment 3 Eva Kopalova 2011-03-17 18:08:07 UTC
Could you, please, provide me the information I need to add to the installation guide?
Thank you

Comment 5 Ondřej Žižka 2011-03-17 18:37:28 UTC
Paths to startup.sh:

Solaris:
/opt/redhat/ews/share/tomcat5/bin/startup.sh
/opt/redhat/ews/share/tomcat6/bin/startup.sh

RHEL zip - can be installed anywhere, so, $EWS_HOME/tomcat[5|6]/bin/startup.sh
RHEL RPM - I don't know, ask Ivo Studensky

Windows:
"c:\Program Files\Red Hat\Enterprise Web Server\share\tomcat5\bin\startup.sh"
"c:\Program Files\Red Hat\Enterprise Web Server\share\tomcat6\bin\startup.sh"

Maybe you could use $EWS_HOME for simplicity...



Comment 6 Ondřej Žižka 2011-03-17 18:43:29 UTC
As we discussed, let's make it a new chapter, 7, "Monitoring EWS by JON", and link it from the respective places like "See <chapter7> for information on how to monitor EWS by JON" or such.
Places to link would be respective Environment Config sections of all platforms.

The actual content would be similar to
http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/2.4/html/Basic_Admin_Guide/monitoring-resources-special-config.html#configuring-tomcat-for-discovery
only with an example for windows which has different syntax of adding properties to startup.bat .

Also a note - RHEL startup.sh already has this example inside, only commented out.
I filed a bug that the example should go to all platforms.
I think that this will be fulfilled, so you can mention this in this chapter.

Comment 7 Ondřej Žižka 2011-03-17 20:10:06 UTC
Windows syntax:

set JAVA_OPTS="%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9876"
set JAVA_OPTS="%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file=c:\jmx\jmxremote.access"
set JAVA_OPTS="%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file=c:\jmx\jmxremote.password"
set JAVA_OPTS="%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false"
set JAVA_OPTS="%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=false"


Comment 8 Ondřej Žižka 2011-03-17 20:11:01 UTC
I've requested adding sample JMX files to EWS.

Comment 9 Ondřej Žižka 2011-03-17 20:11:01 UTC
Link: Added: This issue is related to JBPAPP-6125


Comment 10 Ondřej Žižka 2011-03-17 21:11:54 UTC
Sun JMX doc: http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html

Comment 11 Eva Kopalova 2011-03-21 15:24:06 UTC
I need info on how to proceed in Windows (linux instructions are already added).

Comment 13 Mladen Turk 2011-03-22 07:09:54 UTC
I have no clue how JON works. To my understandings it needs write privileges
to httpd and tomcat conf directories under an user account.
If that's a case then JON installation must explicitly allow that,
because it has serious impacts on the overall security.

Please redirect question to someone who knows how JON works.

Comment 14 Mladen Turk 2011-03-22 07:16:01 UTC
Ondrej. Think I told you
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9876"
but never
set JAVA_OPTS="%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9876"


Comment 15 Ondřej Žižka 2011-03-22 07:40:35 UTC
Mladen,

1) I rather thought that you could verify whether setting JMX for Windows is done the same way as for UNIX.
I've seen Igor using catalina.bat (IIRC the name), so I wonder. You know. The differences between platforms are so big for EWS that I am not sure of anything :)

2) Yes, I told Eva that, only forgot to fix it here. Thanks for mentioning.



Comment 16 Mladen Turk 2011-03-22 07:48:47 UTC
Never tried JON, have no clue how it works and what it does and what options it needs.
You should really ask someone from JON.
Management system should provide instructions how to manage a particular system
not the other way around.


Comment 17 Permaine Cheung 2011-03-22 16:11:14 UTC
I agree that management system should provide instructions on how different components can be used to work with it.
Ondrej, can you please ask someone from the JON team to take a look? we don't have experience with JON. Thanks!

Comment 18 Ondřej Žižka 2011-03-22 17:00:07 UTC
Charles, could you please assign someone to help with this?

Comment 19 Rajesh Rajasekaran 2011-03-24 18:30:45 UTC
Link: Added: This issue is related to JBPAPP-3755


Comment 20 Ondřej Žižka 2011-03-24 20:25:01 UTC
Link: Added: This issue is related to JBPAPP-6122


Comment 21 Ondřej Žižka 2011-03-25 23:04:22 UTC
Evo, one more config type:  Tomcat on RHEL installed from RPMs (aka via yum aka from RHN):

1) Instead of editing startup.sh, user needs to edit /usr/sbin/tomcat<VERSION>  (but setting JAVA_OPTS is the same)
2) More changes in CONNECTION tab in JON:
   Manager URL  =    service:jmx:rmi:///jndi/rmi://localhost:<PORT>/jmxrmi    (same as normal)
   Control Method =  RPM System V init script
   Start Script    = /usr/sbin/tomcat<VERSION>
   Shutdown Script = /usr/sbin/tomcat<VERSION>

Comment 22 Ondřej Žižka 2011-05-03 16:01:03 UTC
Can't verify, I didn't find EWS doc on stage.

Comment 23 Ondřej Žižka 2011-05-03 16:51:45 UTC
Rewording the paragraph once more.
Eva, rather than describing it here, can you give me a link to SVN to this chapter? I'd make a patch and send you.

Comment 24 Ondřej Žižka 2011-05-03 16:54:30 UTC
For me to remember what I wanted: "To make sure that both authentication and SSL are disabled, set the following options in the file:"
-> "Add these JVM options to enable JMX publihing" or such (and then 3 lines of current 5)
4) For development purposes, you might want to disable authentication and SSL. To do so, add these lines:  (2 remaining lines)


Comment 26 Rebecca Newton 2011-05-19 03:11:04 UTC
Hi Ondrej, what's the progress on this? Did you get the SVN link you were after? Thanks.

Comment 27 Ondřej Žižka 2011-05-20 16:00:59 UTC
I hope I don't come late with this.

Apply the attached patch to https://svn.devel.redhat.com/repos/ecs/JBoss_Enterprise_Web_Server/trunk/1.0/JBoss_EWS_Installation_Guide  r62316
I am quite sure I screwed the XML structure so it needs to be fixed, but the wording is now right in the sense that we don't advice users to unsecure JMX, rather the opposite.
And also, The <important> part will need to add some <para> etc. around the text snippets.

Please apply, re-stage and let me check.

Comment 28 Ondřej Žižka 2011-05-20 16:00:59 UTC
Attachment: Added: JBPAPP-6089-reworded.patch


Comment 29 Ondřej Žižka 2011-05-23 18:03:28 UTC
Attaching XML from which I made the patch.

Comment 30 Ondřej Žižka 2011-05-23 18:03:28 UTC
Attachment: Added: ch-Monitoring_with_JBoss_Operating_Network.xml


Comment 31 Ondřej Žižka 2011-05-23 18:07:30 UTC
Configuring Monitoring
======================

...

Select an available port to use for JMX monitoring (9876 in the example below). Make sure it is not blocked by a firewall.
Then append it to the JAVA_OPTS variable:

* on Red Hat Enterprise Linux and Solaris:</para>

{code}
      JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=9876"
{code}

* on Windows:
{code}
      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9876"
{code}

For development purposes, you might want to disable authentication and SSL. To do so, add these lines:
{code}
      JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
      JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
{code}

In production environments, be sure to set up access credentials, secure JMX with SSL
(refer to http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html )
and restrict the access with a firewall. Example additonal lines:

* Linux and Solaris:
{code}
      JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.access.file=$EWS_HOME/jmxremote.access"
      JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file=$EWS_HOME/jmxremote.password"
{code}
							
 * Windows:
{code}
      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file=c:\Program Files\Red Hat\Enterprise Web Server\jmxremote.access"
      set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file=c:\Program Files\Red Hat\Enterprise Web Server\jmxremote.password"
{code}
...

Comment 32 Ondřej Žižka 2011-05-23 19:03:18 UTC
Verified on stage, now it's ok. Good work, Eva.