Code Monkey home page Code Monkey logo

Comments (17)

josetesan avatar josetesan commented on May 18, 2024 1

Just to let you know by adding
.csrf().ignoringAntMatchers("/jolokia/**")

to the HttpSecurity configuration made this work.
Thanks for the help.

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

Did you have a look at the endpoints via browser? Is the information provided there?

from spring-boot-admin.

MichaelF25 avatar MichaelF25 commented on May 18, 2024

The application itself is secured but the /info, /logfile and /health endpoints are not and the missing information is also provided there.
I am using spring boot 1.2.2 for both the admin-server application and my application

from spring-boot-admin.

MichaelF25 avatar MichaelF25 commented on May 18, 2024

Resolved an internal issue with my local vagrant setup which caused invalid hostnames :-(

Now I can download the log file, see the version number and proper health information.
However, the 'info' column is still empty if I set only the info property in my application. If I set for example the info.description property, the 'info' column contains the text 'description: .....'.

What property has to be set in order to provide proper content for the 'info' column?

Another issue is logging. The list in Details -> Logging is always empty. I've tried to set some additional logging.level properties in my monitored application but that did not change anything.

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

The way you described the info column to work is the intended one.

The logging view only works if you are using logback and is relying on jmx access via jolokia...
(does the jmx view work?)

from spring-boot-admin.

josetesan avatar josetesan commented on May 18, 2024

Hi johannes,
I'm in the same situation as MichaelF25.
I can download logfile, see info, see metrics, but no jmx and no logging level customization works.

Currently using SpringBoot 1.2.3.RELEASE , and BootAdmin 1.2.0.

And yes, i'm using logback, with a working logback.xml file.

See my app log

2015-05-14 16:22:59,469 INFO o.s.j.e.MBeanExporter | Registering beans for JMX exposure on startup
2015-05-14 16:22:59,481 INFO o.s.j.e.MBeanExporter | Located managed bean 'requestMappingEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=requestMappingEndpoint]
2015-05-14 16:22:59,503 INFO o.s.j.e.MBeanExporter | Located managed bean 'environmentEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=environmentEndpoint]
2015-05-14 16:22:59,507 INFO o.s.j.e.MBeanExporter | Located managed bean 'healthEndpoint': registering with JMX server as MBean

and when i do curl http://my-app/jolokia
i do get

{"request":{"type":"version"},"value":{"agent":"1.2.3","protocol":"7.2","config":{"agentId":"172.17.42.1-29992-7ece51a6-servlet","agentType":"servlet"},"info":{"product":"tomcat","vendor":"Apache","version":"8.0.22"}},"timestamp":1431613883,"status":200}

Any idea ?

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

You need to activate the JMX-Configurator in Logback:

https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-samples/spring-boot-admin-sample/src/main/resources/logback.xml#L4

Did you have a look at your browers console in jmx view? Is there any error showing up?

from spring-boot-admin.

josetesan avatar josetesan commented on May 18, 2024

No change. Still nothing even if i added that option to logback.xml
And no error from browser either

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

So can you take a look at the network console looking at the request/responses?
Or do you have a sample project to reproduce the issue?

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

Or maybe an browser issue? What browser are you using? Did you try latest chrome or ff?

from spring-boot-admin.

MichaelF25 avatar MichaelF25 commented on May 18, 2024

Adding a logback.xml to my application resolved the missing logger configuration issue. Thx!

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

@josetesan Do you have any unresolved problems? can this Issue be closed?

from spring-boot-admin.

josetesan avatar josetesan commented on May 18, 2024

Sorry for the delay :-(
Did what you asked me, and found two intesting things..
When clicking both "logging" and "jmx", the admin boot server tries to do a post to himself
http://server:port/api/applications/e7c94ba2/jolokia/
But it does receive a 403 HTTP status error code, forbidden.
"Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'."

This looks like the cause of the problem ?

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

the boot admin server serves as a zuul reverese proxy on /api/applications//* so the request is forwarded to your client app. And I assume there is security with csrf protection active?

from spring-boot-admin.

josetesan avatar josetesan commented on May 18, 2024

Yes, there is


Enviado desde Mailbox

On Sat, May 16, 2015 at 10:03 PM, Johannes Stelzer
[email protected] wrote:

the boot admin server serves as a zuul reverese proxy on /api/applications//* so the request is forwarded to your client app. And I assume there is security with csrf protection active?

Reply to this email directly or view it on GitHub:
#72 (comment)

from spring-boot-admin.

josetesan avatar josetesan commented on May 18, 2024

So, do I have to disable csrf ? Or how can I allow server connect back to client ?

from spring-boot-admin.

joshiste avatar joshiste commented on May 18, 2024

For the JMX and logging section posting to /jolokia is required. So you sholud disable csrf for this endpoint.

from spring-boot-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.