You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "HFFZZZ (via GitHub)" <gi...@apache.org> on 2023/08/23 13:10:24 UTC

[GitHub] [rocketmq] HFFZZZ opened a new issue, #7239: error Caused by: java.util.concurrent.CancellationException: Task was cancelled.

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

   ### 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
   
   CentOS8
   
   ### RocketMQ version
   
   rocketmq5.1.3
   
   ### JDK Version
   
   1.8
   
   ### Describe the Bug
   
   Why do I have no problem executing quick start environment inside docker when I start docker, but I use java client to connect, there will be this exception, ask for help
   
   error
   Caused by: java .util. concurrent. Cancellation Exception: Task was cancelled.
   at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1543)
   at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:586)
   at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567)
   at org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
   at org. apache .rocketmq. client. java. impl.Client Impl .start Up(ClientImpl.java:188)
   at org.apache.rocketmq.client.java.impl.consumer.PushConsumerImpl.startUp(PushConsumerImpl.java:161)
   at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
   at org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103)
   
   ### Steps to Reproduce
   
   java Client
   public static void main(String[] args) throws ClientException, IOException, InterruptedException {
   final ClientServiceProvider provider = ClientServiceProvider.loadService();
   
   String endpoints = "xx.xx.xx.xx:8081";
   ClientConfiguration clientConfiguration = ClientConfiguration.newBuilder()
   .setEndpoints(endpoints)
   .build();
   
   String tag = "*";
   FilterExpression filterExpression = new FilterExpression(tag, FilterExpressionType.TAG);
   
   String consumerGroup = "YourConsumerGroup";
   
   String topic = "TestTopic";
   
   PushConsumer pushConsumer = provider.newPushConsumerBuilder()
   .setClientConfiguration(clientConfiguration)
   
   .setConsumerGroup(consumerGroup)
   
   .setSubscriptionExpressions(Collections.singletonMap(topic, filterExpression))
   .setMessageListener(new MessageListener() {
   @OverRide
   public ConsumeResult consume(MessageView messageView) {
   System.out.println(messageView.toString());
   ByteBuffer body = messageView.getBody();
   String strbody =new String(body.array());
   System.out.println(strbody);
   //return ConsumeResult.SUCCESS;
   return null;
   }
   })
   .build();
   //Thread.sleep(Long.MAX_VALUE);
   
   // pushConsumer.close();
   }
   
   ### What Did You Expect to See?
   
   Does anyone know what the mistake was
   
   ### What Did You See Instead?
   
   Caused by: java.util.concurrent.CancellationException: Task was cancelled.
   
   ### 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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

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

   I'm experiencing the same thing I'm fine locally I deployed a Java client on top of centos link sending Reported error java.util.concurrent.CancellationException: Task was cancelled.


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

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

   rocketmq5.1.4 cluster mode, 5.0.6 client
   I'm having the same problem.
   
   2023-11-30 13:30:12.913 ERROR [73181] [http-nio-9998-exec-8] [o.a.c.c.C.[.[.[.[dispatcherServlet]#log:181] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.messaging.MessagingException: Task was cancelled.; nested exception is java.util.concurrent.CancellationException: Task was cancelled.] with root cause
   java.util.concurrent.CancellationException: Task was cancelled.
   	at com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1543)
   	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:586)
   	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
   	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
   	at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:240)
   	at com.google.common.util.concurrent.Futures.getDone(Futures.java:1181)
   	at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1130)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
   	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270)
   	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
   	at com.google.common.util.concurrent.AbstractFuture.setFuture(AbstractFuture.java:851)
   	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.setResult(AbstractTransformFuture.java:232)
   	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.setResult(AbstractTransformFuture.java:208)
   	at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:167)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
   	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270)
   	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
   	at com.google.common.util.concurrent.AbstractFuture.setFuture(AbstractFuture.java:851)
   	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.setResult(AbstractTransformFuture.java:232)
   	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.setResult(AbstractTransformFuture.java:208)
   	at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:167)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
   	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1270)
   	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
   	at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:783)
   	at io.grpc.stub.ClientCalls$GrpcFuture.set(ClientCalls.java:569)
   	at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:542)
   	at org.apache.skywalking.apm.plugin.grpc.v1.client.TracingClientCall$TracingClientCallListener.onClose(TracingClientCall.java:206)
   	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
   	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
   	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
   	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563)
   	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
   	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744)
   	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723)
   	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
   	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:750)


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

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

   I meet the same question
   When I followed the official quickstart steps, there was an error sending a message
   (https://rocketmq.apache.org/zh/docs/quickStart/01quickstart)
   server: aliyun centos7 rocketmq5.1.4
   client: macos idea rocketmq-client-java:5.0.5


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

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

   ![image](https://github.com/apache/rocketmq/assets/68361970/7654149b-1541-410c-854f-aceb7345dc3a)
   
   


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

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

   @francisoliverlee 


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

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

   I'm having the same problem, has it been solved please?


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7239:
URL: https://github.com/apache/rocketmq/issues/7239#issuecomment-2557902088

   This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7239: error Caused by: java.util.concurrent.CancellationException: Task was cancelled.
URL: https://github.com/apache/rocketmq/issues/7239


-- 
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] error Caused by: java.util.concurrent.CancellationException: Task was cancelled. [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7239:
URL: https://github.com/apache/rocketmq/issues/7239#issuecomment-2560455799

   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