spring-boot-admin | Admin UI for administration of spring boot applications | Application Framework library
kandi X-RAY | spring-boot-admin Summary
kandi X-RAY | spring-boot-admin Summary
Admin UI for administration of spring boot applications
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Deserialize a registration .
- Create the request body for a given instance .
- Appends events to the event log .
- Converts an instance event to a Map .
- Rewrite endpoint url .
- The hazelcast configuration .
- Forward to endpoint web .
- Parses the build - version .
- Returns the HTTP headers for the given instance .
- Registers this application .
spring-boot-admin Key Features
spring-boot-admin Examples and Code Snippets
Community Discussions
Trending Discussions on spring-boot-admin
QUESTION
I am working with Keycloak
16.1.0, spring boot
2.6.2 and an external application client that sends a bearer token in to my server application to the endpoint http://romanmed-host:8888/actuator/health
.
By cranking the debugging level up to maximum, I can see the access token before its processed. I can verify that its accurate by using the JWT
Debug site JSON Web Tokens to verify that the signature is correct.
Yet several lines later in the output log the same bearer token appears to be somewhat truncated, its listed with an error saying that it failed to verify. When checked by using the JWT
site indicates a signature error, but the token content is correct.
Naturally I would like to know why it appears to be truncated and what I can do about it.
- I can match the output from the client program to the server and its not been changed, so truncation must occur within the server program.
- The program is accepting the request by a get request, since the token can be checked by JWT as valid at this point, its not truncated by the get request input method.
- I have not inserted a filter in the security filter chain, so I can see how any of my code could be doing anything to invalid the token.
- Other than the
Failed to verify token
no other error messages are generated, suggesting that until this point everything is correct.
I can see that the WebAsyncManagerIntegrationFilter, SecurityContextPersistenceFilter, HeaderWriterFilter,KeycloakPreAuthActionsFilter and KeycloakAuthenticationProcessingFilter have all been invoked.
I am assuming that the problem is somewhere within the KeycloakAuthenticationProcessingFilter
, but I don't understand why the token appears to have been truncated at this point.
The received bearer token is
eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ3dUhKc1pvWnduelVsU1Zqc2JyTkxsbUNhR0ZIVkV0cTcyQkI5V0pORTVVIn0.eyJleHAiOjE2NDY0MDI3NTAsImlhdCI6MTY0NjQwMjQ1MCwianRpIjoiMj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dG9kbyI6eyJyb2xlcyI6WyJhY3R1YXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwiY2xpZW50SWQiOiJhcHAtYWRtaW4iLCJjbGllbnRIb3N0IjoiMTI3LjAuMC4xIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtYXBwLWFkbWluIiwiY2xpZW50QWRkcmVzcyI6IjEyNy4wLjAuMSJ9
The debug log is
...ANSWER
Answered 2022-Mar-07 at 08:32The problem is the set up of the client and server programs.
The server used the value
auth-server-url: http://localhost:8085/auth
in its application.yml file to define the location of the Keycloak
server, the client used the value
auth-server-url: http://romanmed-host:8085/auth
to define the location of Keycloak
where the machine name romanmed-host
is an alias for localhost
. Having changed these values to be the same value, everything works as expected.
The diagnostics generated by the debugging/trace code are confusing, string described as truncated header
seems to be truncated the bearer token, with out the signature. What the 'Keycloak` diagnostic is attempting to print is the part of the token which defines the tokens permissions and not the signature section.
Running the entire bearer token through the JWT
site does show that the token is valid, because its a correctly encoded token and is legitimate.
The problem is not the token, but the way the token is being used
! The client was expecting a legal signed token generated by them instance of Keycloak
that it knew about, what it got was a legal signed token generated by Keycloak
with a different address, which it correctly objected to.
The problem being the nature of the generated error message, it just claimed that the token signature was invalid, had it said something about an invalid/unexpected hostname, the nature of the problem would have been rather more obvious and resolved much faster. Keycloak
is design to be flexible, so error messages tend to more vague to cover all situations, hence the message there is something wrong with your bearer token signature which is correct, but vague.
There seems to several schools of thought on how to resolve issues like this, one is to use an raw ip address which will always resolve to the same value. Thus avoid problems like this. This suffers from if the Keycloak
server is moved to another machine there are lots of values to change.
My solution is to define an alias value in the hosts/dns server for the address of the eycloak
server and always use that value in the support files. Hence if the Keycloak
server is ever moved to another address, there is only one value to change.
QUESTION
I'm trying to add a custom view with some administrative utilities to Spring Boot Admin. The idea is to implement these as endpoints in Springboot Admin and call these endpoints from my custom view, but I don't know how to make a call to the server itself.
When a custom view has parent: 'instances'
it will get an axios
client for connecting to the current instance, but since the view I'm building isn't tied to a specific instance it doesn't have this. I'm aware I can install axios as a dependency, but I'd like to avoid that if possible to reduce build times. Since SBA itself depends on axios
it seems I shouldn't have to install it myself.
Based on this sample, this is what I have right now:
index.js
...ANSWER
Answered 2022-Jan-26 at 16:02Based on the code given, it looks like you don't have axios
initialized to how you want to use it.
You're calling it via this.axios
but it's not in your component i.e
QUESTION
I am using spring boot 2.5.1 with Java 11.
I am trying to create a SpringBoot Admin Server and Client in the same application, however when I start it, I get the following error in the console.
Ref: https://github.com/codecentric/spring-boot-admin
Error
Failed to register application as Application(name=PowWow, managementUrl=http://localhost:8085/actuator, healthUrl=http://localhost:8085/actuator/health, serviceUrl=http://localhost:8085/) at spring-boot-admin ([http://localhost:8085/instances]): 401 : [no body]. Further attempts are logged on DEBUG level
I have the following code in the Spring Boot application:
pom.xml
...ANSWER
Answered 2022-Jan-12 at 12:03I resolved this by adding /actuator/**
to the following:
QUESTION
We run spring-boot containers created using bootBuildImage gradle task on kubernetes. We provide both CPU limits and memory limits to the pods at startup in k8s. We use:
- spring-boot version 2.6.2
- docker image built with gradle spring-boot plugin bootBuildImage task
- spring-boot-admin to administrate our spring-boot based deployments
- JDK 11 (to enable blockhound)
- 32 CPUs hosts in GCP GKE
- In dev we limit our container to 1 CPU and 1Gig of memory
We noticed that all our spring-boot based containers are provisioned (ie nb of threads) as if running on 32 CPUs instances.
Docker startup logs show
Setting Active Processor Count to 32
[...]
Picked up JAVA_TOOL_OPTIONS: [...] -XX:ActiveProcessorCount=32
In spring-boot-admin with see web servers (netty for reactive, undertow for servlet) are provisioned with thread pools as if the application was running on 32 CPUs allocated container even if the container was limited with 1 CPU by k8s. OTH the allocated memory to the JVM is correct.
How can we make sure the active CPU count reflects the k8s CPU limitation ?
Thanks in advance
...ANSWER
Answered 2022-Jan-08 at 13:55Based on the output you included, it looks like you're using buildpacks (i.e. ./mvnw spring-boot:build-image
or ./gradlew bootBuildImage
or pack build
).
In that case, you can set the env variable JAVA_TOOL_OPTIONS
with -XX:ActiveProcessorCount=x
to override the default calculation. The default calculation will pull the total number of processors (as reported by Go's runtime.NumCPU()
function).
Side note. What you are asking seems reasonable, so I opened an issue to see if we can enable it to detect the limited CPU count.
QUESTION
I am working on a Java application (a Spring Boot application). On my Ubuntu development machine I have used this JDK version:
...ANSWER
Answered 2021-Nov-14 at 00:00Traditional JREs no longer exist since Java 9 (although some vendors offer JRE-like packages). In order to get a Java runtime to run your application you can use the jlink
tool, which also comes with JDK 17, like this for a modular application:
QUESTION
I have a very simple app:
This is my main class:
...ANSWER
Answered 2021-Jul-27 at 07:05The admin URL will be http://localhost:9090 not localhost:9090/admin
QUESTION
I'm building the Spring Boot Admin code and getting the below error.
pom.xml
...ANSWER
Answered 2021-May-04 at 08:45I was able to solve this issue. Basically all your microservices should use below configuration. Here prefer-ip-address: true
and fetch-registry: true
is the key here.
QUESTION
I am facing issue with spring cloud sleuth as it is leaking memory as I have gone through the dumps of my applications:
What does 13.05mb (40.3%) of Java Static org.springframework.cloud.sleuth.instrument.async.SleuthContextListener.CACHE
Spring Cloud Version: Hoxton.SR8 Spring Boot Version: 2.3.3.RELEASE
Please find the heapdump report below:
pls find the code repo below, which I am using in my appplication, Also on first run there is no memory leakage issue but on successive runs it shows the memory leakage issue as mentioned in the heapdump report
...ANSWER
Answered 2021-May-25 at 19:25You have a complete mix of versions. Why do you say that you're using Hoxton and Boot 2.3 if you're not using Hoxton, you're using Greenwich and Boot 2.1
QUESTION
I have a number of applications reporting to a SpringBoot Admin application using SpringBoot Admin Client. One of our recent projects that's under construction is using a custom JWT/refresh token authentication flow and I want SpringBoot Admin to use that before hitting the actuator endpoints so I can secure those as well.
The flow works by sending credentials to /v1/auth/login
, which will give the user a JWT token with expiration date and refresh token. The JWT is only valid for a short time after which it needs to be refreshed and is submitted with the request as a Bearer-token.
I found this this thread which is somewhat related, but I need to be able to see which endpoint it's trying to access since not all of the applications use the same kind of authentication.
Is there some way I can configure it to add the Authorization header with the correct headers given a URL or client name that matches a certain pattern? Preferably as part of some component that could keep JWT/expiry/refresh token as part of it's state, so I could refresh it when necessary.
...ANSWER
Answered 2021-May-06 at 16:09Wouldn't it be enough to have some identifier of application (e.g. app name) and based on that differentiate the auth?
QUESTION
As the docs state in order to cache the Maven dependencies with GitHub Actions all we have to use is the actions/cache action like this:
...ANSWER
Answered 2021-Mar-30 at 11:17It seems that the path to the Maven repository isn't correctly initialized. As this issue describes the paths are written with \\
instead of /
which GNU tar expects. The fix was already provided in Dec 2020, so it made it to the version v2.1.4
. The last version v2.1.3
was released in November. But sadly there is a bug in pointing the v2
to the latest v2.1.4
(as normally expected by GitHub Actions users). Therefore to solve this issue, we need to explicitely specifiy the full actions/cache version v2.1.4
like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spring-boot-admin
Please make sure you set $JAVA_HOME points to the correct JDK.
JDK >= 1.8
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page