Giter Club home page Giter Club logo

docker-controller-scala's Issues

docker-controller-scala-zookeeper do not works on Apple Silicon

Probrem

On an Apple Silicon machine, testcases which depend on docker-controller-scala-kafka hung-up in launching zookeeper containers.

And these sbt tasks as well:

  • sbt docker-controller-scala-zookeeper/test
  • sbt docker-controller-scala-kafka/test

Cause

zookeeper:3.4.9, the default image, is not compatible to arm64, so it doesn't work at all on Apple Silicon, like below:

❯ uname -m
arm64
❯ docker run -it zookeeper:3.4.9
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg

// stop the world...

Images >= 3.5 are compatible to arm64, so we could see they say binding to port /0.0.0.0:2181.

❯ docker run -it zookeeper:3.5
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg
2022-07-05 07:33:48,187 [myid:] - INFO  [main:QuorumPeerConfig@136] - Reading configuration from: /conf/zoo.cfg
2022-07-05 07:33:48,189 [myid:] - INFO  [main:QuorumPeerConfig@378] - clientPort is not set
2022-07-05 07:33:48,189 [myid:] - INFO  [main:QuorumPeerConfig@392] - secureClientPort is not set
2022-07-05 07:33:48,192 [myid:] - ERROR [main:QuorumPeerConfig@649] - Invalid configuration, only one server specified (ignoring)
2022-07-05 07:33:48,194 [myid:1] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2022-07-05 07:33:48,194 [myid:1] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2022-07-05 07:33:48,195 [myid:1] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2022-07-05 07:33:48,195 [myid:1] - WARN  [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running  in standalone mode
2022-07-05 07:33:48,198 [myid:1] - INFO  [main:ManagedUtil@45] - Log4j 1.2 jmx support found and enabled.
2022-07-05 07:33:48,209 [myid:1] - INFO  [main:QuorumPeerConfig@136] - Reading configuration from: /conf/zoo.cfg
2022-07-05 07:33:48,209 [myid:1] - INFO  [main:QuorumPeerConfig@378] - clientPort is not set
2022-07-05 07:33:48,210 [myid:1] - INFO  [main:QuorumPeerConfig@392] - secureClientPort is not set
2022-07-05 07:33:48,210 [myid:1] - ERROR [main:QuorumPeerConfig@649] - Invalid configuration, only one server specified (ignoring)
2022-07-05 07:33:48,210 [myid:1] - INFO  [main:ZooKeeperServerMain@118] - Starting server
2022-07-05 07:33:48,211 [myid:1] - INFO  [main:FileTxnSnapLog@115] - zookeeper.snapshot.trust.empty : false
2022-07-05 07:33:48,220 [myid:1] - INFO  [main:Environment@109] - Server environment:zookeeper.version=3.5.9-83df9301aa5c2a5d284a9940177808c01bc35cef, built on 01/06/2021 19:49 GMT
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:host.name=977a9a06c0fb
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.version=11.0.15
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.vendor=Oracle Corporation
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.home=/usr/local/openjdk-11
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.class.path=/apache-zookeeper-3.5.9-bin/bin/../zookeeper-server/target/classes:/apache-zookeeper-3.5.9-bin/bin/../build/classes:/apache-zookeeper-3.5.9-bin/bin/../zookeeper-server/target/lib/*.jar:/apache-zookeeper-3.5.9-bin/bin/../build/lib/*.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/zookeeper-jute-3.5.9.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/zookeeper-3.5.9.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/slf4j-log4j12-1.7.25.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/slf4j-api-1.7.25.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-transport-native-unix-common-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-transport-native-epoll-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-transport-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-resolver-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-handler-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-common-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-codec-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-buffer-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/log4j-1.2.17.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/json-simple-1.1.1.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jline-2.14.6.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-util-ajax-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-util-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-servlet-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-server-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-security-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-io-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-http-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/javax.servlet-api-3.1.0.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jackson-databind-2.10.5.1.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jackson-core-2.10.5.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jackson-annotations-2.10.5.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/commons-cli-1.2.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/audience-annotations-0.5.0.jar:/apache-zookeeper-3.5.9-bin/bin/../zookeeper-*.jar:/apache-zookeeper-3.5.9-bin/bin/../zookeeper-server/src/main/resources/lib/*.jar:/conf:
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.library.path=/usr/java/packages/lib:/lib:/usr/lib:/usr/lib64:/lib64
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.io.tmpdir=/tmp
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:java.compiler=<NA>
2022-07-05 07:33:48,221 [myid:1] - INFO  [main:Environment@109] - Server environment:os.name=Linux
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:os.arch=aarch64
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:os.version=5.10.104-linuxkit
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:user.name=zookeeper
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:user.home=/home/zookeeper
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:user.dir=/apache-zookeeper-3.5.9-bin
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.free=240MB
2022-07-05 07:33:48,222 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.max=1000MB
2022-07-05 07:33:48,224 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.total=252MB
2022-07-05 07:33:48,226 [myid:1] - INFO  [main:ZooKeeperServer@953] - minSessionTimeout set to 4000
2022-07-05 07:33:48,227 [myid:1] - INFO  [main:ZooKeeperServer@962] - maxSessionTimeout set to 40000
2022-07-05 07:33:48,227 [myid:1] - INFO  [main:ZooKeeperServer@181] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir /datalog/version-2 snapdir /data/version-2
2022-07-05 07:33:48,252 [myid:1] - INFO  [main:Log@169] - Logging initialized @432ms to org.eclipse.jetty.util.log.Slf4jLog
2022-07-05 07:33:48,309 [myid:1] - WARN  [main:ContextHandler@1660] - o.e.j.s.ServletContextHandler@323b36e0{/,null,STOPPED} contextPath ends with /*
2022-07-05 07:33:48,310 [myid:1] - WARN  [main:ContextHandler@1671] - Empty contextPath
2022-07-05 07:33:48,323 [myid:1] - INFO  [main:Server@375] - jetty-9.4.35.v20201120; built: 2020-11-20T21:17:03.964Z; git: bdc54f03a5e0a7e280fab27f55c3c75ee8da89fb; jvm 11.0.15+10
2022-07-05 07:33:48,345 [myid:1] - INFO  [main:DefaultSessionIdManager@334] - DefaultSessionIdManager workerName=node0
2022-07-05 07:33:48,345 [myid:1] - INFO  [main:DefaultSessionIdManager@339] - No SessionScavenger set, using defaults
2022-07-05 07:33:48,346 [myid:1] - INFO  [main:HouseKeeper@132] - node0 Scavenging every 600000ms
2022-07-05 07:33:48,349 [myid:1] - WARN  [main:ConstraintSecurityHandler@758] - [email protected]@323b36e0{/,null,STARTING} has uncovered http methods for path: /*
2022-07-05 07:33:48,364 [myid:1] - INFO  [main:ContextHandler@916] - Started o.e.j.s.ServletContextHandler@323b36e0{/,null,AVAILABLE}
2022-07-05 07:33:48,376 [myid:1] - INFO  [main:AbstractConnector@331] - Started ServerConnector@22a637e7{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2022-07-05 07:33:48,376 [myid:1] - INFO  [main:Server@415] - Started @560ms
2022-07-05 07:33:48,377 [myid:1] - INFO  [main:JettyAdminServer@116] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2022-07-05 07:33:48,379 [myid:1] - INFO  [main:ServerCnxnFactory@135] - Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
2022-07-05 07:33:48,380 [myid:1] - INFO  [main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 8 worker threads, and 64 kB direct buffers.
+ 2022-07-05 07:33:48,381 [myid:1] - INFO  [main:NIOServerCnxnFactory@686] - binding to port /0.0.0.0:2181
2022-07-05 07:33:48,391 [myid:1] - INFO  [main:ZKDatabase@117] - zookeeper.snapshotSizeFactor = 0.33
2022-07-05 07:33:48,394 [myid:1] - INFO  [main:FileTxnSnapLog@404] - Snapshotting: 0x0 to /data/version-2/snapshot.0
2022-07-05 07:33:48,396 [myid:1] - INFO  [main:FileTxnSnapLog@404] - Snapshotting: 0x0 to /data/version-2/snapshot.0
2022-07-05 07:33:48,402 [myid:1] - INFO  [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@132] - PrepRequestProcessor (sid:0) started, reconfigEnabled=false
2022-07-05 07:33:48,405 [myid:1] - INFO  [main:ContainerManager@64] - Using checkIntervalMs=60000 maxPerMinute=10000

However, when we run a arm64-compat image with --env ZOO_SERVERS, they never say binding to port /0.0.0.0:2181.
(similar issue: https://issues.apache.org/jira/browse/ZOOKEEPER-4238?focusedCommentId=17340212&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17340212)

❯ docker run -it -e ZOO_SERVERS=server.1=0.0.0.0:2888:3888 zookeeper:3.5
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg
2022-07-05 07:37:00,553 [myid:] - INFO  [main:QuorumPeerConfig@136] - Reading configuration from: /conf/zoo.cfg
2022-07-05 07:37:00,561 [myid:] - INFO  [main:QuorumPeerConfig@378] - clientPort is not set
2022-07-05 07:37:00,561 [myid:] - INFO  [main:QuorumPeerConfig@392] - secureClientPort is not set
2022-07-05 07:37:00,564 [myid:] - ERROR [main:QuorumPeerConfig@649] - Invalid configuration, only one server specified (ignoring)
2022-07-05 07:37:00,565 [myid:1] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2022-07-05 07:37:00,565 [myid:1] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2022-07-05 07:37:00,565 [myid:1] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2022-07-05 07:37:00,565 [myid:1] - WARN  [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running  in standalone mode
2022-07-05 07:37:00,567 [myid:1] - INFO  [main:ManagedUtil@45] - Log4j 1.2 jmx support found and enabled.
2022-07-05 07:37:00,577 [myid:1] - INFO  [main:QuorumPeerConfig@136] - Reading configuration from: /conf/zoo.cfg
2022-07-05 07:37:00,577 [myid:1] - INFO  [main:QuorumPeerConfig@378] - clientPort is not set
2022-07-05 07:37:00,577 [myid:1] - INFO  [main:QuorumPeerConfig@392] - secureClientPort is not set
2022-07-05 07:37:00,577 [myid:1] - ERROR [main:QuorumPeerConfig@649] - Invalid configuration, only one server specified (ignoring)
2022-07-05 07:37:00,578 [myid:1] - INFO  [main:ZooKeeperServerMain@118] - Starting server
2022-07-05 07:37:00,582 [myid:1] - INFO  [main:FileTxnSnapLog@115] - zookeeper.snapshot.trust.empty : false
2022-07-05 07:37:00,601 [myid:1] - INFO  [main:Environment@109] - Server environment:zookeeper.version=3.5.9-83df9301aa5c2a5d284a9940177808c01bc35cef, built on 01/06/2021 19:49 GMT
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:host.name=07957b1eb586
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.version=11.0.15
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.vendor=Oracle Corporation
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.home=/usr/local/openjdk-11
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.class.path=/apache-zookeeper-3.5.9-bin/bin/../zookeeper-server/target/classes:/apache-zookeeper-3.5.9-bin/bin/../build/classes:/apache-zookeeper-3.5.9-bin/bin/../zookeeper-server/target/lib/*.jar:/apache-zookeeper-3.5.9-bin/bin/../build/lib/*.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/zookeeper-jute-3.5.9.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/zookeeper-3.5.9.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/slf4j-log4j12-1.7.25.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/slf4j-api-1.7.25.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-transport-native-unix-common-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-transport-native-epoll-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-transport-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-resolver-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-handler-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-common-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-codec-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/netty-buffer-4.1.50.Final.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/log4j-1.2.17.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/json-simple-1.1.1.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jline-2.14.6.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-util-ajax-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-util-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-servlet-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-server-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-security-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-io-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jetty-http-9.4.35.v20201120.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/javax.servlet-api-3.1.0.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jackson-databind-2.10.5.1.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jackson-core-2.10.5.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/jackson-annotations-2.10.5.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/commons-cli-1.2.jar:/apache-zookeeper-3.5.9-bin/bin/../lib/audience-annotations-0.5.0.jar:/apache-zookeeper-3.5.9-bin/bin/../zookeeper-*.jar:/apache-zookeeper-3.5.9-bin/bin/../zookeeper-server/src/main/resources/lib/*.jar:/conf:
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.library.path=/usr/java/packages/lib:/lib:/usr/lib:/usr/lib64:/lib64
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.io.tmpdir=/tmp
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:java.compiler=<NA>
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:os.name=Linux
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:os.arch=aarch64
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:os.version=5.10.104-linuxkit
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:user.name=zookeeper
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:user.home=/home/zookeeper
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:user.dir=/apache-zookeeper-3.5.9-bin
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.free=240MB
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.max=1000MB
2022-07-05 07:37:00,602 [myid:1] - INFO  [main:Environment@109] - Server environment:os.memory.total=252MB
2022-07-05 07:37:00,608 [myid:1] - INFO  [main:ZooKeeperServer@953] - minSessionTimeout set to 4000
2022-07-05 07:37:00,608 [myid:1] - INFO  [main:ZooKeeperServer@962] - maxSessionTimeout set to 40000
2022-07-05 07:37:00,609 [myid:1] - INFO  [main:ZooKeeperServer@181] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir /datalog/version-2 snapdir /data/version-2
2022-07-05 07:37:00,630 [myid:1] - INFO  [main:Log@169] - Logging initialized @367ms to org.eclipse.jetty.util.log.Slf4jLog
2022-07-05 07:37:00,738 [myid:1] - WARN  [main:ContextHandler@1660] - o.e.j.s.ServletContextHandler@323b36e0{/,null,STOPPED} contextPath ends with /*
2022-07-05 07:37:00,738 [myid:1] - WARN  [main:ContextHandler@1671] - Empty contextPath
2022-07-05 07:37:00,756 [myid:1] - INFO  [main:Server@375] - jetty-9.4.35.v20201120; built: 2020-11-20T21:17:03.964Z; git: bdc54f03a5e0a7e280fab27f55c3c75ee8da89fb; jvm 11.0.15+10
2022-07-05 07:37:00,783 [myid:1] - INFO  [main:DefaultSessionIdManager@334] - DefaultSessionIdManager workerName=node0
2022-07-05 07:37:00,783 [myid:1] - INFO  [main:DefaultSessionIdManager@339] - No SessionScavenger set, using defaults
2022-07-05 07:37:00,791 [myid:1] - INFO  [main:HouseKeeper@132] - node0 Scavenging every 600000ms
2022-07-05 07:37:00,796 [myid:1] - WARN  [main:ConstraintSecurityHandler@758] - [email protected]@323b36e0{/,null,STARTING} has uncovered http methods for path: /*
2022-07-05 07:37:00,804 [myid:1] - INFO  [main:ContextHandler@916] - Started o.e.j.s.ServletContextHandler@323b36e0{/,null,AVAILABLE}
2022-07-05 07:37:00,822 [myid:1] - INFO  [main:AbstractConnector@331] - Started ServerConnector@22a637e7{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2022-07-05 07:37:00,823 [myid:1] - INFO  [main:Server@415] - Started @562ms
2022-07-05 07:37:00,823 [myid:1] - INFO  [main:JettyAdminServer@116] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2022-07-05 07:37:00,824 [myid:1] - INFO  [main:ContainerManager@64] - Using checkIntervalMs=60000 maxPerMinute=10000

Suggest of solution

upgrade base zookeeper image 3.4.9 -> 3.5 (or newer)

  object ZooKeeperController {
    final val DefaultImageName              = "zookeeper"
+   final val DefaultImageTag: Some[String] = Some("3.5")
-   final val DefaultImageTag: Some[String] = Some("3.4.9")
    final val DefaultZooPort                = 2181
+   final val RegexForWaitPredicate: Regex  = """binding to port /0.0.0.0:.*""".r
-   final val RegexForWaitPredicate: Regex  = """binding to port 0.0.0.0/0.0.0.0:.*""".r

makes ZOO_SERVERS optional

    private def environmentVariables(myId: Int) =
      Map(
        "ZOO_MY_ID"   -> myId.toString,
        "ZOO_PORT"    -> containerPort.toString,
-       "ZOO_SERVERS" -> s"server.$myId=0.0.0.0:2888:3888"
      ) ++ envVars

or depends on os.arch

    private def environmentVariables(myId: Int) = {
+      val defaultEnvVarsExcludeAarch64 = Option
+        .unless(sys.props("os.arch") == "aarch64") {
+          "ZOO_SERVERS" -> s"server.$myId=0.0.0.0:2888:3888"
+        }.toMap
+  
      Map(
        "ZOO_MY_ID" -> myId.toString,
        "ZOO_PORT"  -> containerPort.toString
+      ) ++ defaultEnvVarsExcludeAarch64 ++ envVars
-       "ZOO_SERVERS" -> s"server.$myId=0.0.0.0:2888:3888"
-      ) ++ envVars
    }

https://github.com/j5ik2o/docker-controller-scala/blob/main/docker-controller-scala-zookeeper/src/main/scala/com/github/j5ik2o/dockerController/zooKeeper/ZooKeeperController.scala

I'm not sure if the solution also works on x86_64.

NullPointerEx occurred when exists image that TAG is none on local machine.

Problem

NullPointerEx occurred when exists image that TAG is none on local machine.

Exception encountered when invoking run on a nested suite.
java.lang.NullPointerException
	at java.lang.reflect.Array.getLength(Native Method)
	at scala.collection.ArrayOps$.contains$extension(ArrayOps.scala:683)
	at com.github.j5ik2o.dockerController.DockerControllerImpl.$anonfun$pullImageIfNotExists$1(DockerController.scala:199)
	at com.github.j5ik2o.dockerController.DockerControllerImpl.$anonfun$pullImageIfNotExists$1$adapted(DockerController.scala:191)
	at scala.collection.IterableOnceOps.exists(IterableOnce.scala:591)
	at scala.collection.IterableOnceOps.exists$(IterableOnce.scala:588)
	at scala.collection.AbstractIterable.exists(Iterable.scala:919)
	at com.github.j5ik2o.dockerController.DockerControllerImpl.existsImage(DockerController.scala:184)
	at com.github.j5ik2o.dockerController.DockerControllerImpl.pullImageIfNotExists(DockerController.scala:191)

'docker images' result like this.

> docker images
REPOSITORY             TAG
example/foo-bar       <none> 

Cause

On DockerController#pullImageIfNotExists, p.getRepoTags is return null when the exists image's TAG is none.

Suggest of solution

Add null check for result ofp.getRepoTags.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): Update dependency co.elastic.clients:elasticsearch-java to v7.17.23
  • chore(deps): Update dependency org.elasticsearch.client:elasticsearch-rest-high-level-client to v7.17.23
  • chore(deps): Update dependency scalafmt to v3.8.3
  • chore(deps): Update dependency org.apache.kafka:kafka-clients to v3.8.0
  • 🔐 Create all rate-limited PRs at once 🔐

Warning

Renovate failed to look up the following dependencies: Failed to look up sbt-package package org.seasar.util:s2util.

Files affected: project/Dependencies.scala


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/bump-version.yml
  • actions/checkout v4.1.7
  • mathieudutour/github-tag-action v6.2
  • actions/create-release v1
.github/workflows/ci.yml
  • actions/checkout v4.1.7
  • actions/setup-java v3
  • actions/checkout v4.1.7
  • actions/setup-java v3
.github/workflows/release.yml
  • actions/checkout v4.1.7
  • actions/setup-java v3
  • olafurpg/setup-gpg v3
.github/workflows/snapshot.yml
  • actions/checkout v4.1.7
  • actions/setup-java v3
  • olafurpg/setup-gpg v3
sbt
build.sbt
  • org.flywaydb:flyway-core 9.22.3
  • org.flywaydb:flyway-mysql 9.22.3
  • co.elastic.clients:elasticsearch-java 7.17.22
  • com.fasterxml.jackson.core:jackson-databind 2.17.2
  • org.apache.logging.log4j:log4j-api 2.23.1
  • org.apache.logging.log4j:log4j-core 2.23.1
project/Dependencies.scala
  • org.slf4j:slf4j-api 1.7.36
  • com.amazonaws:aws-java-sdk-dynamodb 1.12.757
  • com.amazonaws:aws-java-sdk-s3 1.12.757
  • com.amazonaws:aws-java-sdk-sqs 1.12.757
  • org.apache.zookeeper:zookeeper 3.9.2
  • org.apache.kafka:kafka-clients 3.7.1
  • com.mysql:mysql-connector-j 8.4.0
  • org.postgresql:postgresql 42.7.3
  • org.elasticsearch.client:elasticsearch-rest-high-level-client 7.17.22
  • org.seasar.util:s2util 0.0.1
  • org.freemarker:freemarker 2.3.33
  • commons-io:commons-io 2.16.1
  • net.debasishg:redisclient 3.42
  • com.twitter:finagle-memcached 22.12.0
  • com.fasterxml.jackson.module:jackson-module-scala 2.17.2
project/build.properties
  • sbt/sbt 1.10.0
project/plugins.sbt
  • org.scalameta:sbt-scalafmt 2.5.2
  • com.github.sbt:sbt-ci-release 1.5.12
  • pl.project13.scala:sbt-jmh 0.4.7
  • ch.epfl.scala:sbt-scalafix 0.12.1
scalafmt
.scalafmt.conf
  • scalafmt 3.8.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.