N.B. DBTuna cannot run as the root user!
The reason DBTuna cannot run as root is because it contains mysql which it uses as it's repository for performance data; and mysql itself cannot run as root. If for some reason you do run the dbtuna processes as root you may see the following problems:
[root@localhost dbtuna]# ./startDBTuna.sh
DBTuna Starting.....
[root@localhost dbtuna]# ./showStatus.sh
---------- DBTuna Status ----------
-----------------------------------
DBTuna Web GUI RUNNING
DBTuna Repository STOPPED
Although there is no error message when you run the startDBTuna.sh script; when you run the showStatus.sh script to verify the status of the processes the DBTuna repository is displayed as "STOPPED".
If you try running a collector agent when the DBTuna Repository is stopped then you will encounter a problem such as the following:
[root@dms1 agent]# ./startOracleAgent.sh dms2
Now tailing Agent start log for dms2
control-c to quit viewing the log
Cannot connect to DBTuna repository.java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.SocketException: java.net.ConnectException: Connection refused'.
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection refused
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2680)
at com.mysql.jdbc.Connection.
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.dbtuna.oracle.oracle_Collector.main(oracle_Collector.java:112)
** END NESTED EXCEPTION **
Attempted reconnect 3 times. Giving up.
This error message and stack trace is showing that the collector agent cannot connect to the DBTuna repository, and therefore stopped albeit ungracefully!