Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Upgrade Vertx to match BK's version (otherwise BK does not work) #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dlg99
Copy link
Owner

@dlg99 dlg99 commented Apr 11, 2023

Motivation

BK deployed with Pulsar fail on start with

ERROR org.apache.bookkeeper.common.component.AbstractLifecycleComponent - Failed to start Component: http-service
java.lang.NoSuchMethodError: 'io.vertx.core.Future io.vertx.core.Vertx.deployVerticle(io.vertx.core.Verticle)'
	at org.apache.bookkeeper.http.vertx.VertxHttpServer.startServer(VertxHttpServer.java:93) ~[org.apache.bookkeeper.http-vertx-http-server-4.16.0.jar:4.16.0]
	at org.apache.bookkeeper.server.service.HttpService.doStart(HttpService.java:62) ~[org.apache.bookkeeper-bookkeeper-server-4.16.0.jar:4.16.0]
	at org.apache.bookkeeper.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:83) ~[org.apache.bookkeeper-bookkeeper-common-4.16.0.jar:4.16.0]
	at org.apache.bookkeeper.common.component.LifecycleComponentStack.lambda$start$4(LifecycleComponentStack.java:144) ~[org.apache.bookkeeper-bookkeeper-common-4.16.0.jar:4.16.0]
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[com.google.guava-guava-31.0.1-jre.jar:?]
	at org.apache.bookkeeper.common.component.LifecycleComponentStack.start(LifecycleComponentStack.java:144) ~[org.apache.bookkeeper-bookkeeper-common-4.16.0.jar:4.16.0]
	at org.apache.bookkeeper.common.component.ComponentStarter.startComponent(ComponentStarter.java:84) ~[org.apache.bookkeeper-bookkeeper-common-4.16.0.jar:4.16.0]
	at org.apache.bookkeeper.server.Main.doMain(Main.java:224) ~[org.apache.bookkeeper-bookkeeper-server-4.16.0.jar:4.16.0]
	at org.apache.bookkeeper.server.Main.main(Main.java:199) ~[org.apache.bookkeeper-bookkeeper-server-4.16.0.jar:4.16.0]

The root cause is that BK upgraded to 4.16.0 and needs newer version of vertx that introduced API changes apache/bookkeeper#3435

Pulsar forces older version of dependency.

Modifications

Upgrade Vertx to the same version as BK

Verifying this change

  • Make sure that the change passes the CI checks.

Update standalone configuration:

diff --git a/conf/standalone.conf b/conf/standalone.conf
index f141946c29f..c7bbe8fdbb6 100644
--- a/conf/standalone.conf
+++ b/conf/standalone.conf
@@ -17,6 +17,11 @@
 # under the License.
 #

+
+httpServerEnabled=true
+httpServerPort=8000
+httpServerClass=org.apache.bookkeeper.http.vertx.VertxHttpServer
+
 ### --- General broker settings --- ###

 # The metadata store URL
@@ -51,7 +56,7 @@ advertisedAddress=
 haProxyProtocolEnabled=false

 # Number of threads to use for Netty IO. Default is set to 2 * Runtime.getRuntime().availableProcessors()
-numIOThreads=
+#numIOThreads=

 # Number of threads to use for ordered executor. The ordered executor is used to operate with zookeeper,
 # such as init zookeeper client, get namespace policies from zookeeper etc. It also used to split bundle. Default is 8

and run bin/pulsar standalone
Without the fix it fails with "Not enough non-faulty bookies available"

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@dlg99 dlg99 changed the title Upgrade Vertx to match BK's version (otherwise BK does not work) [fix] Upgrade Vertx to match BK's version (otherwise BK does not work) Apr 11, 2023
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant