Hi Kannan, We are building / testing / running ZooKeeper in production using CentOS 7.5 among other linux versions, so 7.5 should definitely work. Although I am not sure about CentOS 7.
Do you actually need to run the tests? If not, then you can use the following command to skip the test executions: mvn clean install -DskipTests or if you also need the native libraries: mvn clean install -DskipTests -Pfull-build Also, if you think the tests are flaky in your case, you can ask maven to try them more times: mvn -Dsurefire.rerunFailingTestsCount=3 test -fae I use to build ZooKeeper many times in docker on my macbook pro, using an official CentOS 7.5 image. These are my steps: ``` docker run --volume ~/git:/git -it --rm centos:7.5.1804 /bin/bash # then inside docker I install all the dependencies I need (also everything for the native C library builds and the zkpython build) yum -y install autoconf automake mc git maven java cppunit python-setuptools screen libtool python-devel cppunit-devel gcc-c++ telnet openssl openssl-devel # if you also need SASL for the C client (only available on the master branch) yum -y install cyrus-sasl-md5 cyrus-sasl-gssapi cyrus-sasl-devel cd /git/zookeeper # this gives you a clean state, if you use git (not needed if you just downloaded the source tarball) git clean -xdf # full build incl. native C code, skipping the tests mvn clean install -Pfull-build -DskipTests ``` On Fri, Jan 24, 2020 at 8:52 AM KANNAN VARADHAN <kan...@ieee.org> wrote: > Hi Marnix: > > My initial selinux state was “Permissive”. > I rebooted with selinux disabled, and did the build. Same end result. > > org.apache.zookeeper.test.AsyncHammerTest has some variability (more or > less failures in any given run) but > org.apache.zookeeper.ClientRequestTimeoutTest and > org.apache.zookeeper.test.LocalSessionRequestTest > are consistent in the type of failure. > > Kannan > > > On Jan 23, 2020, at 9:12 PM, Marnix Janse <mar...@me.com.INVALID> wrote: > > > > Hi Kannan, > > > > Could it be that SElinux is active and the compiled files and test > scrips have an incorrect security context? To me it seems that the unit > test can’t connect to the processes or the processes are unable to accept > connections due to a missing or incorrect security policy. > > > > Cheers, > > Marnix > > > >> On 24 Jan 2020, at 00:52, KANNAN VARADHAN <kan...@ieee.org> wrote: > >> > >> > >> Hi: > >> > >> I am trying to fix (or understand, hence how to fix) this compile error > with zookeeper, v3.5.6, and am seeing failures. > >> Specifically, mvn test fails in some very specific tests. I am not > sure that it has anything to do directly with centos, per se. > >> > >> The environment: > >> > >> [➜ apache-zookeeper-3.5.6 ] uname -snr > >> Linux a5s1 5.4.13-1.el7.elrepo.x86_64 > >> [➜ apache-zookeeper-3.5.6 ] > >> [➜ apache-zookeeper-3.5.6 ] java -version > >> openjdk version "1.8.0_232" > >> OpenJDK Runtime Environment (build 1.8.0_232-b09) > >> OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode) > >> [➜ apache-zookeeper-3.5.6 ] > >> [➜ apache-zookeeper-3.5.6 ] cat /etc/os-release > >> NAME="CentOS Linux" > >> VERSION="7 (Core)" > >> ID="centos" > >> ID_LIKE="rhel fedora" > >> VERSION_ID="7" > >> PRETTY_NAME="CentOS Linux 7 (Core)" > >> ANSI_COLOR="0;31" > >> CPE_NAME="cpe:/o:centos:centos:7" > >> HOME_URL="https://www.centos.org/" > >> BUG_REPORT_URL="https://bugs.centos.org/" > >> > >> CENTOS_MANTISBT_PROJECT="CentOS-7" > >> CENTOS_MANTISBT_PROJECT_VERSION="7" > >> REDHAT_SUPPORT_PRODUCT="centos" > >> REDHAT_SUPPORT_PRODUCT_VERSION="7" > >> > >> [➜ apache-zookeeper-3.5.6 ] > >> > >> > >> The errors are in three tests and the pattern appears to be: > >> [ERROR] Tests run: 11, Failures: 2, Errors: 0, Skipped: 0, Time > elapsed: 20.583 s <<< FAILURE! - in > org.apache.zookeeper.server.ZooKeeperServerMainTest > >> java.lang.AssertionError: waiting for server being up at > org.apache.zookeeper.server.ZooKeeperServerMainTest.testReadOnlySnapshotDir(ZooKeeperServerMainTest.java:234) > >> java.lang.AssertionError: waiting for server being up at > org.apache.zookeeper.server.ZooKeeperServerMainTest.testReadOnlyTxnLogDir(ZooKeeperServerMainTest.java:273) > >> > >> [ERROR] Tests run: 107, Failures: 0, Errors: 6, Skipped: 0, Time > elapsed: 295.05 s <<< FAILURE! - in > org.apache.zookeeper.test.NettyNettySuiteTest > >> java.io.IOException: Couldn't instantiate > org.apache.zookeeper.server.NettyServerCnxnFactory at > org.apache.zookeeper.test.AsyncOpsTest.setUp(AsyncOpsTest.java:48) > >> java.lang.NullPointerException at > org.apache.zookeeper.test.AsyncOpsTest.tearDown(AsyncOpsTest.java:59) > >> java.io.IOException: Couldn't instantiate > org.apache.zookeeper.server.NettyServerCnxnFactory at > org.apache.zookeeper.test.AsyncOpsTest.setUp(AsyncOpsTest.java:48) > >> java.lang.NullPointerException at > org.apache.zookeeper.test.AsyncOpsTest.tearDown(AsyncOpsTest.java:59) > >> java.io.IOException: Couldn't instantiate > org.apache.zookeeper.server.NettyServerCnxnFactory at > org.apache.zookeeper.test.ReconfigTest.testQuorumSystemChange(ReconfigTest.java:815) > >> java.io.IOException: Couldn't instantiate > org.apache.zookeeper.server.NettyServerCnxnFactory at > org.apache.zookeeper.test.ReconfigTest.testBulkReconfig(ReconfigTest.java:437) > >> > >> [ERROR] Tests run: 105, Failures: 10, Errors: 2, Skipped: 0, Time > elapsed: 397.298 s <<< FAILURE! - in > org.apache.zookeeper.test.NioNettySuiteTest > >> java.io.IOException: Couldn't instantiate > org.apache.zookeeper.server.NettyServerCnxnFactory at > org.apache.zookeeper.test.ReconfigTest.testQuorumSystemChange(ReconfigTest.java:815) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testPortChange(ReconfigTest.java:589) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testPortChangeToBlockedPort(ReconfigTest.java:720) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testInitialConfigHasPositiveVersion(ReconfigTest.java:890) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testRemoveAddOne(ReconfigTest.java:259) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testRemoveAddTwo(ReconfigTest.java:339) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testPortChangeToBlockedPort(ReconfigTest.java:720) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testJMXBeanAfterRemoveAddOne(ReconfigTest.java:909) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testRoleChange(ReconfigTest.java:513) > >> java.io.IOException: Couldn't instantiate > org.apache.zookeeper.server.NettyServerCnxnFactory at > org.apache.zookeeper.test.ReconfigTest.testBulkReconfig(ReconfigTest.java:437) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testJMXBeanAfterRoleChange(ReconfigTest.java:986) > >> java.lang.AssertionError: waiting for server up at > org.apache.zookeeper.test.ReconfigTest.testRemoveOneAsynchronous(ReconfigTest.java:474) > >> > >> I have attached some of the mvn logs, but I am at a loss on how to > proceed. Is there a specific version of java and zookeeper I should be > using? > >> Something else I should look at? > >> > >> Thanks, > >> > >> Kannan > >> <2020-01-23T15:11:34PST-mvn-X-test.log> > >