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

[Bug] Incorrect broker address assigned as 127.0.0.1 in K8s deployment #8607

Closed
3 tasks done
chi3316 opened this issue Aug 29, 2024 · 0 comments · Fixed by #8608
Closed
3 tasks done

[Bug] Incorrect broker address assigned as 127.0.0.1 in K8s deployment #8607

chi3316 opened this issue Aug 29, 2024 · 0 comments · Fixed by #8608

Comments

@chi3316
Copy link
Contributor

chi3316 commented Aug 29, 2024

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

Ubuntu 22.04
Kubernetes Cluster: Running on ACK

RocketMQ version

Branch: develop
Version: 5.3.1-SNAPSHOT

JDK Version

OpenJDK 8

Describe the Bug

In a Kubernetes environment, the RocketMQ Broker's address is incorrectly assigned as 127.0.0.1. This issue arises due to the getLocalInetAddress method in NetworkUtil, where loopback addresses are not excluded when traversing the localInetAddressList. As a result, when all IP addresses are internal, the method may incorrectly return 127.0.0.1

Steps to Reproduce

  1. Deploy RocketMQ in a Kubernetes cluster.
  2. Start the RocketMQ Broker.
  3. Check the registered Broker address in the NameServer using the clusterList command.

image

What Did You Expect to See?

The Broker address should be a valid non-loopback IP address corresponding to the network interface within the Kubernetes environment.

What Did You See Instead?

The Broker address was incorrectly assigned as 127.0.0.1.

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant