streamnative / pulsar-archived

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org
Apache License 2.0
72 stars 25 forks source link

ISSUE-12166: Failed to start standalone pulsar on Apple M1 #3088

Open sijie opened 3 years ago

sijie commented 3 years ago

Original Issue: apache/pulsar#12166


Describe the bug I follow the document https://pulsar.apache.org/docs/en/standalone-docker/#start-pulsar-in-docker, run the following command:

docker run -it -p 6650:6650 \
  -p 8080:8080 \
  --mount source=pulsardata,target=/pulsar/data \
  --mount source=pulsarconf,target=/pulsar/conf \
  --name pulsar apachepulsar/pulsar:2.8.0 \
  bin/pulsar standalone --no-stream-storage --no-functions-worker

but got an error:

03:47:27.880 [main] ERROR org.apache.pulsar.PulsarStandaloneStarter - Failed to start pulsar service.
java.lang.ExceptionInInitializerError: null
    at org.eclipse.jetty.http.MimeTypes.<clinit>(MimeTypes.java:175) ~[org.eclipse.jetty-jetty-http-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288) ~[org.eclipse.jetty-jetty-servlet-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:253) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.Server.start(Server.java:423) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.Server.doStart(Server.java:387) ~[org.eclipse.jetty-jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[org.eclipse.jetty-jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.apache.pulsar.broker.web.WebService.start(WebService.java:241) ~[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
    at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:723) ~[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
    at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:296) ~[org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
    at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:121) [org.apache.pulsar-pulsar-broker-2.8.0.jar:2.8.0]
Caused by: java.nio.charset.IllegalCharsetNameException: l;charset=iso-8859-1
    at java.nio.charset.Charset.checkName(Charset.java:308) ~[?:?]
    at java.nio.charset.Charset.lookup2(Charset.java:482) ~[?:?]
    at java.nio.charset.Charset.lookup(Charset.java:462) ~[?:?]
    at java.nio.charset.Charset.forName(Charset.java:526) ~[?:?]
    at org.eclipse.jetty.http.MimeTypes$Type.<init>(MimeTypes.java:107) ~[org.eclipse.jetty-jetty-http-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.http.MimeTypes$Type.<clinit>(MimeTypes.java:67) ~[org.eclipse.jetty-jetty-http-9.4.42.v20210604.jar:9.4.42.v20210604]
    ... 27 more

To Reproduce

Expected behavior

Screenshots

Desktop (please complete the following information):

Additional context Full log: error.log

github-actions[bot] commented 2 years ago

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

tom-haines commented 2 years ago

This issue is fixed in bookkeeper v4.15+. This new version of book keeper is in the pulsar v2.11+ branch blob/branch-2.11/pom.xml#L118.

I built 2.11 branch locally and could run standalone locally on M1 JVM 17 (aarch64) and issue is resolved in this context:

git clone https://github.com/apache/pulsar.git && cd pulsar
git checkout branch-2.11
./mvnw package -DskipTests
tar xfvz ./distribution/server/target/apache-pulsar-2.11.0-bin.tar.gz
./apache-pulsar-2.11.0/bin/pulsar standalone