question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spring boot admin No applications registered.

See original GitHub issue

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.

ae

After some minutes with the Application runs I get a Exception:

java.io.IOException: Uma conexão 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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
eduardocintracommented, Sep 6, 2018

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!

1reaction
anandvarkeyphilipscommented, Sep 9, 2018

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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Admin Client not registering an application
It does not seem to be registering. Do I neccesarily have to register with Eureka? How do I debug? Configuration on adminserver build.gradle...
Read more >
Spring Boot Admin Server and Spring Boot Client - Medium
Here I am going to describe registering via Spring Boot Admin Client . First we configure and run our Admin Application . It...
Read more >
A Guide to Spring Boot Admin | Baeldung
Learn how to monitor and manage the Spring Boot applications using Spring Boot Admin.
Read more >
Spring Boot Admin Reference Guide - GitHub Pages
The applications register with our Spring Boot Admin Client (via ... By default the logfile is not accessible via actuator endpoints and ...
Read more >
Introduction to Spring Boot Admin Server with Example - amitph
The Admin Server is simple Spring Boot Project, with absolutely no code. As stated earlier, it is a central monitoring application for all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found