cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

java.sql.SQLException: Unknown initial character set index '255' received from server.

Alexander.Lucke
Explorer

Hi,

 

I just upgraded to MySQL Enterprise 8.0 and wanted to test Appdynamics again after a long time (I used it some years ago with an older version of MySQL already). So I installed the new dbagent from AppDynamics and configured it (conf/controller_info.xml). When starting (./start-dbagent), I see the following error message:

 

...

14 Jan 2019 19:12:01,138 INFO [message redacted to protect privacy] Agent:246 - Started DB Collector Agent successfully
14 Jan 2019 19:12:02,135 INFO [message redacted to protect privacy-Scheduler-2] ARelationalDBCollector:30 - (Re)initialize the DB collector 'tal@db.dns-net.de'.
14 Jan 2019 19:12:02,947 ERROR [message redacted to protect privacy] ADBCollector:208 - Error collecting data for database '[message redacted to protect privacy]'
java.sql.SQLException: Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929)
at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1774)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3457)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2328)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.commons.dbcp2.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:89)
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:260)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:889)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:433)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:362)
at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)
at com.appdynamics.dbmon.dbagent.collector.db.relational.dbconnection.DataSourceManager.getConnection(DataSourceManager.java:53)
at com.singularity.ee.agent.dbagent.collector.db.ADBCollector.getConnection(ADBCollector.java:89)
at com.appdynamics.dbmon.dbagent.collector.db.relational.mysql.MySQLCollector.getDBVersion(MySQLCollector.java:62)
at com.singularity.ee.agent.dbagent.collector.db.relational.ARelationalDBCollector.setupCollector(ARelationalDBCollector.java:33)
at com.singularity.ee.agent.dbagent.collector.db.ADBCollector.run(ADBCollector.java:162)
at com.singularity.ee.util.javaspecific.scheduler.AgentScheduledExecutorServiceImpl$SafeRunnable.run(AgentScheduledExecutorServiceImpl.java:122)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at com.singularity.ee.util.javaspecific.scheduler.ADFutureTask$Sync.innerRunAndReset(ADFutureTask.java:335)
at com.singularity.ee.util.javaspecific.scheduler.ADFutureTask.runAndReset(ADFutureTask.java:152)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.access$101(ADScheduledThreadPoolExecutor.java:119)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.runPeriodic(ADScheduledThreadPoolExecutor.java:206)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.run(ADScheduledThreadPoolExecutor.java:236)
at com.singularity.ee.util.javaspecific.scheduler.ADThreadPoolExecutor$Worker.runTask(ADThreadPoolExecutor.java:694)
at com.singularity.ee.util.javaspecific.scheduler.ADThreadPoolExecutor$Worker.run(ADThreadPoolExecutor.java:726)
at java.lang.Thread.run(Thread.java:748)

 

Any ideas? My MySQL installation has the following RPMs on CentOS 7:

 

[root@db appdynamics]# rpm -qa | grep mysql
mysql-commercial-server-8.0.13-1.1.el7.x86_64
mysql-commercial-test-8.0.13-1.1.el7.x86_64
mysql-connector-java-8.0.13-1.el7.noarch
mysql-commercial-client-8.0.13-1.1.el7.x86_64
mysql-commercial-devel-8.0.13-1.1.el7.x86_64
mysql-commercial-backup-8.0.13-1.1.el7.x86_64
mysql-commercial-libs-8.0.13-1.1.el7.x86_64
mysql-commercial-embedded-compat-8.0.13-1.1.el7.x86_64
mysql-commercial-common-8.0.13-1.1.el7.x86_64
mysql-commercial-libs-compat-8.0.13-1.1.el7.x86_64

 

Thanks for any tips

Alexander Lucke

 

3 REPLIES 3

Naoto.Yamamoto
AppDynamics Team

Hi Alexander,

 

Thanks for posting the question on the Community.

 

It seems that this is caused by character set conflicts between DB collector and DB.

Could you try below to solve this issue?

 

  1. Go to DB collector configuration by clicking “Databases”->”Configuration”->”Collectors”->double click your target DB collector.
  2. In “Custom JDBC Connection String” column, put “jdbc:mysql://<hostname>:<port>/<dbname>?characterEncoding=latin1”. Please ensure you replace with your real DB information to hostname, port, and dbname.

 

After this executed, could you check its working, and share the log with us?

Let me know if this helped you.

 

Many thanks,

Naoto


Thanks,
Naoto Yamamoto




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Hi Naoto,

thanks for your help. This seemed to work. Unfortunately I get the next error message now:

16 Jan 2019 22:29:34,487 ERROR [-Scheduler-2] ADBCollector:208 - Error collecting data for database '[message redacted to protect privacy]'
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4004)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1284)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2312)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:774)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.commons.dbcp2.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:89)
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:260)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:889)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:433)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:362)
at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)
at com.appdynamics.dbmon.dbagent.collector.db.relational.dbconnection.DataSourceManager.getConnection(DataSourceManager.java:53)
at com.singularity.ee.agent.dbagent.collector.db.ADBCollector.getConnection(ADBCollector.java:89)
at com.appdynamics.dbmon.dbagent.collector.db.relational.mysql.MySQLCollector.getDBVersion(MySQLCollector.java:62)
at com.singularity.ee.agent.dbagent.collector.db.relational.ARelationalDBCollector.setupCollector(ARelationalDBCollector.java:33)
at com.singularity.ee.agent.dbagent.collector.db.ADBCollector.run(ADBCollector.java:162)
at com.singularity.ee.util.javaspecific.scheduler.AgentScheduledExecutorServiceImpl$SafeRunnable.run(AgentScheduledExecutorServiceImpl.java:122)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at com.singularity.ee.util.javaspecific.scheduler.ADFutureTask$Sync.innerRunAndReset(ADFutureTask.java:335)
at com.singularity.ee.util.javaspecific.scheduler.ADFutureTask.runAndReset(ADFutureTask.java:152)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.access$101(ADScheduledThreadPoolExecutor.java:119)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.runPeriodic(ADScheduledThreadPoolExecutor.java:206)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.run(ADScheduledThreadPoolExecutor.java:236)
at com.singularity.ee.util.javaspecific.scheduler.ADThreadPoolExecutor$Worker.runTask(ADThreadPoolExecutor.java:694)
at com.singularity.ee.util.javaspecific.scheduler.ADThreadPoolExecutor$Worker.run(ADThreadPoolExecutor.java:726)
at java.lang.Thread.run(Thread.java:748)

Hi Alexander,

 

It seems that mysql connector driver version is old one, so could you replace that with the latest one by the following steps?

  1. In <DB agent directory>/lib, please back up mysql-connector-<version>.jar file
  2. Download the latest mysql-connector JAR file from MySQL official site, selecting “Platform Independent”
  3. Copy mysql-connector-<new version>.jar file to <DB agent directory>/lib.
  4. Restart DB agent
Let me know if this helped you.

Many thanks,
Naoto

Thanks,
Naoto Yamamoto




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.