question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

start broker failed,the log shows NoSuchMethodError

See original GitHub issue

environment

  • jdk: 1.8.0_241
  • rocketmq: 4.7.0

reproduce

  • nohup sh bin/mqbroker -n localhost:9876 &
  • reference

error log: java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer

   2020-04-09 18:02:42 WARN brokerOutApi_thread_1 - registerBroker Exception, localhost:9876
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send request to <ocalhost/127.0.0.1:9876> failed
      at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:440) ~[rocketmq-remoting-4.7.0.jar:4.7.0]
      at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:373) ~[rocketmq-remoting-4.7.0.jar:4.7.0]
      at org.apache.rocketmq.broker.out.BrokerOuterAPI.registerBroker(BrokerOuterAPI.java:194) ~[rocketmq-broker-4.7.0.jar:4.7.0]
      at org.apache.rocketmq.broker.out.BrokerOuterAPI.access$000(BrokerOuterAPI.java:61) ~[rocketmq-broker-4.7.0.jar:4.7.0]
      at org.apache.rocketmq.broker.out.BrokerOuterAPI$1.run(BrokerOuterAPI.java:150) ~[rocketmq-broker-4.7.0.jar:4.7.0]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_241]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_241]
      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_241]
Caused by: io.netty.handler.codec.EncoderException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[netty-all-4.0.42.Final.jar:4.0.42.Final]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
vnhimcommented, Dec 9, 2020

I had the same issue but it was because I was building the distribution with a java version > 8…

Hope this help

0reactions
ssi-anikcommented, May 19, 2021

@vnhim I have been trying to build the rocketmq-console from the external project for the last 4/5 days. Was building locally on Java 14, was using it in java 8 docker container. Why don’t they just maintain a jar for the latest releases?! -- --

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run Kafka Console Producer (NoSuchMethodError)
This kind of error is usually related to mismatched versions of Kafka ... or you have mismatched versions of kafka broker and kafka...
Read more >
java.lang.NoSuchMethodError: PoolConfig ... - Kontext
The error happens to class PoolConfig where method setMinEvictableIdleTime doesn't exist. This class is part of Apache Commons Pool library ...
Read more >
In spark streaming with kafka i am getting error Exception in ...
I am getting error "Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.internal.Logging.$init$" while running the ...
Read more >
NoSuchMethodError in Java - Baeldung
As the name suggests, the NoSuchMethodError occurs when a particular method is not found. This method can either be an instance method or...
Read more >
Untitled
NoSuchElementException: None.get" appears inconsistently in Mirror Maker log. [KAFKA-371] - Creating topic of empty string puts broker in a bad state ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found