Skip to content
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

[log4j, releasing] Cygnus is not using the default logging path when running as a service #656

Closed
frbattid opened this issue Dec 11, 2015 · 2 comments
Assignees
Labels

Comments

@frbattid
Copy link
Member

Description: http://stackoverflow.com/questions/34180456/why-wont-cygnus-keep-running

@frbattid
Copy link
Member Author

frbattid commented Jan 8, 2016

This is because:

  • Both a template and a real configuration log4j files are installed through the RPM.
  • The real log4j file points to ./logs/flume.log, which is the the path Cygnus tries to write logs, issuing the described error (the cygnus user running Cygnus has no permissions to wirte at ./).
  • The init.d file for Cygnus runs this command CYGNUS_COMMAND="${FLUME_EXECUTABLE} agent -p ${ADMIN_PORT} --conf ${CONFIG_FOLDER} -f ${CONFIG_FILE} -n ${AGENT_NAME} -Dflume.log.file=${LOGFILE_NAME} &>> /var/log/cygnus/${LOGFILE_NAME} & echo \$! > ${CYGNUS_PID_FILE}", which tries to change the log file name, but not the path. Since the real log4j file points to ./logs/flume.log, this is changed to /logs/cygnus.log, which issues an error as well.

The solution is to remove the real log4j file and ecouraging people to instantiate the log4j template. That will use by default /var/log/cygnus/cygnus.log and /var/log/cygnus/LOGFILE_NAME if modifying the LOGFILE_NAME property in cygnus_instance_<id>.conf.

@frbattid frbattid added this to the release/0.12.0 milestone Jan 8, 2016
@frbattid frbattid self-assigned this Jan 8, 2016
@frbattid
Copy link
Member Author

Fixed in PR #697

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

No branches or pull requests

1 participant