RockteMQ-AI commented on issue #10591:
URL: https://github.com/apache/rocketmq/issues/10591#issuecomment-4902573689
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
The reported issue has been verified against the current codebase.
**Root Cause:** `NetworkUtil.string2SocketAddress()` uses `lastIndexOf(":")`
to split host and port. For IPv6 addresses in bracket notation (e.g.
`[240e:341:6246:c700:c4ad:e645:459e:2]:44880`), the host part retains the
brackets. When passed to `new InetSocketAddress("[240e:...]", port)`, the
address cannot be resolved, causing `getAddress()` to return `null`.
**Code path:**
1. `SendMessageActivity.java:300` — `context.getRemoteAddress()` returns the
IPv6 address with brackets from gRPC metadata
2. Stored as `PROPERTY_BORN_HOST` and forwarded to Broker
3. `NetworkUtil.string2SocketAddress()` (common module, line 194) parses
incorrectly
4. `CommitLog.asyncPutMessage()` (line 993-994) —
`bornSocketAddress.getAddress()` triggers NPE
**Impact:** All message sends through Proxy with IPv6 gRPC clients fail
**Severity:** High — complete message send failure in IPv6 Proxy deployments
**Affected code:**
- `common/src/main/java/org/apache/rocketmq/common/utils/NetworkUtil.java` —
`string2SocketAddress()`
- Also affects `RemotingHelper.string2SocketAddress()` in the remoting module
An automated fix proposal will be generated. Reply `/approve` to proceed
with PR generation.
---
*Automated evaluation by github-manager-bot*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]