Database logging not working, database logging icon crossed out, database logging error messages in gateway log
- My Database logging Icon is red and is crossed out.
- My connectionStatus field is showing as Not Connected in the Gateway Database-Logging plugin.
- There is an error message in the Gateway Log file.
Root Cause 1 -
Incorrect LD_LIBRARY_PATH specified
Root Cause 2 -
Database permissions not set or incorrectly set
Root Cause 3 -
Network connectivity issues / Database not available
Root Cause 4 -
Database Logging set to paused
Root Cause 5 -
Version table empty / incorrect version set
Root Cause 6 -
Database table does not exist
Root Cause 7 -
Primary key of the var_ref table exceeds maximum threshold
Root Cause 8 -
Database Queue buffer exceeded
Root Cause 9 -
Isolation level set to serializable (Oracle)
Root Cause 10 -
Item Values being discarded
Root Cause 11 -
Database version is not supported
Solution Root Cause 1 - Check your LD_LIBRARY_PATH and DATABASE path are set correctly in your gateway start script and check that the correct library files exist in the specified directory location.
Example for Postgres:
POSTGRESQL_LIB=/usr/pgsql-11/lib ; export POSTGRESQL_LIB
Solution Root Cause 2 - Check the Gateway Log file for access denied error messages.
Access denied for user 'itrsdb'@'%' to database 'ITRS', db error code: 1044 (type: DBMSAPI)  Access denied for user 'itrsdb'@'%' to database 'ITRS' DBMSAPIx
Set correct permissions as per ITRS guidance. Example MYSQL permissions requirements
Solution Root Cause 3 - Check the Gateway Log file for Connection Failed error messages. Like below:
2020-05-26 16:48:18.268-0400 WARN: Event:DatabaseLogging 1590526098.268009 DatabaseLogging /geneos/gateway[@name="ITRSGW_7039 Market_Data"] Connection Failed There was a problem connecting => db error msg: Can't connect to MySQL server on xxxx
Check that the Database is running and there are no network connectivity issues between the Gateway and Database server hosts.
Solution Root Cause 4 - Check the Gateway-Database-Logging plugin connectionPaused field
If connectionPaused is set then right click Gateway Icon, select Database Logging option, Connection, Resume - as per screenshot below
Solution Root Cause 5 - Check the gateway log for the error
The table version must match the appropriate schema for the Gateway version that is running.
Solution Root Cause 6 - Check gateway log file for invalid object name error messages
Invalid object name 'test_table'., db error code: 208
The table needs to be created at the Database Level as well as the Database Logging section within the gateway configuration.
Solution Root Cause 7 - If the Primary key of the var_ref tables exceeds the maximum value (2147483647) then the gateway will suspend Database Logging.
To remedy this you will need to:
Modify Key Value
Make space in the var_ref table by removing unwanted entries from the table. We would advise contact your DBA to assist with this.
Reset the key increment.
Solution Root Cause 8 - The Gateway will buffer all database updates into an internal queue if the connection to the database is broken. If the maximum allowed threshold for the queue buffer is breached then all database updates are written to files on the Gateway server.
This will continue until the connection is restored. You should involve your DBA in investigating why the connection to the Database is broken.
The Gateway will re-read database updates from file once the connection is reestablished automatically and this process can also be instigated manually.
Solution Root Cause 9 - If the Database isolation level is set to Serializable this may prevent database logging from working. This error is written to the gateway logs.
To remedy this change the IsolationLevel to Read committed in the Database Logging advanced tab.
Solution Root Cause 10 - The gateway log file will report value too large for column error message
ORA-12899: value too large for column "GENEOS"."EVENT_TABLE"."DESCRIPTION" (actual: 261, maximum: 250) DBMSAPI [Discarding event]
You will have to modify the database schema at the database level to increase the string length of the table to copy with longer strings.
Solution Root Cause 11 - Check compatibility matrix for supported versions.
If Issue Persists
- Please contact with our Client Services team via the chat service box available in any of our websites or via email to firstname.lastname@example.org
Make sure you provide to us:
-Gateway Diagnostics File and Database version
-Any troubleshooting step already verified from the ones described in this article.