Search code examples
springspring-bootcqrsaxon

how to configure axon server client with remote server host? (without localhost)


I'm new to Axon server. I tried to work with Axon server with spring boot. I installed the axon server on one of my cloud instances. when I run the spring boot application, the application finds the local Axon server. but there is no local one in my case.

I couldn't find a method to configure the IP address in the property file. if you know how to configure the remote host of the Axon server in Spring boot application please help me to do it.

The error like below,

Requesting connection details from localhost:8124
Connecting to AxonServer node [localhost:8124] failed: UNAVAILABLE: io exception
Failed to get connection to AxonServer. Scheduling a reconnect in 2000ms

Thanks.


Solution

  • To configure the location of Axon Server, add the following property to the application.properties file:

    axon.axonserver.servers=<hostname/ip address>:<port>
    

    If you are running Axon Server on the default port, you can omit the port number.