streamnative / pulsar-archived

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

ISSUE-11053: start apache-pulsar-2.7.2 get Exception #2693

Open sijie opened 3 years ago

sijie commented 3 years ago

Original Issue: apache/pulsar#11053


Describe the bug run "bin/pulsar standalone" in terminal getting the following Exception.

21:25:19.829 [main] INFO org.apache.zookeeper.server.NIOServerCnxnFactory - binding to port 0.0.0.0/0.0.0.0:2181 21:25:19.854 [main] INFO org.apache.zookeeper.server.persistence.FileSnap - Reading snapshot data/standalone/zookeeper/version-2/snapshot.0 21:25:19.869 [main] INFO org.apache.zookeeper.server.persistence.FileTxnSnapLog - Snapshotting: 0x0 to data/standalone/zookeeper/version-2/snapshot.0 [AppClassLoader@7ad041f3] info processing reweavable type org.apache.zookeeper.server.FinalRequestProcessor: org/apache/zookeeper/server/FinalRequestProcessor.java [AppClassLoader@7ad041f3] info successfully verified type org.apache.pulsar.zookeeper.FinalRequestProcessorAspect exists. Originates from org/apache/pulsar/zookeeper/FinalRequestProcessorAspect.java java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initializeForJava11(ClassLoaderWeavingAdaptor.java:1073) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.defineClass(ClassLoaderWeavingAdaptor.java:1100) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.access$300(ClassLoaderWeavingAdaptor.java:66) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor$SimpleGeneratedClassHandler.acceptClass(ClassLoaderWeavingAdaptor.java:150) at org.aspectj.weaver.tools.WeavingAdaptor$WeavingClassFileProvider$1.acceptResult(WeavingAdaptor.java:920) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1428) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1196) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:551) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:387) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:116) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:51) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:565) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:855) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:753) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:676) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:634) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519) at org.apache.zookeeper.server.ZooKeeperServer.setupRequestProcessors(ZooKeeperServer.java:468) at org.apache.zookeeper.server.ZooKeeperServer.startup(ZooKeeperServer.java:459) at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:765) at org.apache.zookeeper.server.ServerCnxnFactory.startup(ServerCnxnFactory.java:98) at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:193) at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:428) at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:258) at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:115) Caused by: java.lang.IllegalAccessException: module java.base does not open java.lang to unnamed module @16c0663d at java.base/java.lang.invoke.MethodHandles.privateLookupIn(MethodHandles.java:260) ... 35 more java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.bindTo_Method" is null at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.defineClass(ClassLoaderWeavingAdaptor.java:1103) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.access$300(ClassLoaderWeavingAdaptor.java:66) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor$SimpleGeneratedClassHandler.acceptClass(ClassLoaderWeavingAdaptor.java:150) at org.aspectj.weaver.tools.WeavingAdaptor$WeavingClassFileProvider$1.acceptResult(WeavingAdaptor.java:920) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1428) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1196) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:551) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:387) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:116) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:51) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:565) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:855) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:753) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:676) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:634) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519) at org.apache.zookeeper.server.ZooKeeperServer.setupRequestProcessors(ZooKeeperServer.java:468) at org.apache.zookeeper.server.ZooKeeperServer.startup(ZooKeeperServer.java:459) at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:765) at org.apache.zookeeper.server.ServerCnxnFactory.startup(ServerCnxnFactory.java:98) at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:193) at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:428) at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:258) at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:115) [AppClassLoader@7ad041f3] warning define generated class failed -- (NullPointerException) Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.bindTo_Method" is null Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.bindTo_Method" is null java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.bindTo_Method" is null at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.defineClass(ClassLoaderWeavingAdaptor.java:1103) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.access$300(ClassLoaderWeavingAdaptor.java:66) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor$SimpleGeneratedClassHandler.acceptClass(ClassLoaderWeavingAdaptor.java:150) at org.aspectj.weaver.tools.WeavingAdaptor$WeavingClassFileProvider$1.acceptResult(WeavingAdaptor.java:920) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1428) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1196) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:551) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:387) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:116) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:51) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:565) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:855) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:753) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:676) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:634) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519) at org.apache.zookeeper.server.ZooKeeperServer.setupRequestProcessors(ZooKeeperServer.java:468) at org.apache.zookeeper.server.ZooKeeperServer.startup(ZooKeeperServer.java:459) at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:765) at org.apache.zookeeper.server.ServerCnxnFactory.startup(ServerCnxnFactory.java:98) at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:193) at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:428) at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:258) at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:115)

21:25:19.991 [main] ERROR org.apache.pulsar.PulsarStandaloneStarter - Failed to start pulsar service. java.lang.NoClassDefFoundError: org/apache/zookeeper/server/FinalRequestProcessor$AjcClosure1 at org.apache.zookeeper.server.ZooKeeperServer.setupRequestProcessors(ZooKeeperServer.java:468) ~[org.apache.pulsar-pulsar-zookeeper-2.7.2.jar:2.7.2] at org.apache.zookeeper.server.ZooKeeperServer.startup(ZooKeeperServer.java:459) ~[org.apache.pulsar-pulsar-zookeeper-2.7.2.jar:2.7.2] at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:765) ~[org.apache.pulsar-pulsar-zookeeper-2.7.2.jar:2.7.2] at org.apache.zookeeper.server.ServerCnxnFactory.startup(ServerCnxnFactory.java:98) ~[org.apache.pulsar-pulsar-zookeeper-2.7.2.jar:2.7.2] at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:193) ~[org.apache.pulsar-pulsar-zookeeper-utils-2.7.2.jar:2.7.2] at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:428) ~[org.apache.pulsar-pulsar-zookeeper-utils-2.7.2.jar:2.7.2] at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:258) ~[org.apache.pulsar-pulsar-broker-2.7.2.jar:2.7.2] at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:115) [org.apache.pulsar-pulsar-broker-2.7.2.jar:2.7.2] Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.FinalRequestProcessor$AjcClosure1 at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636) ~[?:?] at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?] ... 8 more 21:25:20.001 [Thread-0] ERROR org.apache.pulsar.PulsarStandaloneStarter - Shutdown failed: Cannot read the array length because "this.bs" is null java.lang.NullPointerException: Cannot read the array length because "this.bs" is null at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.stop(LocalBookkeeperEnsemble.java:481) ~[org.apache.pulsar-pulsar-zookeeper-utils-2.7.2.jar:2.7.2] at org.apache.pulsar.PulsarStandaloneStarter$1.run(PulsarStandaloneStarter.java:98) [org.apache.pulsar-pulsar-broker-2.7.2.jar:2.7.2]

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

leikang123 commented 3 years ago

I also encountered this exception. I started it on the Mac system, and the error message kept beating. Later, I switched to docker. The same is true. The cause of the investigation is still being investigated.