You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "jiangxuhui (via GitHub)" <gi...@apache.org> on 2024/09/23 02:56:04 UTC
[I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
jiangxuhui opened a new issue, #8730:
URL: https://github.com/apache/rocketmq/issues/8730
### Before Creating the Bug Report
- [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
- [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.
- [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
### Runtime platform environment
system: ubuntu 22.04
version: rocketmq 5.2
env: k8s v.1.27
### RocketMQ version
rocketmq 5.2
### JDK Version
openjdk 1.8.0
### Describe the Bug
1、when i use dashboard send msg to topic testtopic1。
I had serach the documentary。no use


2、when i use go sdk v5.1 send msg to topic testtopic1.
```
2024-09-18T16:30:57.524+0800 INFO v5@v5.1.1-rc1/client.go:494 begin to start the rocketmq client {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.524+0800 INFO v5@v5.1.1-rc1/client_manager.go:105 begin to start the client manager
2024-09-18T16:30:57.524+0800 INFO v5@v5.1.1-rc1/client_manager.go:131 the client manager starts successfully
2024-09-18T16:30:57.536+0800 INFO v5@v5.1.1-rc1/rpc_client.go:84 create rpc client success, target=10.203.90.24:30006
2024-09-18T16:30:57.547+0800 INFO v5@v5.1.1-rc1/client.go:102 defaultClientSession is startUp! endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006} {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.548+0800 INFO v5@v5.1.1-rc1/client.go:489 telemeter to 10.203.90.24:30006 success {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.554+0800 INFO v5@v5.1.1-rc1/metric.go:184 metric is off, clientId=SISDRV2412@17544@0@h01n9bsjvk
2024-09-18T16:30:57.554+0800 INFO v5@v5.1.1-rc1/client.go:97 Executed command successfully {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.560+0800 WARN v5@v5.1.1-rc1/producer.go:253 failed to send message, would attempt to resend right now, topic=testtopic1, messageId(s)=[010050568CEC9A448806FC29C100000000], maxAttempts=3, attempt=1, endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006}, requestId=[329c98ec-055f-446d-b8cc-22e3c2eca689] {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.565+0800 WARN v5@v5.1.1-rc1/producer.go:253 failed to send message, would attempt to resend right now, topic=testtopic1, messageId(s)=[010050568CEC9A448806FC29C100000000], maxAttempts=3, attempt=2, endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006}, requestId=[329c98ec-055f-446d-b8cc-22e3c2eca689 9ee8e802-4313-4ba2-9933-2a566fb2fb06] {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.571+0800 ERROR v5@v5.1.1-rc1/producer.go:234 failed to send message(s) finally, run out of attempt times, topic=testtopic1, messageId(s)=[010050568CEC9A448806FC29C100000000], maxAttempts=3, attempt=3, endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006}, requestId=[329c98ec-055f-446d-b8cc-22e3c2eca689 9ee8e802-4313-4ba2-9933-2a566fb2fb06 8ffd7df2-869d-403d-ac61-d4bb7b3deee3] {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024/09/18 16:30:57 CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77)
```
### Steps to Reproduce
code like below:
```
package main
import (
"context"
"fmt"
"log"
"os"
"strconv"
"time"
rmq_client "github.com/apache/rocketmq-clients/golang/v5"
"github.com/apache/rocketmq-clients/golang/v5/credentials"
)
const (
Topic = "testtopic"
Endpoint = "192.168.228.130:8081"
)
func producer_ruyi() {
os.Setenv("mq.consoleAppender.enabled", "true")
rmq_client.ResetLogger()
producer, err := rmq_client.NewProducer(&rmq_client.Config{
Endpoint: Endpoint,
Credentials: &credentials.SessionCredentials{},
},
rmq_client.WithTopics(Topic),
)
if err != nil {
log.Fatal(err)
}
// start producer
err = producer.Start()
if err != nil {
log.Fatal(err)
}
// graceful stop producer
defer producer.GracefulStop()
for i := 0; i < 10; i++ {
// new a message
msg := &rmq_client.Message{
Topic: Topic,
Body: []byte("this is a message : " + strconv.Itoa(i)),
}
// set keys and tag
msg.SetKeys("a", "b")
msg.SetTag("ab")
// send message in sync
resp, err := producer.Send(context.TODO(), msg)
if err != nil {
log.Fatal(err)
}
for i := 0; i < len(resp); i++ {
fmt.Printf("%#v\n", resp[i])
}
// wait a moment
time.Sleep(time.Second * 1)
}
}
```
err msg:
```
2024-09-18T16:30:57.524+0800 INFO v5@v5.1.1-rc1/client.go:494 begin to start the rocketmq client {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.524+0800 INFO v5@v5.1.1-rc1/client_manager.go:105 begin to start the client manager
2024-09-18T16:30:57.524+0800 INFO v5@v5.1.1-rc1/client_manager.go:131 the client manager starts successfully
2024-09-18T16:30:57.536+0800 INFO v5@v5.1.1-rc1/rpc_client.go:84 create rpc client success, target=10.203.90.24:30006
2024-09-18T16:30:57.547+0800 INFO v5@v5.1.1-rc1/client.go:102 defaultClientSession is startUp! endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006} {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.548+0800 INFO v5@v5.1.1-rc1/client.go:489 telemeter to 10.203.90.24:30006 success {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.554+0800 INFO v5@v5.1.1-rc1/metric.go:184 metric is off, clientId=SISDRV2412@17544@0@h01n9bsjvk
2024-09-18T16:30:57.554+0800 INFO v5@v5.1.1-rc1/client.go:97 Executed command successfully {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.560+0800 WARN v5@v5.1.1-rc1/producer.go:253 failed to send message, would attempt to resend right now, topic=testtopic1, messageId(s)=[010050568CEC9A448806FC29C100000000], maxAttempts=3, attempt=1, endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006}, requestId=[329c98ec-055f-446d-b8cc-22e3c2eca689] {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.565+0800 WARN v5@v5.1.1-rc1/producer.go:253 failed to send message, would attempt to resend right now, topic=testtopic1, messageId(s)=[010050568CEC9A448806FC29C100000000], maxAttempts=3, attempt=2, endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006}, requestId=[329c98ec-055f-446d-b8cc-22e3c2eca689 9ee8e802-4313-4ba2-9933-2a566fb2fb06] {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024-09-18T16:30:57.571+0800 ERROR v5@v5.1.1-rc1/producer.go:234 failed to send message(s) finally, run out of attempt times, topic=testtopic1, messageId(s)=[010050568CEC9A448806FC29C100000000], maxAttempts=3, attempt=3, endpoints=scheme:IPv4 addresses:{host:"10.203.90.24" port:30006}, requestId=[329c98ec-055f-446d-b8cc-22e3c2eca689 9ee8e802-4313-4ba2-9933-2a566fb2fb06 8ffd7df2-869d-403d-ac61-d4bb7b3deee3] {"client_id": "SISDRV2412@17544@0@h01n9bsjvk"}
2024/09/18 16:30:57 CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77)
```
err log:

### What Did You Expect to See?
send success
### What Did You See Instead?
no success
### Additional Context
none
--
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "zonghaishang (via GitHub)" <gi...@apache.org>.
zonghaishang commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-2727942128
<img width="1529" alt="Image" src="https://github.com/user-attachments/assets/36a5bc47-3211-4d08-ba0f-97f343f85792" />
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "zonghaishang (via GitHub)" <gi...@apache.org>.
zonghaishang commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-2727909130
<!-- Failed to upload "image.png" -->
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "TickFairy (via GitHub)" <gi...@apache.org>.
TickFairy commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-2472295392
请问是否解决掉了
我也遇到此问题
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8730: [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77)
URL: https://github.com/apache/rocketmq/issues/8730
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "jiangxuhui (via GitHub)" <gi...@apache.org>.
jiangxuhui commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-2472298695
> 请问是否解决掉了 我也遇到此问题
放弃了,用kafka吧。阿里系的东西管生不管养,不赚钱,说不准明天就砍掉了
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-4104995366
This issue was closed because it has been inactive for 3 days since being marked as stale.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "coverstart (via GitHub)" <gi...@apache.org>.
coverstart commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-2545602467
我也遇到了,应该是ipv4和ipv6的问题,我强制识别成ipv4就没问题了,k8s statefulset加上环境变量
env:
- name: JAVA_OPTS
value: "-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true"
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] CODE: INTERNAL_SERVER_ERROR, MESSAGE: java.lang.NullPointerException, org.apache.rocketmq.common.message.MessageExt.socketAddress2ByteBuffer(MessageExt.java:77) [rocketmq]
Posted by "TickFairy (via GitHub)" <gi...@apache.org>.
TickFairy commented on issue #8730:
URL: https://github.com/apache/rocketmq/issues/8730#issuecomment-2472444961
> > 请问是否解决掉了 我也遇到此问题
>
> 放弃了,用kafka吧。阿里系的东西管生不管养,不赚钱,说不准明天就砍掉了
哈哈
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org