π Apache Hiveμ Metastoreλ‘ MySQLμ μ¬μ©νμλ λΆ
π MySQL μλΉμ€ μ¬μμν΄λ μ€λ₯κ° ν΄κ²°λμ§ μλ λΆ
π Ubuntu νκ²½μμ ꡬμΆνμλ λΆ
MySQLμ Too many connections μ€λ₯κ° ν΄κ²°λμ§ μλ νμ λ°κ²¬
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"
...
Q: μ... my.cnfνμΌμ μ무리 μμ ν΄λ μμ μ€λ₯κ° μκΎΈ λμ€λ€μ..π₯
μλ... μ€μλ‘ μ½λ©ν λ, 컀λ₯μ
μ λ«μ μ κ° μλͺ»ν건 λ§λλ°,
κ·Έλ λ€κ³ μ΄λ κ²κΉμ§ ν΄κ²° μ λ λ¬Έμ μΈκ°μπ«
A: γ
γ
γ
μ§μ νμκ³ ~
μλμ μμλ₯Ό λ°λΌμ λ¬Έμ ν΄κ²° κ°μ¦μ~~ββ
νλ¨μ λ΄μ©μ μ°Έκ³ νμ¬ μ΄ Disgustingν λ¬Έμ λ₯Ό ν΄κ²°νμμμ€ββ
service mysql restart
$ service mysql restart
* Stopping MySQL database server mysqld [fail]
* Starting MySQL database server mysqld [ OK ]
# μλ¨μ²λΌ "[fail]"μ΄ λ¨λ©΄ μμ ν my.cnf νμΌμ΄ μ λλ‘ λ°μλμ§ μμ κ²ββ
# MySQL λ²μ μ νμΈνκ³ , ν΄λΉ λ²μ μμ μ¬μ©ν μ μλ
# key-val μΈνΈλ₯Ό μ¬μ©νλμ§ λ€μ ν λ² νμΈνκ³ λ€μ λ¨κ³λ‘ κ³ κ³ β
MySQL νλ‘μΈμ€ κ°μ μ’ λ£
$ ps aux | grep mysql | grep -v grep
# μλ¨μ 컀맨λ μ€ν κ²°κ³Ό, "/usr/sbin/mysqld --basedir~" μ΄λΌκ³ λ¨λ
# νλ‘μΈμ€ λ²νΈ μ°Ύμμ κ°μ μ’
λ£ββ
$ kill -9 [mysqld pid]
service mysql start
$ service mysql start
* Starting MySQL database server mysqld [ OK ]
# μΌλ¨ MySQL μλΉμ€λ₯Ό κ°μ μ’
λ£ν ν, μ¬μμμ΄ λ¨
Apache Hive μ μ
# hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/hive/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Hive Session ID = ac4dd78d-818c-4033-8fef-51c1594d63dc
Logging initialized using configuration in jar:file:/opt/hive/lib/hive-common-3.1.2.jar!/hive-log4j2.properties Async: true
Hive Session ID = 5a25d539-0a84-4658-bb5d-ec719c9f7187
hive>
# μ€ μ§μ μ€ ν¬λΌμ΄μ€νΈ μνΌμ€ν ν΄κ²°μλ£ππππ