MySQL APMIA agent is not connecting to MySQL
search cancel

MySQL APMIA agent is not connecting to MySQL

book

Article ID: 234715

calendar_today

Updated On:

Products

CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

MySQL APMIA agent is not working. We see the following ERROR in the agent log.

[ERROR] [IntroscopeAgent.DBMonitor] java.sql.SQLException: Could not connect to address=(host=hostname1.sgn.xxxx.net)(port=3306)(type=master) : RSA public key is not available client side (option serverRsaPublicKeyFile not set)

The online guide has following information about the MySQL Database Permissions for MySQL extension.

Configure MySQL Database Permissions

To monitor MySQL database, ensure that you have the following access privileges on all databases:
SELECT, PROCESS, and SHOW DATABASES

You can create a user with appropriate access privileges such as SELECT, PROCESS, and SHOW DATABASES.

To create a user, run the following command in the mysqld console. Here, host represents the hostname or IP address of the system, which executes the MySQL database monitoring and password is used to authenticate a user.

GRANT SELECT,PROCESS,SHOW DATABASES on *.* to 'monitoruser'@'host' identified by 'password';FLUSH privileges;

In the bundle.properties we have following:

introscope.agent.dbmonitor.mysql.profiles.db1.userName=root

We have confirmed that root user have permissions.

Environment

Release : 21.3

Component : APM Power Packs

Resolution

As a first try, we can change the user to use mysql_native_password plugin.

This appears to us an issue with using CachingSha2PasswordPlugin from the below log entry:

Caused by: java.sql.SQLException: RSA public key is not available client side (option serverRsaPublicKeyFile not set)
    at org.mariadb.jdbc.internal.com.send.authentication.CachingSha2PasswordPlugin.process(CachingSha2PasswordPlugin.java:187)

In another try, we can also add server-public-key-path to point to the client path to the public key.