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 "The server time zone value 'KST' is unrecognized or represents more than one time zone." 오류 #86

Open
dduneon opened this issue Mar 7, 2024 · 0 comments
Assignees

Comments

@dduneon
Copy link
Member

dduneon commented Mar 7, 2024

🚨 어떤 버그인가요?

"The server time zone value 'KST' is unrecognized or represents more than one time zone." 라는 오류 메시지와 함께 Logstash가 정상적으로 실행되지 않는 오류

💥 어떤 상황에서 발생한 버그인가요?

  • logstash-7.16.3
  • elasticsearch-7.16.3
  • MYSQL Connector/J 8.0.16

logstash.conf

    jdbc_driver_library => "/Users/dduneon/dev/logstash-7.16.3/bin/mysql-connector-java-8.0.16.jar"
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://localhost:3306/test"
    jdbc_user => "root"
    jdbc_password => ""

💡 해결

MYSQL Connector/J 8.0.16 버전을 사용하고 있었는데, 8.0 버전을 사용하면 위같은 오류가 발생하여 JDBC Connection이 실패하는 경우가 많이 있다고 함.

Connector 5.1에서는 시스템 기본 Timezone을 사용하여 위와 같은 오류가 발생하지 않지만, 8부터 발생함
명시적으로 어떤 Timezone을 사용하는 지 지정해 주어서 해결할 수 있음

    jdbc_connection_string => "jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Seoul"

혹은 MySQL config 파일에 다음과 같이 명시해주면 된다고 함

[mysqld]
default_time_zone = '+09:00'

👀 참고할만한 자료(선택)

https://www.lesstif.com/dbms/mysql-jdbc-the-server-time-zone-value-kst-is-unrecognized-or-represents-more-than-one-time-zone-100204548.html

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