Splunk AppDynamics

Two Database Agents on same server for same Controller

CommunityUser
Splunk Employee
Splunk Employee

Hi all.
I've setup a "demo-App" consisting of a Apache-PHP based app ("front app"), against MySQL DB Server, and a Java-MicroService based app ("backend app"), against MS SQL DB Server, for AppDynamics testing purposes only.
In order to "see" database's activity, I tried to setup both database controllers, one for MS SQL Server and other for MySQL Server, and I've found a problem... After "first run" (and, probably, some others), both agents start showing the same error:

INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] Agent:180 - Starting DB Collector Agent....
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] Agent:245 - Configuration manager successfully configured
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] EventService:39 - Event Generation Service is : enabled
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] MetricService:46 - Metric Service is : [enabled].
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] MetricService:94 - Metric Generation Service is : enabled
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] ADBCollector:68 - Create new DB collector for: AGM-DB-MSSQLServer-Collector
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] ADBAvailabilityCollector:63 - Create new db availability Metrics collector for: AGM-DB-MSSQLServer-Collector
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] AServerCollector:90 - Create new hardware metric collector for: AGM-DB-MSSQLServer-Collector
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] DBAgentMonitor:35 - DBAgentMonitor started
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-1] Agent:193 - Started DB Collector Agent successfully
INFO [<AGM-DB-MySQL-Collector>-Scheduler-2] ARelationalDBCollector:29 - (Re)initialize the DB collector 'AGM-DB-MySQL-Collector'.
INFO [<AGM-DB-MSSQLServer-Collector>-Scheduler-2] ARelationalDBCollector:29 - (Re)initialize the DB collector 'AGM-DB-MSSQLServer-Collector'.
ERROR [<AGM-DB-MySQL-Collector>-Scheduler-2] ADBCollector:208 - Error collecting data for database 'AGM-DB-MySQL-Collector'
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client

INFO [-Scheduler-2] MSSqlCollector:82 - SQL Server Version = 14.0.2002.14 ( 2014.0 )

INFO [-Scheduler-3] AServerCollector:180 - (Re)initialize the hardware metric collector 'AGM-DB-MySQL-Collector'.

INFO [-Scheduler-2] AServerCollector:180 - (Re)initialize the hardware metric collector 'AGM-DB-MSSQLServer-Collector'.

INFO [-Scheduler-3] AServerCollector:274 - Locale requested of 'en-US' and set to 'en_US'.

INFO [-Scheduler-2] AServerCollector:274 - Locale requested of 'en-US' and set to 'en_US'.

INFO [-Scheduler-1] RelationalDBAvailabilityCollector:51 - (Re)initialize the DB Availability collector 'AGM-DB-MySQL-Collector'.

ERROR [-Scheduler-1] ADBAvailabilityCollector:119 - Error collecting data for database 'AGM-DB-MySQL-Collector'

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client

INFO [-Scheduler-1] DBCollectorAgentMonitorDelegate:171 - Stopping DB collector agent 'AGM-DB-MySQL-Collector''s delegate...

INFO [Thread-2] ADBCollector:110 - DB collector [AGM-DB-MySQL-Collector] shut down!

INFO [Thread-4] ADBAvailabilityCollector:92 - DB Availability Metrics collector [AGM-DB-MySQL-Collector] shut down!

INFO [-Scheduler-1] RelationalDBAvailabilityCollector:51 - (Re)initialize the DB Availability collector 'AGM-DB-MSSQLServer-Collector'.

Maybe, this is due to something related with "both agents colliding"? I've seen that starting ONLY ONE AGENT (for instance, MS SQL Server), the MS SQLServer agent works fine, but the other (MySQL) does NOT work; and I want to monitor both databases... In the case I start the MySQL agent, curiously only MS SQLServer agent is active, and MySQL agent also crashes.

And... what about that "MySQLNonTransientConnectionException" exception?

Any help is appretiated. 🙂

PS: By the way, why agents take so long to "stop" when pressing Ctrl-C?

Labels (1)
0 Karma
1 Solution

CommunityUser
Splunk Employee
Splunk Employee

Hi, Radhika.

First of all, thanks for the comment.

The problem is now over.

1.- To connect to two different databases, I had to define two Collectors. Both are now working.

2.- To connect to MySQL I've had to declare the "custom Connection string", adding a custom "...&characterEncoding=latin1" parameter, since from "some given MySQL server version", the default database encoding has changed. That was the "MySQLNonTransientConnectionException" that raised.

3.- I can "connect" the database calls, from within an application to a given Collector by using the "Details" page, and mapping the "database server" in the app to the Collector.

Regards.

View solution in original post

CommunityUser
Splunk Employee
Splunk Employee

Greetings!

Thank you for posting the question on the AppDynamics Community.

I see that you are using multiple Database Agents on the same machine and by looking at the documentation, what I understand is specific system settings are required in order to bring them up correctly. 

Please refer to the  Multiple Agent Environment Properties Documentation and check your system configuration.

Please let us know if the problem still persists.

Thank You

Radhika

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi @Anonymous,

So if I need to monitor two different databases, say one is PostgreSQL and the other one is MYSQL, do I need to download two database agents and run them separately? Or I can do it using one database agent only with two separately defined database collectors?

Thanks

0 Karma

Peter_Holditch
Builder

One database agent hosting 2 configured collectors is the expected deployment model.

The documentation describes this here.

Warm regards,

Peter

CommunityUser
Splunk Employee
Splunk Employee

Hi, Radhika.

First of all, thanks for the comment.

The problem is now over.

1.- To connect to two different databases, I had to define two Collectors. Both are now working.

2.- To connect to MySQL I've had to declare the "custom Connection string", adding a custom "...&characterEncoding=latin1" parameter, since from "some given MySQL server version", the default database encoding has changed. That was the "MySQLNonTransientConnectionException" that raised.

3.- I can "connect" the database calls, from within an application to a given Collector by using the "Details" page, and mapping the "database server" in the app to the Collector.

Regards.

Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...