Escolar Documentos
Profissional Documentos
Cultura Documentos
JBoss ON Team
JBoss Operations Network 2.1 JON Server Guide The JON Server that ships with JBoss Operations Network 2.0 Edition 1
Author Copyright 2009 Red Hat, Inc. JBoss ON Team
Copyright 2009 Red Hat, Inc.. This material may only be distributed subject to the terms and conditions set forth in the Open Publication License, V1.0 or later (the latest version of the OPL is presently available at http://www.opencontent.org/openpub/). Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United States and other countries. All other trademarks referenced herein are the property of their respective owners. 1801 Varsity Drive Raleigh, NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588 Research Triangle Park, NC 27709 USA
The JON Server that ships with JBoss Operations Network 2.0
Preface v 1. Document Conventions ................................................................................................... v 1.1. Typographic Conventions ...................................................................................... v 1.2. Pull-quote Conventions ........................................................................................ vi 1.3. Notes and Warnings ........................................................................................... vii 2. We need feedback ........................................................................................................ viii 1. JON Server 1.1. Configuring the JON Server .......................................................................................... 1.2. Running the JON Server .............................................................................................. 1.2.1. Running on Windows ......................................................................................... 1.2.2. Running on Unix ............................................................................................... 1.3. Running the Embedded JON Agent .............................................................................. 2. Communications Subsystem A. Revision History Index 1 1 1 1 3 5 7 9 11
iii
iv
Preface
1. Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.
1
https://fedorahosted.org/liberation-fonts/
Preface
Choose System > Preferences > Mouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand). To insert a special character into a gedit file, choose Applications > Accessories > Character Map from the main menu bar. Next, choose Search > Find from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose Edit > Paste from the gedit menu bar. The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in Proportional Bold and all distinguishable by context. Note the > shorthand used to indicate traversal through a menu and its sub-menus. This is to avoid the difficult-to-follow 'Select Mouse from the Preferences sub-menu in the System menu of the main menu bar' approach. Mono-spaced Bold Italic or Proportional Bold Italic Whether Mono-spaced Bold or Proportional Bold, the addition of Italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example: To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh john@example.com. The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home. To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release. Note the words in bold italics above username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system. Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
vi
books books_tests
Desktop Desktop1
documentation downloads
drafts images
mss notes
photos scripts
stuff svgs
svn
Source-code listings are also set in Mono-spaced Roman but are presented and highlighted as follows:
package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }
Note
A note is a tip or shortcut or alternative approach to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring Important boxes won't cause data loss but may cause irritation and frustration.
vii
Preface
Warning
A Warning should not be ignored. Ignoring warnings will most likely cause data loss.
2. We need feedback
To see all outstanding issues regarding this guide, please visit: https://jira.jboss.org/jira/browse/JOPR If you find a typographical error in the Features Guide, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in JIRA: https://jira.jboss.org/ jira/browse/JOPR against the component Documentation. If you do have a suggestion for improving the documentation, try and be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.
viii
Chapter 1.
JON Server
This chapter describes the JON Server that ships with JBoss Operations Network 2.0.
Warning
The rhq-server.properties file also contains the database username and password. This password is not encrypted. Ensure this file is protected from unwanted access.
Server at a new JVM. The comments at the top of the rhq-server.bat file contain a detailed list of these environment variables. You do not have to set any specific variables to get the JON Server to run; sensible defaults are used.
http://wrapper.tanukisoftware.org/doc/english/download.jsp
Running on Unix
container. Each individual option and its value must be given its own wrapper configuration property, and must be placed in numerical order. Do not change any of the five default properties, wrapper.app.parameter.1; to add a new property, start with wrapper.app.parameter.6. You should not need to add or modify these properties for a standard configuration. wrapper.java.additional.# - these additional VM options are passed directly to the VM (such as -Xmx or -D). As with the wrapper.app.parameter.# properties, you must increment each option in numerical order. Do not edit the wrapper.java.additiona.1 property unless you want to point to your own log configuration file. You can add, remove, and modify other properties. For example: wrapper.java.additional.5=-XX:+DisableExplicitGC wrapper.ntservice.starttype - by default, this is set to AUTO_START. This starts the JON Server automatically at boot time. To manually start the service, change the value to DEMAND_START. There are many other Java Service Wrapper configuration properties you can set. If you are interested in learning more, refer to the Java Service Wrapper documentation at http:// wrapper.tanukisoftware.org/doc/english/properties.html. Also refer to the comments located in the rhq-server-wrapper.conf file. You can also configure the JON Server Windows Service by creating a bin\wrapper\rhq-serverwrapper.inc include file. This effectively augments the service wrapper configuration file, serverinstall-dir\bin\wrapper\rhq-server-wrapper.conf. If you want to add additional Java VM options, we recommend that you add your settings in here, as opposed to the rhq-serverwrapper.conf file. The rhq-server-wrapper.inc file augments the settings found in the rhq-serverwrapper.conf file.
Running in a Console
To run the JON Server in a console, execute the following commands as the root user:
Note
Unlike the Windows script, this UNIX script does not utilize the Java Service Wrapper utility.
# cp <server-install-dir>/bin/rhq-server.sh /etc/init.d/ 2. Edit the /etc/init.d/rhq-server.sh script and set the RHQ_SERVER_HOME variable to the JON Server install directory. For example:
RHQ_SERVER_HOME=/opt/jon-server-2.1.0.GA/ 3. Edit the /etc/init.d/rhq-server.sh script and add the following lines to the top of the file, directly under #!/bin/sh. The last two parameters in the #chkconfig: 2345 95 20 line, specify the start and stop priority respectively; edit these accordingly.
#!/bin/sh #chkconfig: 2345 95 20 #description: JBoss Operations Network Server #processname: run.sh 4. Add the service to the chkconfig service management command.
# chkconfig --add rhq-server.sh # chkconfig rhq-server.sh --list 5. Ensure the service will start in run level 5.
# chkconfig --level 5 rhq-server.sh on The JON Server service can now be managed by the service rhq-server.sh { start | stop | status } command. To start the service enter the following command:
Chapter 2.
Communications Subsystem
JBoss ON has an internal communications subsystem that is built on top of JBoss Remoting 2 . The communications infrastructure is used by both JON Servers and JON Agents to send and receive messages. It is highly configurable, but for the most part the defaults are sensibly defined and therefore do not need any modification. Please refer to the Communications Configuration chapter in the JON Agent Guide for more information on some of the low level configuration settings applicable to both the JON Server and JON Agent. Additionally, you can set concurrency limits on the JON Server to help its communication subsystem avoid getting flooded with agent messages. These limits are described in the Concurrency Limits section in the Installation Guide. Note that in order to change these values, you must understand the relationship between the concurrency limits and the other communication settings. Important factors that you should be familiar with are listed below: If you use the default JON Server transport of servlet or sslservlet, the number of allowed incoming messages are capped at the maximum web connections allowed by the Tomcat connector (rhq.server.startup.web.max-connections). Therefore, this puts an upper limit on the global concurrency limit (rhq.communications.global-concurrency-limit). The global concurrency limit (rhq.communications.global-concurrency-limit) is the upper limit for all other concurrency limits. The global concurrency limit is the maximum number of messages that can be processed, regardless of the message type. If you switch the transport that agents use to send messages to the server from something other than servlet or sslservlet (that is, a transport other than those that send messages over the Tomcat connector) then the low-level transport parameter maxThreads caps the maximum number of messages that can be received. Refer to the Transport Parameters section in the JON Agent Guide.
1
http://labs.jboss.com/jbossremoting/
10
Index
F
feedback contact information for this manual, viii
11
12