spring-boot-admin: Failing request on metrics redirect to login page
Hi, first of all thanks for this software, it’s amanzing !
We’ve noticed something weird after upgrading our spring-boot-admin instance from 2.3.1 to 2.4.0: when browsing instance details, after a random delay ( 5 - 30s ) users are automatically redirected to the login page
console log:

The metrics causing the errors are not always the same:
- http://spring-boot-admin/instances/f4933231d1f3/actuator/metrics/jvm.memory.max?tag=area:heap
- http://spring-boot-admin/instances/f4933231d1f3/actuator/metrics/jvm.memory.used?tag=area:nonheap,id:Metaspace
- http://spring-boot-admin/instances/f4933231d1f3/actuator/metrics/jvm.threads.daemon
Instance details:
- spring-boot-admin-server 2.4.0
- spring-boot 2.4.3
- java 11
- auth mod: LDAP
Server configuration:
spring.boot.admin.monitor.status-interval = 30000
spring.boot.admin.monitor.status-lifetime = 30000
spring.boot.admin.monitor.default-timeout = 30000
spring.boot.admin.monitor.default-retries = 1
Client configuration:
spring.boot.admin.client.url = http://spring-boot-admin/
spring.boot.admin.client.enabled = true
spring.boot.admin.client.instance.metadata.tags.environment = production
management.info.git.mode = full
management.health.mail.enabled = false
management.health.ldap.enabled = false
management.endpoints.web.exposure.include = *
management.endpoint.health.show-details = always
management.endpoint.liquibase.enabled = false
management.endpoint.beans.enabled = false
management.endpoint.caches.enabled = false
management.endpoint.threaddump.enabled = false
management.endpoint.shutdown.enabled = false
management.endpoint.heapdump.enabled = false
management.endpoint.conditions.enabled = false
management.endpoint.jolokia.enabled = false
spring.security.user.name = springbootadmin-user
spring.security.user.password = xxxxxxx
spring.boot.admin.client.username = ${spring.security.user.name}
spring.boot.admin.client.password = ${spring.security.user.password}
spring.boot.admin.client.instance.metadata.user.name = ${spring.security.user.name}
spring.boot.admin.client.instance.metadata.user.password = ${spring.security.user.password}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 16 (2 by maintainers)
Commits related to this issue
- Add retry on failing subscription (#1697) closes #1640, #1691 — committed to codecentric/spring-boot-admin by ulischulte 3 years ago
Upgraded to 2.4.2, still getting a 401 on metrics calls…
Why is this issue closed? The 401 is still happening in version 2.4.1, the UI solution only prevents by getting redirected to the login page but the 401 errors are still happening.
Just tested the fix. It does not redirect to login anymore. But all endpoints now return 401 and I cannot get any info from client instances unless I tick ‘Remember me’ checkbox on login page. So without ‘Remember me’ the admin UI becomes useless.