Skip to content

Commit

Permalink
bugfix can not find mysql dependency when startup (#1686)
Browse files Browse the repository at this point in the history
Signed-off-by: tomsun28 <tomsun28@outlook.com>
  • Loading branch information
tomsun28 authored Mar 25, 2024
1 parent 829696d commit 1d11a97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.dromara.hertzbeat.collector.collect.database;

import com.mysql.cj.jdbc.exceptions.CommunicationsException;
import org.dromara.hertzbeat.collector.collect.AbstractCollect;
import org.dromara.hertzbeat.collector.collect.common.cache.CacheIdentifier;
import org.dromara.hertzbeat.collector.collect.common.cache.ConnectionCommonCache;
Expand Down Expand Up @@ -100,10 +99,6 @@ public void collect(CollectRep.MetricsData.Builder builder, long monitorId, Stri
builder.setMsg("Not support database query type: " + jdbcProtocol.getQueryType());
break;
}
} catch (CommunicationsException communicationsException) {
log.warn("Jdbc sql error: {}, code: {}.", communicationsException.getMessage(), communicationsException.getErrorCode());
builder.setCode(CollectRep.Code.UN_REACHABLE);
builder.setMsg("Error: " + communicationsException.getMessage() + " Code: " + communicationsException.getErrorCode());
} catch (PSQLException psqlException) {
// for PostgreSQL 08001
if (CollectorConstants.POSTGRESQL_UN_REACHABLE_CODE.equals(psqlException.getSQLState())) {
Expand Down
2 changes: 1 addition & 1 deletion e2e/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.1'
version: '3.8'
services:
testing:
build:
Expand Down

0 comments on commit 1d11a97

Please sign in to comment.