Skip to content

spring-boot: tomcat: if management port is different from the app port, the app's access.log goes to /tmp/tomcat.xxxxx.port #1581

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

Closed
simonso opened this issue Sep 18, 2014 · 5 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@simonso
Copy link

simonso commented Sep 18, 2014

spring-boot 1.1.6
http://stackoverflow.com/questions/23596157/spring-boot-tomcat-access-logs
The issue exists since 1.1
Steps to reproduce

  1. in application.properties, define management port = 7081
  2. in application.properties, define the app port to be anything but 7081
  3. in application.properties, set the server.tomcat.base=/home/mydir
  4. Start the spring-boot project with tomcat as the web server
    expected: access log goes to /home/mydir
    actual: after a few days, the access.log will suddenly appears in /tmp/tomcat.xxxx.port_number
    I have cloud deployment that needs to do log rotation. Prefer to centralize everything to one single directory.
@philwebb philwebb added the type: bug A general bug label Sep 23, 2014
@philwebb philwebb added this to the 1.1.7 milestone Sep 23, 2014
@dsyer dsyer self-assigned this Sep 25, 2014
@dsyer dsyer closed this as completed in 1614e1d Sep 25, 2014
dsyer added a commit that referenced this issue Sep 25, 2014
If the actuator endpoints are configured on a different port then there
are some settings in the main ServerProperties that we would like to
re-use (e.g. the access log). The easiest way to do that is to just
configure the management server using the same ServerProperties instance
and then overwrite the things that are different (and stored in
ManagementServerProperties).

Fixes gh-1581
@simonso
Copy link
Author

simonso commented Sep 25, 2014

Hi Dave,
When would 1.1.7 be released?
If I pick up 1.17 for my production, my log rotation will have one less extra /tmp/tomcat.xxxx.port directory to worry about.  
I'll tell my ops team to script log rotation differently (for production).
Please let me know the timeframe. Sincerely
Simon

@philwebb
Copy link
Member

We plan to release 1.1.7 in the next couple of days. We have an XD release that means it needs to happen on Monday at the very latest.

@simonso
Copy link
Author

simonso commented Sep 25, 2014

Fabulous!  Thanks Dave and Phil!

@mdeimel
Copy link

mdeimel commented Jan 26, 2015

This issue is still reproducible for me on Mac OS X 10.10.1 (Yosemite), using spring-boot-starter-web 1.2.1.RELEASE.

If I don't set the server and management ports, it logs properly to the basedir specified in the properties. If I do change the values the access logs go to very strange folders in the tmp directory, such as /tmp/prl-1e6aeb63-596a-4be9-b4ec-653c8e6a3c98 logs/access_log.2015-01-26.log

@wilkinsona
Copy link
Member

@mdeimel Can you open a new issue please? Your comment's likely to get lost on this issue as it's already closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants