Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logstash failed to connect to mysql #393

Open
lwqacg opened this issue Sep 3, 2024 · 1 comment
Open

logstash failed to connect to mysql #393

lwqacg opened this issue Sep 3, 2024 · 1 comment

Comments

@lwqacg
Copy link

lwqacg commented Sep 3, 2024

"When synchronizing data between MySQL 8.0.3 and Elasticsearch 7.4.2, I am using Logstash version 7.4.2. However, after configuring and starting Logstash to initiate synchronization, I encountered the following error:"

[2024-09-03T17:01:52,587][ERROR][logstash.inputs.jdbc ][main] Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up."}
{ 2012 rufus-scheduler intercepted an error:
2012 job:
2012 Rufus::Scheduler::CronJob "* * * * *" {}
2012 error:
2012 2012
2012 Sequel::DatabaseConnectionError
2012 Java::JavaSql::SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
2012 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:110)
2012 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:97)
2012 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:89)
2012 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:63)
2012 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:73)
2012 com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(com/mysql/cj/jdbc/ConnectionImpl.java:898)
2012 com.mysql.cj.jdbc.ConnectionImpl.createNewIO(com/mysql/cj/jdbc/ConnectionImpl.java:823)
2012 com.mysql.cj.jdbc.ConnectionImpl.(com/mysql/cj/jdbc/ConnectionImpl.java:448)
2012 com.mysql.cj.jdbc.ConnectionImpl.getInstance(com/mysql/cj/jdbc/ConnectionImpl.java:241)
2012 com.mysql.cj.jdbc.NonRegisteringDriver.connect(com/mysql/cj/jdbc/NonRegisteringDriver.java:198)
2012 java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
2012 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:425)

@lwqacg
Copy link
Author

lwqacg commented Sep 3, 2024

I have already put mysql-connection-xxx.jar into logstash-core/lib/jars,and also i cmoment the jdbc_driver_library in config file. but it still does`t work, can anyone help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant