cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to store PingData in database

9999999
Explorer
0 Kudos

One node fails on environment.
We see this error in logs:
Failed to store PingData in database
org.jgroups.protocols.JDBC_PING
Could not open connection to database
StackTrace
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229) at org.jgroups.protocols.JDBC_PING.getConnection(JDBC_PING.java:298) at org.jgroups.protocols.JDBC_PING.writeToDB(JDBC_PING.java:138) at org.jgroups.protocols.JDBC_PING.write(JDBC_PING.java:125) at org.jgroups.protocols.FILE_PING.findMembers(FILE_PING.java:128) at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:214) at org.jgroups.protocols.Discovery.lambda$findMembers$0(Discovery.java:225) at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:324) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at jdk.internal.reflect.GeneratedConstructorAccessor448.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89) at com.mysql.cj.NativeSession.connect(NativeSession.java:120) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818) ... 15 more Caused by: java.net.UnknownHostException: hybrisdb-prd01.diymaxeda.org at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:801) at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1533) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1385) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1306) at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:130) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63) ... 18 more
Does anyone knows how to fix this ?

Accepted Solutions (0)

Answers (1)

Answers (1)

adambadura
Participant
0 Kudos

The cause of this is "java.net.UnknownHostException: hybrisdb-prd01.diymaxeda.org at" so you need to check:

  1. JDBC_PING configuration in jgroups-tcp.xml file - it is possible that it has wrong host name set in it
  2. If the hostname is OK then it is possible that this particular machine has wrong network config (DNS) which prevents it to resolve the hostname
9999999
Explorer
0 Kudos

@adambadu ,
Is it possible that one of nodes fails under havy load and after that we receive that error ?

adambadura
Participant
0 Kudos

9999999

I doubt it, the error is quite specifically pointing to a network failure or Jgroups misconfiguration.

Are you able to connect to this machine using ssh and try to validate the connection manually (is it CCV2 or on-prem)?

9999999
Explorer
0 Kudos

This is on-prem and it works for some time and if there is havy load it fails with this error.

adambadura
Participant
0 Kudos

One more question: is it the same node that fails every time?

Maybe the load that is applied on the system causes some kind of network of DNS resolution failure. It would be best to check using nslookup - when the problem appears then log in to the node and try:

nslookup hybrisdb-prd01.diymaxeda.org

When it returns something like "** server can't find hybrisdb-prd01.diymaxeda.org" then it is DNS resolution issue and you need to get help from a network expert at your team.