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

Handle subscription error #332

Open
zguesmi opened this issue Oct 1, 2020 · 1 comment
Open

Handle subscription error #332

zguesmi opened this issue Oct 1, 2020 · 1 comment

Comments

@zguesmi
Copy link
Member

zguesmi commented Oct 1, 2020

2020-10-01 11:12:19.027  INFO 6 --- [taskScheduler-2] c.i.w.replicate.ReplicateDemandService   : Received new task [chainTaskId:0x584c5e5b9e5fd2b65847ccd1765e87067bd5a734d523eddfc811b4b57660b10f]
2020-10-01 11:12:19.196 ERROR 6 --- [taskScheduler-2] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task.

java.lang.IllegalStateException: Connection closed
	at org.springframework.util.Assert.state(Assert.java:73)
	at org.springframework.messaging.simp.stomp.DefaultStompSession.execute(DefaultStompSession.java:285)
	at org.springframework.messaging.simp.stomp.DefaultStompSession.subscribe(DefaultStompSession.java:320)
	at org.springframework.messaging.simp.stomp.DefaultStompSession.subscribe(DefaultStompSession.java:301)
	at com.iexec.worker.pubsub.StompClient.subscribeToTopic(StompClient.java:94)
	at com.iexec.worker.pubsub.SubscriptionService.subscribeToTopic(SubscriptionService.java:68)
	at com.iexec.worker.replicate.ReplicateDemandService.askForReplicate(ReplicateDemandService.java:111)
	at jdk.internal.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
@zguesmi
Copy link
Member Author

zguesmi commented Oct 16, 2020

Worker should not subscribe to task when the session is not yes established.

2020-10-16 15:10:06.150  INFO 7 --- [           main] com.iexec.worker.Application             : Cool, your iexec-worker is all set!
2020-10-16 15:10:06.783  INFO 7 --- [           main] c.i.w.r.ReplicateRecoveryService         : No interrupted tasks to recover
2020-10-16 15:10:08.006  INFO 7 --- [taskScheduler-2] c.i.w.replicate.ReplicateDemandService   : Received new task [chainTaskId:0xab1366ecd1e8488e9daf8c478551e71362a586e67dc5f8a6f81aee6a27eae117]
2020-10-16 15:10:08.558 ERROR 7 --- [taskScheduler-2] o.s.s.s.TaskUtils$LoggingErrorHandler    : Unexpected error occurred in scheduled task.

java.lang.NullPointerException: null
	at com.iexec.worker.pubsub.StompClient.subscribeToTopic(StompClient.java:94)
	at com.iexec.worker.pubsub.SubscriptionService.subscribeToTopic(SubscriptionService.java:68)
	at com.iexec.worker.replicate.ReplicateDemandService.askForReplicate(ReplicateDemandService.java:111)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

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

No branches or pull requests

1 participant