JBoss Community Archive (Read Only)


Running the RHQ Server

Running the RHQ Server

The RHQ Server is actually a customized JBossAS Server, delivered as a JBoss module under where the RHQ Server distribution is installed. When you start the RHQ Server, you are actually starting a JBossAS server instance. Additionally, you are likely also starting an RHQ Storage Node, which is a customized Cassandra database.

Running in Debug Mode

Sometimes you need the server launcher scripts to emit debug messages. To run the scripts in debug mode, define the environment variable RHQ_SERVER_DEBUG to 'true'. To disable this debug mode, unset that environment variable, or set it to 'false'.

To run the RHQ Server itself in debug mode, you can set "rhq.server.log-level" to "DEBUG" in <install-dir>/bin/rhq-server.properties. You would do this if you need the RHQ Server itself to log debug messages. Note that the RHQ_SERVER_DEBUG setting does not affect whether or not the RHQ Server itself emits debug messages - that environment variable effects only the server launcher scripts.

We do not recommend modifying anything else under the JBossAS directory (e.g. jbossas) unless explicitly mentioned in the documentation; modifying any internal files could adversely affect the performance of the RHQ Server.

Running on Windows

The rhqctl install command installs the RHQ Server as a Windows service. The rhqctl commands manipulate the backing service.

The backing service is managed by the Java Service Wrapper. To make changes to the runtime environment the Windows service itself can be manipulated. Or the configuration applied by the service wrapper can be manipulated. See Wrapper Configuration Files.

Running in a Windows Console

This is no different than on other platforms. You must stop the RHQ Server and then start it in console mode:

rhqctl stop --server
rhqctl console --server

Note that when running in console mode any customizations made to the service wrapper configuration files will not apply.

Running on Unix

The RHQ Server can run from a console window or run as a service started by the init process.

Setting Environment Variables

The rhq-server.sh file, located in the <install-dir>/bin/internal directory, contains a detailed list of the environment variables it requires to run. For most variables, sensible defaults are used and therefore do not need tweaking.

You can specify the path to the Java installation you want to use to run the RHQ Server. Before starting the RHQ Server, you can edit the rhq-server.sh file and ensure that either the RHQ_JAVA_HOME or the RHQ_JAVA_EXE_FILE_PATH variable is set appropriately.

Running in a Console

To run the RHQ Server in a console, execute the following commands:

# cd <install-dir>/bin
# ./rhqctl console --server

Running with init.d

To ensure the RHQ Server is started at boot time, the rhqctl script can be managed by the init process. The script must be copied to the appropriate location and the RHQ_SERVER_HOME variable must be set to the installation directory of the RHQ Server. The exact procedure on how to do this varies between different flavors of UNIX. The example procedure below describes this process on Red Hat Enterprise Linux 5.2.

Unlike the Windows script, this UNIX script does not utilize the Java Service Wrapper utility.

Service Installation on Red Hat Enterprise Linux 5.2

The rhq-server.sh script can be placed under the /etc/init.d directory and managed by the service and chkconfig command. To run the RHQ Server as a service on Red Hat Enterprise Linux 5.2 and ensure that it starts in run level 5, follow the procedure below as the root user:

  1. Copy the rhq-server.sh script into the /etc/init.d directory.

    cp <install-dir>/bin/rhqctl /etc/init.d
  2. Edit the /etc/init.d/rhqctl script and set the RHQ_SERVER_HOME variable to the RHQ Server install directory. For example:

    export RHQ_SERVER_HOME=<install-dir>
  3. Edit the /etc/init.d/rhqctl 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.

    #chkconfig: 2345 95 20
    #description: RHQ Server
    #processname: rhqctl
  4. Add the service to the chkconfig service management command.

    # chkconfig --add rhqctl
    # chkconfig rhqctl --list
  5. Ensure the service will start in run level 5.

    # chkconfig --level 5 rhqctl on

The RHQ Server service can now be managed by the command:

service rhqctl { start | stop | status }

For example, to start the service, enter the following command:

# service rhqctl start

Logging in and first steps

After the server is started, the console can be accessed by default at http://localhost:7080 with the default user/password of rhqadmin/rhqadmin. The Initial auto discovery and import page gives more details.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 13:30:39 UTC, last content change 2013-10-28 19:27:45 UTC.