Spring-boot-admin: couldn't determine local port. Please supply service-base-url

Created on 6 Jun 2018  路  3Comments  路  Source: codecentric/spring-boot-admin

this's my log :

java.lang.IllegalStateException: couldn't determine local port. Please supply service-base-url.
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getServiceBaseUrl(DefaultApplicationFactory.java:98)
        at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getServiceUrl(ServletApplicationFactory.java:58)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.createApplication(DefaultApplicationFactory.java:73)
        at de.codecentric.boot.admin.client.registration.ApplicationRegistrator.createApplication(ApplicationRegistrator.java:154)
        at de.codecentric.boot.admin.client.registration.ApplicationRegistrator.register(ApplicationRegistrator.java:71)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

I can't find a solution,please help me.

Most helpful comment

use the following properties

spring.boot.admin.client.url=http://localhost:8080/admin-server (admin server url)
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8080 (application url)

All 3 comments

Could you please provide the complete log

I guess you're doing a war-file deployment.
As the sba can't figure out the port you're running on, you need to set the spring.boot.admin.client.service-base-url to the location where your servlet application is running.

use the following properties

spring.boot.admin.client.url=http://localhost:8080/admin-server (admin server url)
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8080 (application url)

Was this page helpful?
0 / 5 - 0 ratings