-
Notifications
You must be signed in to change notification settings - Fork 41.2k
/actuator/logfile returns a 404 #18191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report but I cannot reproduce the behaviour that you have described. The endpoint works as expected for me with 2.1.8.RELEASE:
The above is produced with the following configuration in
It continues to work if I set the context path to
If you would like us to spend some more time investigating, please spend some time providing a minimal example and precise instructions that reproduce the problem, preferably as a zipped project attached to this issue. |
After doing some more tests, the problem seems to be caused by the combination Spring Boot 2.1.7.RELEASE+ and Spring Cloud Config Server. When I retrieve the properties through Spring Cloud Config Server, the 404 error occurs, when I put the same properties in application.yml, everything works fine. I have included a zip file with a demo project which relies on a default Spring Cloud Config Server. The configuration served by this server is located in application.yml. You should be able to reproduce the issue with this project. |
Thank you. I've reproduced the problem. The change in behaviour is due to the fix for #17434. When the application's environment prepared event is fired, the properties that come from the config server aren't present. As a result, the |
Glad you are able to reproduce the issue! Do you expect this bug to be fixed in the near future? |
It's too early to say. My current opinion is that the change made to fix #17434 has revealed a bug in Spring Cloud. It doesn't feel right to me that it is updating the environment after the environment prepared event has been published. This is happening because it uses an |
Until we figure out the best way to fix this, you can work around the problem by setting the management:
endpoint:
logfile:
external_file: demo.log |
Thank you for providing the workaround, this is a good temporary solution which works. |
Any thoughts on this, @spencergibb? |
I guess I'm a bit unsure about where "it uses an ApplicationContextInitializer" is. |
I think |
👍 so that actually gets triggered during the bootstrap phase which is triggered by |
Thanks, @spencergibb. Manipulating the environment in I'm going to close this issue for now. If changes are needed in Boot to get Cloud to where we'd like it to be, we can re-open this issue or open a new issue as appropriate. |
logging: not work,404 |
@mxoop an issue that was closed 4 years ago isn't the right place for this. If you'd like some help, please post a question on Stack Overflow. Before doing that, please double-check your configuration. Given that you don't appear to be using an output redirect, your configuration of |
I am using spring-boot-starter-actuator to expose my application logging over HTTP, this used to work but starting from Spring Boot 2.1.7.RELEASE a 404 error response is returned when querying the endpoint /actuator/logfile. The actuator endpoint is available:
This issue looks like the one described in issue 17434, but I am not using any generated random values, just a fixed logging file name.
The same issue is present in 2.1.8.RELASE, the problem disappears when downgrading to 2.1.6.RELEASE
The text was updated successfully, but these errors were encountered: