Axon Server Error with Eureka and Zuull

Hello, I’m using Axon 4.4 with Spring boot (all LTS technologies), before I was using Axon without a problem, then I implemented Eureka and Zull and started to show an error in Axon Server, but sometimes it works normally, this locally, so between 10 times I get 3 successfully, I’ve tried many configurations without success and I don’t know how to solve it, I would like to solve this and create a small project on Git to help other developers to do it correctly, as I’m already limited.

2020-12-01 18:27:42.948 ERROR 23732 --- [o-auto-1-exec-7] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [/api/v1] threw exception [Request processing failed; nested exception is org.axonframework.axonserver.connector.AxonServerException: Connection lost while executing command on: 23732@DESKTOP-07TQ2BV.2682bebb-c576-4c81-8ea4-639e376d1a25.default] with root cause
org.axonframework.axonserver.connector.AxonServerException: Connection lost while executing command on: 23732@DESKTOP-07TQ2BV.2682bebb-c576-4c81-8ea4-639e376d1a25.default
	at org.axonframework.axonserver.connector.ErrorCode.lambda$static$24( ~[axon-server-connector-4.4.3.jar:4.4.3]
	at org.axonframework.axonserver.connector.ErrorCode.convert( ~[axon-server-connector-4.4.3.jar:4.4.3]
	at org.axonframework.axonserver.connector.command.CommandSerializer.deserialize( ~[axon-server-connector-4.4.3.jar:4.4.3]
	at org.axonframework.axonserver.connector.command.AxonServerCommandBus.lambda$doDispatch$2( ~[axon-server-connector-4.4.3.jar:4.4.3]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire( ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete( ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete( ~[na:na]
	at io.axoniq.axonserver.connector.command.impl.CommandChannelImpl$CommandResponseHandler.onNext( ~[axonserver-connector-java-4.4.2.jar:4.4.2]
	at io.axoniq.axonserver.connector.command.impl.CommandChannelImpl$CommandResponseHandler.onNext( ~[axonserver-connector-java-4.4.2.jar:4.4.2]
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage( ~[grpc-stub-1.33.0.jar:1.33.0]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal( ~[grpc-core-1.33.0.jar:1.33.0]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext( ~[grpc-core-1.33.0.jar:1.33.0]
	at ~[grpc-core-1.33.0.jar:1.33.0]
	at ~[grpc-core-1.33.0.jar:1.33.0]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$ ~[na:na]
	at java.base/ ~[na:na]

Applications.yaml content :

      defaultZone: http://localhost:8761/eureka
    instanceId: ${}:${spring.application.instance_id:${random.value}}
    preferIpAddress: true
    servers: localhost:8124

Application Class with:


Note: I already tried the settings on the website but I am not getting success. I’m a beginner with Axon and I would like to deploy it to my new clients, but I need to get a Sunday and this problem is one of the most complicated.

Welcome to the Axon community!

The log snippet you show just states that your application lost connectivity to Axon Server. Can you tell me a bit about how you set it up? Are you running everything locally? “23732@DESKTOP-07TQ2BV.2682bebb-c576-4c81-8ea4-639e376d1a25.default” seems to indicate you are using a Windows Desktop for the client, but where is Axon Server running? I must admit I have never used Eureka or Zuul, but since they are (I assume) targeted at your own app and not Axon Server, they should not interfere.

The “applications.yaml” file appears to have lost formatting, but you seem to have the Axon Server connection to “localhost:8124”, so if Axon Server is up that should work. On the other hand, I see some conflicting posts on Zuul and Eureka support for gRPC, which is what Axon Server is using, so I don’t know if that is interfering here.

Can you tell me which “settings on the website” you are referring to?

Bert Laverman