[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885659#comment-17885659
 ] 

Kezhu Wang edited comment on ZOOKEEPER-4722 at 9/29/24 4:45 AM:
----------------------------------------------------------------

I set up a brand new env in docker from {{maven/3.9-eclipse-temurin-11}} and 
cloned 
https://gitlab.datafari.com/sandboxespublic/manifoldcf/-/tree/CONNECTORS-1740 
with following changes.

{noformat}
diff --git 
a/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperInstance.java
 b/framework/core/src/test/java/org/apache/manifoldcf/core/lockman
ager/ZooKeeperInstance.java
index 9dd7faf..1dc6ad2 100644
--- 
a/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperInstance.java
+++ 
b/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperInstance.java
@@ -98,7 +98,11 @@ public class ZooKeeperInstance {
       } catch (final IOException e) {
         // Ignore IOExceptions, since that seems to be normal when shutting
         // down zookeeper via thread.interrupt()
+       System.err.println("XXXXXX");
+       e.printStackTrace();
       } catch (final Throwable e) {
+       System.err.println("XXXXXX");
+       e.printStackTrace();
         exception = e;
       }
     }
{noformat}

I got logs.

{noformat}
    [junit] [Thread-0] INFO org.apache.zookeeper.server.ZooKeeperServerMain - 
Starting server
    [junit] XXXXXX
    [junit] java.lang.NoClassDefFoundError: com/codahale/metrics/Reservoir
    [junit]     at 
org.apache.zookeeper.metrics.impl.DefaultMetricsProvider$DefaultMetricsContext.lambda$getSummary$2(DefaultMetricsProvider.java:151)
    [junit]     at 
java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
    [junit]     at 
org.apache.zookeeper.metrics.impl.DefaultMetricsProvider$DefaultMetricsContext.getSummary(DefaultMetricsProvider.java:147)
    [junit]     at 
org.apache.zookeeper.server.ServerMetrics.<init>(ServerMetrics.java:76)
    [junit]     at 
org.apache.zookeeper.server.ServerMetrics.<clinit>(ServerMetrics.java:46)
    [junit]     at 
org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:133)
    [junit]     at 
org.apache.manifoldcf.core.lockmanager.ZooKeeperInstance$ZooKeeperThread.run(ZooKeeperInstance.java:97)
    [junit] Caused by: java.lang.ClassNotFoundException: 
com.codahale.metrics.Reservoir
    [junit]     at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    [junit]     at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    [junit]     at 
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
    [junit]     ... 7 more
{noformat}

{noformat}
    [junit] [Thread-17] INFO org.apache.zookeeper.server.ZooKeeperServerMain - 
Starting server
    [junit] XXXXXX
    [junit] java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.zookeeper.server.ServerMetrics
    [junit]     at 
org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:133)
    [junit]     at 
org.apache.manifoldcf.core.lockmanager.ZooKeeperInstance$ZooKeeperThread.run(ZooKeeperInstance.java:97)
{noformat}

I guess you could benefit from {{ZooKeeperServerMain::main}} or 
{{ZooKeeperServerEmbedded}} in starting ZooKeeper server for testing.

The log refects that it can't reach all servers in {{connectString}}.


was (Author: kezhuw):
I set up a brand new env in docker from {{maven/3.9-eclipse-temurin-11}} and 
cloned 
https://gitlab.datafari.com/sandboxespublic/manifoldcf/-/tree/CONNECTORS-1740 
with following changes.

{noformat}
diff --git 
a/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperInstance.java
 b/framework/core/src/test/java/org/apache/manifoldcf/core/lockman
ager/ZooKeeperInstance.java
index 9dd7faf..1dc6ad2 100644
--- 
a/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperInstance.java
+++ 
b/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperInstance.java
@@ -98,7 +98,11 @@ public class ZooKeeperInstance {
       } catch (final IOException e) {
         // Ignore IOExceptions, since that seems to be normal when shutting
         // down zookeeper via thread.interrupt()
+       System.err.println("XXXXXX");
+       e.printStackTrace();
       } catch (final Throwable e) {
+       System.err.println("XXXXXX");
+       e.printStackTrace();
         exception = e;
       }
     }
{noformat}

I got logs.

{noformat}
    [junit] [Thread-0] INFO org.apache.zookeeper.server.ZooKeeperServerMain - 
Starting server
    [junit] XXXXXX
    [junit] java.lang.NoClassDefFoundError: com/codahale/metrics/Reservoir
    [junit]     at 
org.apache.zookeeper.metrics.impl.DefaultMetricsProvider$DefaultMetricsContext.lambda$getSummary$2(DefaultMetricsProvider.java:151)
    [junit]     at 
java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
    [junit]     at 
org.apache.zookeeper.metrics.impl.DefaultMetricsProvider$DefaultMetricsContext.getSummary(DefaultMetricsProvider.java:147)
    [junit]     at 
org.apache.zookeeper.server.ServerMetrics.<init>(ServerMetrics.java:76)
    [junit]     at 
org.apache.zookeeper.server.ServerMetrics.<clinit>(ServerMetrics.java:46)
    [junit]     at 
org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:133)
    [junit]     at 
org.apache.manifoldcf.core.lockmanager.ZooKeeperInstance$ZooKeeperThread.run(ZooKeeperInstance.java:97)
    [junit] Caused by: java.lang.ClassNotFoundException: 
com.codahale.metrics.Reservoir
    [junit]     at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    [junit]     at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    [junit]     at 
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
    [junit]     ... 7 more
{noformat}

{noformat}
    [junit] [Thread-17] INFO org.apache.zookeeper.server.ZooKeeperServerMain - 
Starting server
    [junit] XXXXXX
    [junit] java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.zookeeper.server.ServerMetrics
    [junit]     at 
org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:133)
    [junit]     at 
org.apache.manifoldcf.core.lockmanager.ZooKeeperInstance$ZooKeeperThread.run(ZooKeeperInstance.java:97)
{noformat}

I guess you cloud benefit from {{ZooKeeperServerMain::main}} or 
{{ZooKeeperServerEmbedded}} in starting ZooKeeper server for testing.

The log refects that it can't reach all servers in {{connectString}}.

> Reproducible SessionTimeoutException for ZK3.5.7 and higher
> -----------------------------------------------------------
>
>                 Key: ZOOKEEPER-4722
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4722
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.7, 3.5.8, 3.6.2, 3.8.0, 3.7.1
>            Reporter: Olivier Tavard
>            Priority: Minor
>
> Hello Zookeeper team,
> I am contributing to the Apache ManifoldCF project, which is heavily relying 
> on Zookeeper, and I encountered a reproducible error for which we – the 
> ManifoldCF team - need your help:
> As part of its output connectors regular updates (ManifoldCF is a data 
> crawler that can send analysed documents to designated destination 
> applications), we are upgrading the Apache Solr output connector so that it 
> is compatible with Solr 9.2. This version of Solr uses Apache Zookeeper 
> 3.8.0, but when using the same Zookeeper version on the Apache ManifoldCF 
> side, we experienced reproducible tests failures on the Solr Output Connector 
> of ManifoldCF when building the project.
> We were able to pass tests with ZK up to version 3.5.6 included, but all of 
> the more recent versions fail [4].
> To ease your evaluation of the problem, we have prepared a fork of Apache 
> ManifoldCF where you can work and reproduce the issue [1]. The branch to be 
> used is CONNECTORS-1740, and the build procedure is as follows (the issue 
> occurs during the testings phase):
> git checkout CONNECTORS-1740
>  
> Now, in order to build with ant (exclusively with Java 11 otherwise it will 
> not work)
> First, Fetch the dependencies : 
> ant clean make-core-deps
>  
> Next, start the build itself: 
> ant clean build
>  
> You will get a success message for both commands.
>  
> Then start the MCF tests (this is what will trigger the error [4]):
> ant run-tests-framework
> Thanks in advance for your help.
> Best regards,
> Olivier
>  
> [1] https://gitlab.datafari.com/sandboxespublic/manifoldcf
> You can find here the email thread about this problem on the Apache 
> ManifoldCF developer Mailing List [2], as well as the jira issue dedicated to 
> it [3].
> [2] https://lists.apache.org/thread/3zx7c5nm23j6wfb0okf5xb01t9jb6lph
> [3] https://issues.apache.org/jira/browse/CONNECTORS-1740
> [4] Error logs we get:
> [junit] org.apache.zookeeper.ClientCnxn$SessionTimeoutException: Client 
> session timed out, have not heard from server in 2007ms for session id 0x0
> [junit]     at 
> org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1250)
> [junit] [reader] INFO org.apache.zookeeper.ZooKeeper - Session: 0x0 closed
> [junit] [reader-EventThread] INFO org.apache.zookeeper.ClientCnxn - 
> EventThread shut down for session: 0x0
> [junit] [reader] INFO org.apache.zookeeper.ZooKeeper - Initiating client 
> connection, connectString=localhost:8348 sessionTimeout=2000 
> watcher=org.apache.manifoldcf.core.lockmanager.ZooKeeperConnection$ZooKeeperWatcher@45c66a27
> [junit] [reader] INFO org.apache.zookeeper.ClientCnxnSocket - jute.maxbuffer 
> value is 1048575 Bytes
> [junit] [reader] INFO org.apache.zookeeper.ClientCnxn - 
> zookeeper.request.timeout value is 0. feature enabled=false
> [junit] [reader-SendThread(localhost:8348)] INFO 
> org.apache.zookeeper.ClientCnxn - Opening socket connection to server 
> localhost/127.0.0.1:8348.
> [junit] [reader-SendThread(localhost:8348)] INFO 
> org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to 
> authenticate using SASL (unknown error)
> [junit] [reader-SendThread(localhost:8348)] WARN 
> org.apache.zookeeper.ClientCnxn - Client session timed out, have not heard 
> from server in 2008ms for session id 0x0
> [junit] [reader-SendThread(localhost:8348)] WARN 
> org.apache.zookeeper.ClientCnxn - An exception was thrown while closing send 
> thread for session 0x0.
> [junit] org.apache.zookeeper.ClientCnxn$SessionTimeoutException: Client 
> session timed out, have not heard from server in 2008ms for session id 0x0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to