Appendix A. Frequently Asked Questions
- A.1. General
- Q: What is the difference between JBoss Operations Network and RHQ?
- Q: Is there a publicly available issue tracker system to search for bugs and submit enhancement requests?
- Q: What databases are supported?
- Q: Why can't I start JBoss ON with Java 5?
- Q: How can I find what my user preferences are?
- Q: What is the syntax for regular expressions used within JBoss ON?
- Q: How often does JBoss ON check the availability of resources?
- Q: Why is the JBoss ON agent waiting at startup?
- Q: How do I install a supported version of PostgreSQL on Red Hat Enterprise Linux?
- Q: How can I run SQL commands against the JBoss ON database from the JBoss ON console?
- Q: Is JBoss ON supported on VMWare?
- Q: To help debug Out Of Memory conditions, how do I get the agent or server to dump heap when it runs out of memory or on demand?
- A.2. Installation and Upgrade Issues
- Q: I'm seeing error messages when I install (or upgrade) my server. What do they mean?
- Q: I've installed my server, but I can't connect to it. What's wrong?
- Q: The installer fails on PostgreSQL with "Relation RHQ_Principal does not exist."
- Q: I upgraded my server, but when I try to connect to the installer page to configure it, it keeps trying to redirect me to the (old) coregui/ module. How do I get to the installer?
- Q: The JBoss ON install fails on Oracle with the ORA-01843.
- A.3. User Interface
- Q: How can I ignore an auto-discovered resource?
- Q: I selected a search suggestion from the resource search box, but I didn't get any results. Why?
- Q: Errors and stack traces in the GWT Message Center are sometimes not helpful. How can I find out what the real problem is?
- Q: Why are the graphs and charts on the MONITOR tab in the GUI not displayed?
- A.4. Server
- Q: When I start the server, I see servlet errors in my logs. What's wrong?
- Q: How do I get debug messages from the JBoss ON server?
- Q: How can I specify command-line options for the server JVM?
- Q: How do I purge my schema of all data?
- Q: How can I debug JDBC access and trace SQL?
- Q: How can I confirm my server's email/SMTP settings are correct?
- Q: My server machine does not have a writable directory called /var/run. How can I get my rhq-server.sh script to successfully write out its pid file?
- Q: When I try to start the server, I get an exception with the cause "Exception creating identity" and the server fails to start. How can I fix this?
- Q: My server logs are showing the message "Have not heard from agent ... Will be backfilled since we suspect it is down." What does that mean?
- Q: What ports do I have to be concerned about when setting up a firewall between servers and agents?
- Q: I installed the server as a Windows service, but it is failing to start with no error messages. How can I start the server as a Windows service?
- Q: How do I fix an ORA-12519, TNS:no appropriate service handler found error when using Oracle XE?
- Q: I am seeing this error in my server logs or stack trace: WARN [QueryTranslatorImpl] firstResult/maxResults specified with collection fetch; applying in memory. What does that mean and what is causing it?
- Q: How do I stop the server from periodically logging messages that say a plug-in is "the same logical plug-in" but has "different content" and "will be considered obsolete"?
- Q: What is the difference between LDAP user authentication and LDAP group authorization in JBoss ON?
- Q: How do I set up LDAP group authorization?
- A.5. Agent
- Q: I have a physical machine hosting multiple virtual machines with shared disk resources. How can I run an agent on each virtual instance?
- Q: How do I get debug messages from the JBoss ON agent?
- Q: How do I restrict which agents are allowed to connect to the server?
- Q: Do I have to run the agent as root?
- Q: How do I clean start the JBoss ON agent, as if newly installed?
- Q: How can I do a "clean config" for an agent running as a background Windows service?
- Q: How can I update the plug-ins on all my agents?
- Q: How can I change the agent name after it has already been registered?
- Q: I want to run agents on all my machines, but only one starts OK. The rest fail due to binding to a wrong address.
- Q: When starting the agent via a Windows service, the agent fails to start, and I see the error "java.lang.IllegalStateException: The name of this agent is not defined - you cannot start the agent until you give it a valid name" in the agent wrapper log file. What does this mean?
- Q: My agent setup is correct but my agent is getting the following message: "Cause: org.jboss.remoting.CannotConnectException: Can not connect http client invoker."
- Q: My agent machine does not have a writable directory called /var/run. How can I get my rhq-agent-wrapper.sh script to successfully write out its pid file?
- Q: How often does the agent scan for resources?
- Q: How can I view the agent's persisted configuration?
- Q: How can I find out what environment variables and Java system properties are set in my agent JVM process?
- Q: How can I get a dump of inventory information from an agent running on another machine?
- Q: I need to change the IP address of my agent machine. How do I keep my server and agent up to date with that change?
- Q: How can I stop my agent from thinking the server keeps going up and down when the server has remained running the whole time?
- A.6. Log Messages
- A.7. Server and Agent Plug-ins
- A.8. General Resource Questions
- Q: I deleted a Platform from inventory. How can I rediscover it, so I can re-import it?
- Q: On a Red Hat Enterprise Linux platform, interface "sit0" is discovered, but it is always red. How can I remove this interface from inventory?
- Q: How can I collect syslog messages as JBoss ON events?
- Q: Executing a script resource fails on Red Hat Enterprise Linux.
- A.9. JBoss Resources
- Q: Why does only one JBoss AS server show green availability and all the rest show red, even though I made sure all of my JNP credentials are configured properly in my resources' connection properties?
- Q: When I import a server like JBoss EAP 5 or Tomcat, I see its child JVM resource in inventory, but it is red (DOWN). Why?
- Q: When trying to monitor a JBoss EAP instance, I get the error "Connection failure Failed to authenticate principal=null, securityDomain=jmx-console."
- Q: When monitoring a JBoss AS instance, I'm not seeing any JVM resources beneath it.
- Q: Can I monitor JBoss AS 5.1?
- Q: My agent can detect my JBoss server and gets its connection properties, but the JNP connection fails. Why?
- A.10. Postgres Resources
- Q: Why is the agent showing an error in my PostgreSQL discovery about authentication failed for user "postgres"?
- Q: Why are most of the metrics for my Postgres resource showing up as NaN?
- Q: How many database connections are necessary to monitor a Postgres database?
- Q: Why can't I drop my database that is inventoried in JBoss ON?
- A.11. Apache Resources
- Q: Where can I get the Apache connectors?
- Q: I have instrumented Apache with the Response Time module, but no RT metrics are being shown for my VirtualHosts.
- Q: Some of my Apache metrics show values of zero. Why?
- Q: What is the Augeas plug-in?
- Q: Why does my agent log have the error "java.lang.UnsatisfiedLinkError: Unable to load library 'augeas': libaugeas.so: cannot open shared object file: No such file or directory"?
- Q: Why does my Apache SNMP module fail to start with an error?
- A.12. Tomcat Resources
- A.13. Provisioning and Content
- A.14. Alerts
- A.15. Monitoring
- A.16. Operations
A.1. General
http://
server.hostname:7080/admin/test/sql.jsp
page, run this SQL command:
select id, name, string_value from rhq_config_property where configuration_id = (select configuration_id from rhq_subject where name = 'your-user-name')
rhq.agent.plugins.availability-scan.period-secs
setting. The default is 30 seconds. For performance reasons, it should never be lower than 30 seconds. It is possible to extend the scan interval by setting a new interval as one of the ADDITIONAL_JAVA_OPTIONS
values. For example:
RHQ_AGENT_ADDITIONAL_JAVA_OPTS="-Drhq.agent.plugins.availability-scan.period-secs=45"
If the agent returns this message at start up, it means that the agent is known to the server under one name but is sending a different name when it starts:
Cause: [org.rhq.core.clientapi.server.core.AgentRegistrationException:The agent asking for registration is trying to register the same address/port [172.31.7.7:16163] that is already registered under a different name [example]; if this new agent is actually the same as the original, then re-register with the same name]
--clean
and give the correct name.
This is an agent state where the server cannot be reached because the server is down or because a firewall has blocked the traffic. Make sure port 7080 on the server machine is reachable from the agent's machine. You can check this through a web browser.
An error saying that the server cannot ping the agent's endpoint means that the agent can communicate with the server, but the server cannot communicate with the agent. This may mean that the agent port is blocked by a firewall.
The server has rejected the agent registration request. Cause: [org.rhq.core.clientapi.server.core.AgentRegistrationException:Server cannot ping the agent's endpoint. The agent's endpoint is probably invalid or there is a firewall preventing the server from connecting to the agent. Endpoint: socket://172.31.7.3:12345/....
This usually means that the server has a different security token than the one the agent was sending. This could have resulted from the java preferences entry being mangled, for example, by testing with different agent versions or VMs.
11:40:48,454 WARN [CommandProcessor] {CommandProcessor.failed- authentication}Command failed to be authenticated! This command will be ignored and not processed: Command: type=[remotepojo]; cmd-in-response= [false]; config=[{rhq.security-token=1217855913569-109582636-403140853869881172, rhq.send-throttle=true}]; params= [{targetInterfaceName=org.rhq.core.clientapi.server.core.CoreServerService, invocation=NameBasedInvocation[getLatestPlugins]}]
--clean
option.
Here, the agent successfully starts, but there may be other agent communication problems, like no monitoring data are sent. Trying to ping the agent command line can return an error like the following:
sending> ping Pinging... Failed to execute prompt command [ping]. Cause: org.rhq.enterprise.communications.command.server.AuthenticationException:Command failed to be authenticated! This command will be ignored and not processed: Command: type=[remotepojo]; cmd-in-response=[false]; config=[{rhq.security- token=1214208960346-102975580-7334156733284942657, rhq.send-throttle=true}]; params=[{targetInterfaceName=org.rhq.enterprise.communications.Ping, invocation=NameBasedInvocation[ping]}]
Make sure the IP address of your computer can be reverse-mapped to the computer name, and that this name maps back to the same IP address. This needs to be true for all your hosts.
$ dig -x 172.31.7.7 [...] ;; ANSWER SECTION: 7.7.31.172.in-addr.arpa. 86400 IN PTR example $ $ dig example [...] ;; ANSWER SECTION: example 74030 IN A 172.31.7.7
- Log into http://rhn.redhat.com with your RHN/JBoss credentials.
- Add the Red Hat Application Stack v2 channel.
- Update the system:
sudo yum update
- Then update PostgreSQL specifically:
sudo yum install postgresql-server
Thedata
directory is installed in/var/lib/pgsql/data
. JBoss ON supports PostgreSQL 8.2.4 and later 8.2.x versions and all releases of PostgreSQL 8.3, 8.4, and 9.0. - Install and configure the JBoss ON server as normal.
http://server.example.com:7080/admin/test/sql.jsp
RHQ_AGENT_ADDITIONAL_JAVA_OPTS
or RHQ_SERVER_ADDITIONAL_JAVA_OPTS
variables).
-XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnCtrlBreakTo drop the heap dump file in a particular location, add a path:
-XX:HeapDumpPath=locationSee the SUN JVM Debugging Options for more info.
A.2. Installation and Upgrade Issues
ERROR [ClientCommandSenderTask] {ClientCommandSenderTask.send-failed}Failed to send command [Command: type=[remotepojo]; cmd-in-response=[false]; config=[{rhq.timeout=1000, rhq.send-throttle=true}]; params=[{targetInterfaceName=org.rhq.enterprise.communications.Ping, invocation=NameBasedInvocation[ping]}]]. Cause: org.jboss.remoting.CannotConnectException:[.....]
rhq-server.properties
file. The java.rmi.server.hostname
parameter must be set manually to the real IP address of the server, which matches the value of the jboss.bind.address
parameter. Restart the server after editing the rhq-server.properties
file to load the new settings.
pg_hba.conf
and check that the permissions have been enabled. The Installation Guide has more information on setting up PostgreSQL for installation.
coregui/
module. How do I get to the installer?
coregui/
module and attempt to redirect you there automatically after upgrading, even though the upgraded coregui/
module has not yet been loaded.
http:/server.example.com:7080/installer/start.jsf
- Put Oracle in a different locale.
- Edit one of the server distribution files before running the installer:
- Remove the old server directory and unzip the install package again.
- Open the
serverRoot/jon-server-3.2.GA1/jbossas/server/default/rhq-installer.war/WEB-INF/classes
directory. - Edit
db-data-combined.xml
. Update a few dates in the form 01-APR-08 to be in the current locale. - Save the file.
- Re-run the installer and choose to overwrite the database.
A.3. User Interface
- Import the platform and leave that server unchecked.
- When the platform is successfully imported, select the server and click Ignore.
type==CPU
, even though CPU is in the service category. If you select type==CPU
, then nothing is returned in the search, because the search results are filtered by the category, and the search is implicitly set to the server category.
java.lang.RuntimeException:[1312480384219] ...
java.lang.NoClassDefFoundError: Could not initialize class org..enterprise.gui.image.chart.ColumnChart
yum install urw-fonts
A.4. Server
Servlet.service()
class recorded in the logs:
22:55:35,319 ERROR [[ServerInvokerServlet]] Servlet.service() for servlet ServerInvokerServlet threw exception java.lang.reflect.UndeclaredThrowableException at $Proxy421.processRequest(Unknown Source) at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.processRequest(ServerInvokerServlet.java:128) at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.doPost(ServerInvokerServlet.java:157) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) ... more ...
serverRoot/jon-server-3.2.GA1/jbossas/server/default/conf/jboss-log4j.xml
configuration file to enable debug messages by uncommenting the org.rhq
category. This will set its priority to DEBUG. Debug messages will now be emitted for all JBoss ON subsystems to the log file. If you want debug messages to be emitted only for a smaller subset of the JBoss ON server internals, you can specify which categories you want by uncommenting them, or alternatively, you can add your own categories.
log4j.xml
with comments that briefly explain what types of debug messages can be expected from a particular category. You can also emit debug messages for third-party subsystems like JBoss/Remoting and Hibernate. Some of these are already commented out in log4j.xml
.
log4j.xml
file, save the file and then restart the JBoss ON server.
serverRoot/jon-server-3.2.GA1/bin/rhq-server.sh|bat stop serverRoot/jon-server-3.2.GA1/bin/rhq-server.sh|bat start
serverRoot/jon-server-3.2.GA1/logs/rhq-server-log4j.log
.
Note
INFO
. If you want your debug messages to also appear on the console, you must change the CONSOLE appender's threshold setting to DEBUG
.
RHQ_SERVER_DEBUG
to any value. After setting this variable when you start the launcher, scripts will output debug messages.
RHQ_SERVER_JAVA_OPTS
environment variable. For example:
RHQ_SERVER_JAVA_OPTS="-Dapp.name=rhq-server -Xms256M -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack= true" export RHQ_SERVER_JAVA_OPTS
RHQ_SERVER_ADDITIONAL_JAVA_OPTS
environment variable. For example:
RHQ_SERVER_ADDITIONAL_JAVA_OPTS= "-Dfoo= true" export RHQ_SERVER_ADDITIONAL_JAVA_OPTS
wrapper.java.additional.n
lines to <server-install-dir>\bin\wrapper\rhq-server-wrapper.inc
(you may need to create the file). For example:
- wrapper.java.additional.12=-verbosegc:file=gc-log.txt
- wrapper.java.additional.13=-XX:+HeapDumpOnOutOfMemoryError
- wrapper.java.additional.14=-XX:HeapDumpPath=heap-dump.txt
- Save the current JBoss ON server directory.
mv jon-server-3.2.GA1/ jon-server-3.2.GA1.bak/
- Unzip the latest JBoss ON binaries.
unzip jon-server-3.2.GA1.zip
- Start the new server process.
serverRoot/jon-server-3.2.GA1/bin/rhqctl.sh start
- Open the JBoss ON GUI and go through the installation setup. When given the choice, select the option to Overwrite existing data. This removes all of the data for the previous installation of the server.
rhqadmin
user and open the email test page:
http://server.example.com/admin/test/email.jsp
RHQ_SERVER_PIDFILE_DIR
to the full path of the directory where you want the pid file to be stored. When you run the script, that variable's value will override the default location. If you have a script that is 2.1 or older, directly edit rhq-server.sh
and change /var/run
to the desired directory.
Caused by: java.lang.RuntimeException: Exception creating identity: my.host.name.com: my.host.name.com | at org.jboss.remoting.ident.Identity.get(Identity.java:211)
/etc/hosts
). This will ensure that JBoss ON will continue to work correctly even if DNS fails. However, using host files may not be practical for your environment. If this is the case, please take some time before you begin your JBoss ON installation to verify that each host you plan to run JBoss ON on can correctly resolve every other hostname in your planned environment using a tool such as nslookup.
Note
[org.rhq.enterprise.server.core.AgentManagerBean] Have not heard from agent [agent_name] since [timestamp]. Will be backfilled since we suspect it is down
- The agent actually shut down or crashed.
- The machine the agent is running on shut down or crashed.
- The network between the agent and server went down, prohibiting the agent from connecting to the server and sending the availability report.
- The machine the agent is running on is bogged down, thus slowing up the agent and prohibiting the agent from being able to send up reports fast enough.
Note
rhq-server.bat console
to see if it can be run by that user. Then, install the server as a Windows Service with the RHQ_SERVER_RUN_AS_ME
environment variable set to true
:
rhq-server.bat remove set RHQ_SERVER_RUN_AS_ME=true rhq-server.bat install
ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;Then restart the Oracle XE database.
jsmith
is attempting to log into JBoss ON. Authentication is the process of checking that the jsmith
trying to log in is the same as the jsmith
user that JBoss ON has in its database; this can be validated by verifying the password. Once jsmith
logs in, then JBoss ON determines what resources jsmith
can view and whether he can edit those resources' configuration, provision new applications, change server settings, and perform other tasks in JBoss ON.
Note
- The information to connect to the LDAP server, in the form of an LDAP URL. For example, ldap://server.example.com:1389.
- The username and password to use to connect to the server. This account should have read access to the subtrees being searched.
- The search base. This is the point in the directory tree to begin looking for entries. This should be high enough to include all entries that you want to include and low enough to improve performance and prevent unwanted access. For example, if you have
ou=Web Team,dc=example,dc=com
andou=Engineering,dc=example,dc=com
and you want to include groups in both subtrees in JBoss ON, then set the search base high up the tree, todc=example,dc=com
. If you only want the engineering groups to be used by JBoss ON, then set the search base toou=Engineering,dc=example,dc=com
. - The group filter. This creates the search filter to use to search for group entries. This can use the group object class, which is particularly useful if there is a custom attribute for JBoss ON-related entries. This can also point to other elements — like the group name, a locality, or a string in the entry description — that are useful or meaningful to identify JBoss ON-related groups.
- The member attribute. There are different types of group object classes, and most use different attributes to identify group members. For example, the
groupOfUniqueNames
object classes lists its members with theuniqueMember
attribute.
A.5. Agent
RHQ_AGENT_DEBUG
to any value. When you start the agent, both the launcher scripts and the agent itself will output debug messages. When you use this environment variable, the agent will use an internal log4j
configuration file.
log4j
categories have DEBUG priority, edit the conf/log4j.xml
file and restart the agent to load the changes. Do not set RHQ_AGENT_DEBUG
if you want the agent to use the log4j.xml
file; setting that environment variable causes the agent to override this log4j.xml
with an internally configured log4j
configuration.
agentRoot/rhq-agent/logs
directory.
RHQ_AGENT_DEBUG
and then install the service:
rhq-agent-wrapper.bat install
- Create a file for the restriction rule, with this name and location:
vim serverInstallDir/jbossas/server/default/deploy/rhq.ear/jboss-remoting-servlet-invoker-2x.r3040.jon.war/WEB-INF/context.xml
- Add this content to the file:
<?xml version="1.0" encoding="UTF-8"?> <Context> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.*,142.104.128.*,10.224.27.182"/> </Context>
Theallow=
attribute lists the IPs that are allowed to connect to the server. All other IPs are blocked.
postgres.conf
. Running the agent as a non-root user without PostgreSQL privileges means that the agent cannot read and manage the file. (And there will be log messages in the agent log saying so.) There are other resources that have similarly privileged files, like iptables and even some JBoss servers.
- Remove the platform entry from the JBoss ON server inventory. Since the platform entry is representative of the agent entry, this effectively removes the agent from the JBoss ON topology.
- Stop the agent and then restart it using the
--fullcleanconfig (-L)
command-line option.agentRoot/rhq-agent/bin/rhq-agent.sh --fullcleanconfig
The--fullcleanconfig
option removes all of the local inventory for the agent, reloads its configuration fresh from theagent-configuration.xml
file, and re-registers the agent with the server.Optionally, pass the--config
argument to have it start up with a user-specified configuration file. Otherwise, the defaultconf/agent-configuration.xml
file is used. If no directory is given, then the command looks for the configuration file in the agent'sconf/
directory.agentRoot/rhq-agent/bin/rhq-agent.sh --fullcleanconfig -c my-agent-configuration.xml
agent-configuration.xml
file. To force the agent to re-read its configuration from file, you won't be able to start it in the foreground, which makes re-configuring it a little bit more difficult.
config --import agent-configuration.xml
command.
rhq-agent-wrapper.conf
file and add a line for a third parameter:
wrapper.app.parameter.3=--cleanconfigThis forces the agent to re-read its configuration from the
agent-configuration.xml
every time it is started as a service. In this case, the agent-configuration.xml
must be preconfigured with all of the required (and optional) settings for the agent, so that it restarts with the correct configuration.
plugins update
at any agent prompt or through the UI with the Update All Plugins task in the agent's OPERATION tab.
resource.resourceType.pluginName = RHQAgent resource.resourceType.typeName = RHQ Agent
Note
FATAL [main] (org.jboss.on.agent.AgentMain)- {AgentMain.startup-error}The agent encountered an error during startup and must abort java.net.BindException: Cannot assign requested address
agent-configuration.xml
manually (to change IP addresses, for example) after setting up the agent? The agent's configuration XML file is not referenced after the agent is setup because its configuration is persisted using Java Preferences. Persisting the configuration allows the agent to be updated or re-installed without losing its configuration. To change the agent's configuration file and have those changes picked up, restart the agent and pass the --config
command line option (or -c
which is shorthand for --config
). This tells the agent to re-read the configuration file and override any old configuration it persisted before.
$HOME/.java
on Red Hat Enterprise Linux). This is usually not an issue on Windows since the Java preferences are stored in the registry. If you are running the agents as the same user and your user's home directory is shared, then have the agents use different Java preferences names. Edit your agents' agent-configuration.xml
files and change their Java preferences node names from default
to something that makes them unique across all agents. For example:
<node name="NewName">
--pref
option. Since you changed the configuration file, restart the agent with the -c
to specify the configuration file.
agentRoot/rhq-agent/bin/rhq-agent.sh --pref NewName -c agent-configuration.xml
--pref
option to pass in the node name.
java.util.prefs.userRoot
to point to another, unique, location for preference. When the agent starts, Java will use the value of that system property as the location where it will store its Java Preferences. You can set this system property on the agent by setting the RHQ_AGENT_ADDITIONAL_JAVA_OPTS
environment variable. When you set that environment variable, rhq-agent.sh
will add its value to the default set of Java options when passing in options to the agent's Java VM:
set RHQ_AGENT_ADDITIONAL_JAVA_OPTS="-Djava.util.prefs.userRoot=/etc/rhq-agent-prefs" agentRoot/rhq-agent/bin/rhq-agent.sh
/var/run
. How can I get my rhq-agent-wrapper.sh script to successfully write out its pid file?
RHQ_AGENT_PIDFILE_DIR
to the full path of the directory where you want the pid file to be stored. When you run the script, that variable's value will override the default location. If you have an older script (2.1 or older), directly edit rhq-agent-wrapper.sh
and change /var/run
to the desired directory.
Note
agent-configuration.xml
and overlaid with the value given at the agent setup. After the agent is initially configured, it persists that configuration and never refers back to agent-configuration.xml
, unless you clear the configuration.
- If the agent is in the JBoss ON inventory, simply go to your agent's Configuration tab to view its live configuration. This is the same configuration that is persisted.
- If the agent is currently running in non-daemon mode (i.e. you have the agent prompt on your console), you can use the
getconfig
orconfig
prompt commands to view the live configuration. Typehelp getconfig
orhelp config
for more information. - If the agent is in the JBoss ON inventory, run the Execute Prompt Command operation and invoke the
getconfig
prompt command. - Because the agent configuration is stored in the standard Java Preferences API backing store, you can use any tool that can examine Java preferences, such as Google's Java Preferences Tool. This is a GUI tool that can give you a file system-like view into your Java preferences. The agent preferences are stored in the
User
preferences node under the node namerhq-agent
. Depending on the-p
option that is passed to the agent for its node name when it is started, the actual configuration settings are found under a sub-node underrhq-agent
. The default preferences node is calleddefault
, so typically your agent's persisted configuration is found in the user preferences underrhq-agent/default
.
Warning
version
agent prompt command shows a list of the agent process' environment variables and system properties. version --sysprops
provides a list of all the system properties, and version --env
provides a list of all the environment variables. (At the agent prompt, run help version
for the syntax of that command.)
data/inventory.dat
file. Copy that file to the local machine. Then, run an agent on the local machine, with the same plug-ins as the other agent. The agent doesn't necessarily have to be connected to a server, but the plug-in container must be started, so the agent has to have been registered. Then, export the information from the imported DAT file.:
inventory --xml --export=/bad-inventory.xml /the/bad/inventory.dat
--export
option, the XML will simply be dumped to the stdout console window.
rhq.communications.connector.bind-address
which sets the value of the IP address the agent binds to when it starts its server socket (the thing it listens to for incoming messages from the server).
- Change the agent's configuration so that preference value is the same as the new IP address. Issue a setconfig prompt command on the agent prompt:
setconfig rhq.communications.connector.bind-address=IP_address
Do not changeagent-configuration.xml
; the changes will not take effect.If the agent is running in the background as a daemon process, shut it down with the script (rhq-agent-wrapper.sh|bat
) and restart it. - Restart the agent after editing its configuration.
INFO (org.rhq.enterprise.agent.AgentAutoDiscoveryListener)- {AgentAutoDiscoveryListener.server-offline} The Agent has auto-detected the Server going offline [InvokerLocator [servlet://server:7080/jboss-remoting-servlet-invoker /ServerInvokerServlet?rhq.communications.connector.rhqtype=server]] - the agent will stop sending new messages ... INFO (org.rhq.enterprise.agent.AgentAutoDiscoveryListener)- {AgentAutoDiscoveryListener.server-online} The Agent has auto-detected the Server coming online [InvokerLocator [servlet://server:7080/jboss-remoting-servlet-invoker /ServerInvokerServlet?rhq.communications.connector.rhqtype=server]] - the agent will be able to start sending messages now
- rhq.agent.server-auto-detection
- rhq.communications.multicast-detector.enabled
rhq.agent.client.server-polling-interval-msecs
value is larger than 0, typically 60000. Otherwise, the agent will never be able to know when the server goes down.
A.6. Log Messages
02:31:33,095 WARN [CommandProcessor] {CommandProcessor.failed-authentication} Command failed to be authenticated! This command will be ignored and not processed: Command: type=[identify]; cmd-in-response=[false]; config=[{}]; params=[null]
--cleanconfig
command line option to clean out its configuration and re-register.
Note
13:43:10,781 WARN [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@103583b <rs=org.postgresql.jdbc3.Jdbc3ResultSet@d16f5b>
A.7. Server and Agent Plug-ins
rhq-plug-in.xml
plug-in descriptor.
A.8. General Resource Questions
> discovery -f
NETWORKING_IPV6
value in /etc/sysconfig/network
:
NETWORKING_IPV6=no
Warning
/etc/modprobe.conf
to include the following lines:
alias net-pf-10 off alias ipv6 off
service ip6tables stop
chkconfig ip6tables off
/etc/rsyslog.conf
) so that JBoss ON understands. For example:
$template RHQfmt,"%timegenerated:::date-rfc3339%,%syslogpriority-text%,%syslogfacility-text%:%msg%\n"
RHQfmt
in the syslog configuration so it writes messages out in that format, JBoss ON understands the log messages fully. For example:
$template RHQfmt,"%timegenerated:::date-rfc3339%,%syslogpriority-text%,%syslogfacility-text%:%msg%\n" *.* /var/log/messages-for-rhq;RHQfmt *.* @@127.0.0.1:5514;RHQfmt
/var/log/messages-for-rhq
and sends the messages over TCP to a listener on port 5514, as configured in the platform's connection properties.
Execute
operation on a script resource, it immediately fails with an error message saying that the script cannot be executed, then ensure that the script itself is executable. Set the script to execute:
chmod a+x scriptname
A.9. JBoss Resources
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5222 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/jmxremote.access
Note
-c
) starts the instance in production configuration.
jboss.platform.mbeanserver
system property set. For example, in Red Hat Enterprise Linux, the ${JBOSS_HOME}\bin\run.conf
file should have this setting:
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
C:\Program Files
.
2012-01-12 15:03:38,982 DEBUG [ResourceContainer.invoker.daemon-1] (org.rhq.plugins.jbossas5.ApplicationServerComponent)- Failed to connect to Profile Service. java.lang.RuntimeException: Failed to lookup JNDI name 'ProfileService' from InitialContext. at org.rhq.plugins.jbossas5.connection.AbstractProfileServiceConnectionProvider.lookup(AbstractProfileServiceConnectionProvider.java:84) [snip]
A.10. Postgres Resources
- The postgres user has been deleted.
- The password for the postgres user has been changed.
- On Linux, the administrative login has been set to
ident sameuser
.
- Inventory the discovered Postgres resource. Its availability will show as down and it will not find any child resources.
- Navigate to the INVENTORY tab for the Postgres resource.
- Under Connection Properties, click the Edit button.
- Change the role name and password fields to reflect a valid super user account on the Postgres instance.
pg_hba.conf
file.
postgres.conf
file:
stats_start_collector = on
A.11. Apache Resources
- Can the agent's system user read the
_rt log
files? For instance, under RHEL/Apache, the default permissions of/var/log/httpd
are 700, root:ls -arltd /var/log/httpd/ drwx------ 2 root root 4096 Jul 28 11:36 /var/log/httpd/
A workaround is to specify an alternate log directory for the httpd logs or, alternatively, to change the permissions of/var/log/httpd
. Both of these have specific security implications. You could also run the agent as root; while this is the least preferable option, there are cases where this is necessary in order to not compromise system security by modifying file permissions. For example, JBoss ON cannot monitor the postgres daemon without root permissions, due to 700, postgres permissions on its data directory. Since those permissions shouldn't be altered, the only remaining option is to run the agent as root. - Have you enabled the Response Time Metric for the Apache Vhost Template and enabled Response Time? It is disabled by default.
- Administration > System Configuration > Templates | Apache HTTP Server > Apache Virtual Host, and click Edit Metric Template.
- Select the checkbox next to HTTP Response Time.
- At the bottom of the page, select Update schedules for existing resources of marked type.
- Set the collection interval.
- Click the Go button ().
Note
- Bytes Received for GET Requests per Minute
- Bytes Received for POST Requests per Minute
- Total Number of Bytes Received per Minute
- hosts
- grub
- apt
Error | Cause |
---|---|
Syntax error on line 1376 of /etc/httpd/conf/httpd.conf: Unable to write to SNMPvar directory" (on stderr) | Ensure the directory specified via the "SNMPVar" directive exists and is writable by the user that owns the Apache process. |
init_master_agent: Invalid local port (Permission denied)" (in the error_log file) |
See if your Apache error_log contains a log message similar to the following:
[notice] SELinux policy enabled; httpd running as context user_u:system_r:httpd_t:s0
This means the SELinux (Security-Enhanced Linux) policy is preventing the httpd process from binding to the SNMP agent port, 1610 by default. To resolve the problem, change SELinux to permissive mode by running the command
/usr/bin/setenforce 0 and then restarting Apache. You should then see a message similar to the following in your error_log:
[notice] SELinux policy enabled; httpd running as context user_u:system_r:unconfined_t"
This message has the term unconfined_t. This indicates SELinux is no longer restricting the process.
|
A.12. Tomcat Resources
A.13. Provisioning and Content
<property name="a" />
. It has to have an explicitly defined closing tag, like <property name="a"></property>
. If you don't want to revise your Ant script XML file, copy and paste the recipe directly into the text field instead of uploading the file.
A.14. Alerts
INFO [CacheConsistencyManagerBean] localhost took [51]ms to reload global cache INFO [CacheConsistencyManagerBean] localhost took [49]ms to reload cache for 1 agents
A.15. Monitoring
- It is enabled
- The path to the log is valid; and
- The selected date format matches what you have in the logs
java.text.SimpleDateFormat
.