You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/12/17 15:08:48 UTC

[GitHub] [rocketmq] bendan365 opened a new issue, #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

bendan365 opened a new issue, #5728:
URL: https://github.com/apache/rocketmq/issues/5728

   {
       "status": {
           "code": "INTERNAL_SERVER_ERROR",
           "message": "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"
       }
   }


-- 
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


[GitHub] [rocketmq] bendan365 commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
bendan365 commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356674635

   > @bendan365 Please use the official client provided in [apache/rocketmq-clients](https://github.com/apache/rocketmq-clients)
   
   the php code is [example](https://github.com/apache/rocketmq-clients/blob/master/php/Consumer.php),but it is imperfect


-- 
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


[GitHub] [rocketmq] ShadowySpirits commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
ShadowySpirits commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356325504

   It seems like `GrpcClientSettingsManager#GrpcClientSettingsManager#` possibly returns null.
   
   https://github.com/apache/rocketmq/blob/bdf5c95ce686ff2721d67b0ef040262b57691132/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcClientSettingsManager.java#L69-L73
   
   cc @xdkxlk @drpmma 


-- 
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


[GitHub] [rocketmq] ShadowySpirits commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
ShadowySpirits commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356676371

   > > @bendan365 Please use the official client provided in [apache/rocketmq-clients](https://github.com/apache/rocketmq-clients)
   > 
   > the php code is [example](https://github.com/apache/rocketmq-clients/blob/master/php/Consumer.php),but it is imperfect
   
   PHP client is still working in progress, we can discuss this in [apache/rocketmq-clients](https://github.com/apache/rocketmq-clients). And It would be welcome if you help to improve it.


-- 
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


[GitHub] [rocketmq] bendan365 commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
bendan365 commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356658331

   ### rocketmq-all-5.0.0-bin-release
   ### use psotman
   **1、message data**
   {
       "auto_renew": true,
       "batch_size": 1,
       "filter_expression": {
           "expression": "*",
           "type": 2
       },
       "group": {
           "name": "xlp_test_consumer",
           "resource_namespace": ""
       },
       "message_queue": {
           "id": 1241820371,
           "permission": 3,
           "topic": {
               "name": "xlp_test_topic",
               "resource_namespace": ""
           }
       }
   }
   **2、metadata**
   KEY:x-mq-client-id,value:f122a1e0-dbcf-4ca4-9db7-221903354be7
   
   **the response data is**
   {
       "status": {
           "code": "INTERNAL_SERVER_ERROR",
           "message": "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"
       }
   }
   **proxy log**
   
   2022-12-18 12:03:15 ERROR GrpcConsumerThreadPool-11 - internal server error
   java.lang.NullPointerException: null
   	at org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)
   	at org.apache.rocketmq.proxy.grpc.v2.DefaultGrpcMessingActivity.receiveMessage(DefaultGrpcMessingActivity.java:120)
   	at org.apache.rocketmq.proxy.grpc.v2.GrpcMessagingApplication.lambda$receiveMessage$13(GrpcMessagingApplication.java:275)
   	at org.apache.rocketmq.proxy.grpc.v2.GrpcMessagingApplication$GrpcTask.run(GrpcMessagingApplication.java:445)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)


-- 
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


[GitHub] [rocketmq] drpmma closed issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma closed issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"
URL: https://github.com/apache/rocketmq/issues/5728


-- 
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


[GitHub] [rocketmq] ShadowySpirits commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
ShadowySpirits commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356327785

   @bendan365 Could you please give more detailed information? Such as client/proxy/broker version, and consumer type (push/pull or simple consumer).


-- 
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


[GitHub] [rocketmq] bendan365 commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
bendan365 commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1358964143

   ### use postman
   **1、call Telemetry**
   **Metadata**
   x-mq-client-id: client_test
   x-mq-language: JAVA
   **Message**
   {"settings":{"access_point":{"addresses":[{"host":"192.168.10.18","port":9876}],"scheme":2},"client_type":3,"metric":{"on":false},"request_timeout":{"nanos":1553717272,"seconds":"30"},"subscription":{"fifo":false,"receive_batch_size":2,"subscriptions":[{"expression":{"type":0,"expression":"*"},"topic":{"resource_namespace":"","name":"xlp_test_topic"}}],"group":{"name":"xlp_test_consumer"}},"user_agent":{"hostname":"localhost","language":"JAVA"}}}
   **Response data**
   {"status":{"code":"OK","message":"OK"},"settings":{"client_type":"SIMPLE_CONSUMER","access_point":{"scheme":"IPv6","addresses":[{"host":"192.168.10.18","port":9876}]},"backoff_policy":{"max_attempts":17,"customized_backoff":{"next":[{"seconds":"1"},{"seconds":"5"},{"seconds":"10"},{"seconds":"30"},{"seconds":"60"},{"seconds":"120"},{"seconds":"180"},{"seconds":"240"},{"seconds":"300"},{"seconds":"360"},{"seconds":"420"},{"seconds":"480"},{"seconds":"540"},{"seconds":"600"},{"seconds":"1200"},{"seconds":"1800"},{"seconds":"3600"},{"seconds":"7200"}]}},"request_timeout":{"seconds":"30","nanos":1553717272},"subscription":{"group":{"name":"xlp_test_consumer"},"subscriptions":[{"topic":{"name":"xlp_test_topic"},"expression":{"expression":"*"}}],"fifo":false,"receive_batch_size":32,"long_polling_timeout":{"seconds":"30"}},"user_agent":{"language":"JAVA","hostname":"localhost"},"metric":{}}}
   
   **2、call ReceiveMessage**
   **Metadata**
   x-mq-client-id: client_test
   **Message**
   {"auto_renew":false,"batch_size":2,"filter_expression":{"expression":"*","type":1},"group":{"name":"xlp_test_consumer","resource_namespace":""},"invisible_duration":{"nanos":802178351,"seconds":"30"},"message_queue":{"accept_message_types":[1,"MESSAGE_TYPE_UNSPECIFIED",1,"TRANSACTION",4],"broker":{"endpoints":{"addresses":[{"port":8978,"host":"192.168.10.136"}],"scheme":1},"id":-1239373962,"name":"sit"},"id":-624882815,"permission":3,"topic":{"name":"xlp_test_topic","resource_namespace":""}}}
   **Response data**
   {"status":{"code":"INTERNAL_SERVER_ERROR","message":"null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:71)"}}


-- 
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


[GitHub] [rocketmq] xdkxlk commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
xdkxlk commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1357385826

   > > 
   > 
   > ### proxy log
   > > ERROR GrpcConsumerThreadPool-11 - internal server error
   > > java.lang.NullPointerException: null
   > > at org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)
   > 
   > It is the proxy bug,not client. And the other language example,transmitted parameters are the same. I dont konw how to improve.
   
   The PHP client is still working in progress
   For 5.0 client, client should send the TelemetryCommand before send the ReceiveMessageRequest
   And for proxy, a more readable error message should be returned here


-- 
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


[GitHub] [rocketmq] drpmma commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1521185707

   Close because it belongs to the client.


-- 
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


[GitHub] [rocketmq] fengmk2 commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by "fengmk2 (via GitHub)" <gi...@apache.org>.
fengmk2 commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1705881991

   should set grpc deadline options on receiveMessage to avoid "java.lang.NullPointerException: null"


-- 
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


[GitHub] [rocketmq] bendan365 commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
bendan365 commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356656885

    $clientId = "localhost@".$this->getRandStr(4) . '@' . rand(0, 10) . '@' . $this->getRandStr(10);  
           $client = new MessagingServiceClient('127.0.0.1:8081', 
               [
                   'credentials' => ChannelCredentials::createSsl(file_get_contents(__DIR__."\\rocketmq.crt")),
                   'grpc.ssl_target_name_override'=>'localhost',
                   'update_metadata' => function ($metaData) use ($clientId) {
                       $metaData['x-mq-client-id'] = [$clientId];
                       return $metaData;
                   }
               ]        
           );
           $request = new ReceiveMessageRequest();
           $mq = new MessageQueue();
   
           $resource = new Resource();
           $resource->setName('xlp_test_topic');
           $mq->setAcceptMessageTypes([MessageType::NORMAL]);
           $mq->setTopic($resource);
           $request->setMessageQueue($mq);
   
           $group = new Resource();
           $group->setName('xlp_test_consumer');
           $request->setGroup($group);
   
           $filterExpression = new FilterExpression();
           $filterExpression->setExpression("common_test");
           $filterExpression->setType(FilterType::TAG);
           $request->setFilterExpression($filterExpression);
   
           $duration = new Duration();
           $duration->setSeconds(10);
           $request->setInvisibleDuration($duration);
   
           $request->setBatchSize(2);
           $request->setAutoRenew(false);
   
           $serverStreamingCall = $client->ReceiveMessage($request);
   
   
           $response = $serverStreamingCall->responses();


-- 
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


[GitHub] [rocketmq] ShadowySpirits commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
ShadowySpirits commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356672866

   @bendan365 Please use the official client provided in [apache/rocketmq-clients](https://github.com/apache/rocketmq-clients)


-- 
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


[GitHub] [rocketmq] ShadowySpirits commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
ShadowySpirits commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356678659

   > > 
   > 
   > ### proxy log
   > > ERROR GrpcConsumerThreadPool-11 - internal server error
   > > java.lang.NullPointerException: null
   > > at org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)
   > 
   > It is the proxy bug,not client. And the other language example,transmitted parameters are the same. I dont konw how to improve.
   
   A client should register itself to proxy before receive message so that proxy can get subscription for client settings. Anyway current logic of proxy is indeed improper and should be improved.


-- 
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


[GitHub] [rocketmq] bendan365 commented on issue #5728: Proxy ReceiveMessage the response data is "null. NullPointerException. org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)"

Posted by GitBox <gi...@apache.org>.
bendan365 commented on issue #5728:
URL: https://github.com/apache/rocketmq/issues/5728#issuecomment-1356677760

   > 
   
   ### proxy log
   
   > ERROR GrpcConsumerThreadPool-11 - internal server error
   > java.lang.NullPointerException: null
   > at org.apache.rocketmq.proxy.grpc.v2.consumer.ReceiveMessageActivity.receiveMessage(ReceiveMessageActivity.java:65)
   
   It is the proxy bug,not client.
   And the other language example,transmitted parameters are the same.
   I dont konw how to improve.


-- 
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