I'm trying use Spring Boot Admin Server but in the dashboard my application is not listed there.
What did I do, in my pom.xml I added the following dependencies:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.teste.sbadm</groupId>
<artifactId>sbadm</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>sbadm</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-server -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
<version>2.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-server-ui -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
<version>2.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-starter-client -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.0.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
In my SbadmApplication Class:
package br.com.teste.sbadm.sbadm;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
@EnableAdminServer
@SpringBootApplication
public class SbadmApplication {
public static void main(String[] args) {
SpringApplication.run(SbadmApplication.class, args);
}
}
And in my application.properties:
spring.boot.admin.url=http://localhost:8084
management.security.enabled=false
But when I open the Spring Boot Admin dashboard I do not have any application.

After some minutes with the Application runs I get a Exception:
java.io.IOException: Uma conex鈹溍簅 estabelecida foi anulada pelo software no computador host
at java.base/sun.nio.ch.SocketDispatcher.write0(Native Method) ~[na:na]
at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) ~[na:na]
at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:115) ~[na:na]
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:80) ~[na:na]
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:50) ~[na:na]
at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:473) ~[na:na]
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1279) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:607) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:597) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.coyote.http11.Http11OutputBuffer$SocketOutputBuffer.flush(Http11OutputBuffer.java:646) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.coyote.http11.filters.ChunkedOutputFilter.flush(ChunkedOutputFilter.java:169) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:252) ~[tomcat-embed-core-8.5.32.jar:8.5.32]
I already disabled my firewall without success...
Know I saw a waring in the console:
2018-09-05 15:06:17.340 WARN 51384 --- [gistrationTask1] d.c.b.a.c.r.ApplicationRegistrator
: Failed to register application as Application(name=spring-boot-application, management
Url=http://DESKTOP-B0J6ND5.xxx.local:8080/actuator, healthUrl=http://DESKTOP-B0J6ND5.xxx.local:8080/actuator/health,
serviceUrl=http://DESKTOP-B0J6ND5.xxx.local:8080/) at
spring-boot-admin ([http://localhost:8093/instances]): I/O error on POST
request for "http://localhost:8093/instances": Connection refused: connect; nested exception is
java.net.ConnectException: Connection refused: connect. Further attempts are logged on DEBUG level
Either the url you specified for spring.boot.admin.client.url is just wrong or you have some kind of networking issue (may be a firewall blocking the traffic)
The url is my application URL right? As I said, I disable my firewall. I don't understand why.
I discovered the problem, the problem was the URL I was used:
spring.boot.admin.url
Instead of:
spring.boot.admin.client.url
Thank you for your help!
Hi @joshiste , as I have previously mentioned, there are many unnecessary issues raised in SO in bulk and github tickets which could be solved just by giving a simple example link in the doc.. I think we should re consider this PR :https://github.com/codecentric/spring-boot-admin/pull/911
I have added everything for a beginner for both client and server apps with and without security..
@anandvarkeyphilips
Sorry about this, really was a mistake my, but the problem was that I was following this guide to implements SBA https://www.baeldung.com/spring-boot-admin and in the guide they use the version 1.5 that the property to enable the SBA Client was different.