spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

Spring Boot Admin shows OFFLINE.

Open jacks808 opened this issue 10 years ago • 4 comments

Hi, I am a new bee of spring boot admin. I were add spring boot admin client to my api project follow the steps:

  1. add maven dependency:
        <!-- starter actuator -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <!-- spring boot admin client -->
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>1.4.1</version>
        </dependency>
  1. set remote server address:
spring:
  boot:
    admin:
      url: http://10.94.66.193:9998

And, I start up api project, then I found a node in spring boot admin: image

BUT: the status of api project is OFFLINE. Is there some wrong usage of my code?

jacks808 avatar Nov 18 '16 10:11 jacks808

By the way, I were add spring boot admin itself to the application list by the same way like api project. And, it shows UP rather than OFFLINE

jacks808 avatar Nov 18 '16 10:11 jacks808

And, I notice that spring boot admin server log output a connection refused. but the ip of my client is wrong, spring boot admin use 127.0.0.1 to connect client.

more detail:


org.apache.http.conn.HttpHostConnectException: Connect to localhost:8088 [localhost/127.0.0.1] failed: 拒绝连接 (Connection refused)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) ~[httpclient-4.5.2.jar!/:4.5.2]
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) ~[httpclient-4.5.2.jar!/:4.5.2]
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) ~[httpclient-4.5.2.jar!/:4.5.2]
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.2.jar!/:4.5.2]
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[httpclient-4.5.2.jar!/:4.5.2]
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[httpclient-4.5.2.jar!/:4.5.2]

jacks808 avatar Nov 18 '16 11:11 jacks808

I am not running spring boot admin and api project at same server.

jacks808 avatar Nov 18 '16 11:11 jacks808

And finally, When i add client config to application.properties, the host of client is real ip.

jacks808 avatar Nov 18 '16 12:11 jacks808