Robert Lor's Weblog
Test driving Hyperic HQ 4.x
Hyperic just released Hyperic HQ 4.x, and I recently took it for a test drive on OpenSolaris 2008.05. The installation went smoothly, but I ran into one issue when starting the server. With a 64-bit kernel, the startup script assumes you have 64-bit JRE on the system. It my case, the 64-bit JRE wasn't available, so the server startup failed. I could have installed the 64 bit version, but I decide to just comment out the check in the startup script (hq-server.sh) to use the 32-bit version. Below are the details of the installation steps.
Before running the Hyperic HQ install script, setup the database first. Below are the commands I used for PostgreSQL. Run psql, and then run the following commands:
postgres=# create role admin with login createdb password 'hqadmin'; CREATE ROLE postgres=# CREATE DATABASE "HQ" OWNER admin; CREATE DATABASE postgres=#
Now, run the install script (assuming you're unpacked the download in /var/tmp) and note the answers I entered in bold.
-bash-3.2# /var/tmp/hyperic-hq-installer/setup.sh Initializing Hyperic HQ 4.0.1 Installation... Loading taskdefs... Taskdefs loaded Choose which software to install: 1: Hyperic HQ Server 2: Hyperic HQ Agent You may enter multiple choices, separated by commas. 1,2 HQ server installation path [default '/home/hyperic']: /usr/local/hyperic Choices: 1: Oracle 9i/10g 2: PostgreSQL 3: MySQL 5.x What backend database should the HQ server use? [default '1']: 2 Enter the JDBC connection URL for the PostgreSQL database [default 'jdbc:postgresql://localhost:5432/HQ?protocolVersion=2']: Enter Enter the username to use to connect to the database: admin Enter the password to use to connect to the database: enter password here (again): enter password again HQ agent installation path [default '/usr/local/hyperic']: Enter Loading install configuration... Install configuration loaded. Preparing to install... Validating agent install configuration... Validating server install configuration... Checking server webapp port... Checking server secure webapp port... Checking server JRMP port... Checking server JNP port... Checking database permissions... Verifying admin user properties Validating server DB configuration... Installing the agent... Looking for previous installation Unpacking agent to: /usr/local/hyperic/agent-4.0.1... Setting permissions on agent binaries... Fixing line endings on text files... -------------------------------------------------------------------------------- Installation Complete: Agent successfully installed to: /usr/local/hyperic/agent-4.0.1 -------------------------------------------------------------------------------- You can now start your HQ agent by running this command: /usr/local/hyperic/agent-4.0.1/bin/hq-agent.sh start Installing the server... Unpacking server to: /usr/local/hyperic/server-4.0.1... Creating server configuration files... Copying binaries and libraries to server installation... Copying server configuration file... Copying server control file... Copying server binaries... Copying server libs... Setting up server database... Setting permissions on server binaries... Fixing line endings on text files... -------------------------------------------------------------------------------- Installation Complete: Server successfully installed to: /usr/local/hyperic/server-4.0.1 -------------------------------------------------------------------------------- You can now start your HQ server by running this command: /usr/local/hyperic/server-4.0.1/bin/hq-server.sh start Note that the first time the HQ server starts up it may take several minutes to initialize. Subsequent startups will be much faster. Once the HQ server reports that it has successfully started, you can log in to your HQ server at: http://opensolaris.local:7080/ username: hqadmin password: hqadmin To change your password, log in to the HQ server, click the "Administration" link, choose "List Users", then click on the "hqadmin" user. Setup completed. A copy of the output shown above has been saved to: /var/tmp/hyperic-hq-installer/installer-4.0.1/./hq-install.log
At this point the installation is completed, and the server can be started with the following line, but as you can see HQ failed to start.
-bash-3.2# /usr/local/hyperic/server-4.0.1/bin/hq-server.sh start Starting HQ server... Initializing HQ server configuration... Checking jboss jndi port... Checking jboss mbean port... Setting -d64 JAVA OPTION to enable SunOS 64-bit JRE Booting the HQ server (Using JAVA_OPTS=-XX:MaxPermSize=192m -Xmx512m -Xms512m -d64)... HQ failed to start The log file /usr/local/hyperic/server-4.0.1/logs/server.out may contain further details on why it failed to start.
Looking at the hq-server.sh script, I notice that it checks if you're running a 64-bit kernel. If so, it uses the 64-bit JRE. Since I only have 32-bit JRE on my system, I commented out the following section in hq-server.sh.
#if [ $THISOS = "SunOS" ] ; then
# ARCH=`isainfo -kv`
#
# case $ARCH in
# *64-bit*)
# echo "Setting -d64 JAVA OPTION to enable SunOS 64-bit JRE"
# HQ_JAVA_OPTS="${HQ_JAVA_OPTS} -d64"
# ;;
# esac
#fi
And rerunning the script, the server started up properly.
-bash-3.2# /usr/local/hyperic/server-4.0.1/bin/hq-server.sh start Starting HQ server... Removing stale pid file /usr/local/hyperic/server-4.0.1/logs/hq-server.pid Initializing HQ server configuration... Checking jboss jndi port... Checking jboss mbean port... Booting the HQ server (Using JAVA_OPTS=-XX:MaxPermSize=192m -Xmx512m -Xms512m)... HQ server booted. Login to HQ at: http://127.0.0.1:7080/ -bash-3.2#
At this point you can just hit the server by pointing the browser to http://127.0.0.1:7080/, and you should see the Portal Dashboard.
This is just a quick cheatsheet to get you started. The official installation/configuration instructions are available on Hyperic website.
Posted at 12:15AM Nov 20, 2008 by Robert Lor in PostgreSQL | Comments[0]