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

Error logging when beanstalkd unexpectedly stops? #229

Closed
Repox opened this issue Feb 26, 2014 · 10 comments
Closed

Error logging when beanstalkd unexpectedly stops? #229

Repox opened this issue Feb 26, 2014 · 10 comments
Labels

Comments

@Repox
Copy link

Repox commented Feb 26, 2014

I've experienced that beanstalkd has suddenly stopped it's service on my Ubuntu 13.10.
I can't find any error log - is is possible to enable logging?

@jonathanpmartins
Copy link

I will logging too 👍

@teddychan
Copy link

any plan to add this?

@kr
Copy link
Member

kr commented Jun 24, 2015

There is a flag -v that causes beanstalkd to be more verbose on stdout. You can give it multiple times to increase the verbosity. If you want to save the log, you can redirect stdout to a file or pipe it to a log rotation utility.

@kr kr added the Question label Jun 24, 2015
@kr
Copy link
Member

kr commented Jun 24, 2015

I think this should answer the original question. If not, feel free to reopen this or open a new issue! :)

@kr kr closed this as completed Jun 24, 2015
@Repox
Copy link
Author

Repox commented Jun 24, 2015

@kr, as much as I appreciate alternative solutions when none is available, this seems to be a really bad solution. General logging is a minimum requirement for me to use this in a production environment.

I like beanstalkd for it simplicity, but the lack of proper logging has forced me to use a more complex solution (RabbitMQ).

I'm sad to hear that a workaround seems sufficient.

@kr
Copy link
Member

kr commented Jun 24, 2015

I apologize, I don't know your definition of "proper" logging.

Beanstalkd provides a logging facility, not a workaround, on stdout. If you want to use syslog to sort and rotate log files, you can run beanstalkd with a pipe to the standard logger program:

beanstalkd -v | logger -t beanstalkd

There are other log rotation and log handling utilities available, some built in to the OS, some as third-party additions, but the task of managing log files is best done by a dedicated tool, not beanstalkd.

@sijones-uk
Copy link

@kr I've been struggling to get this working. The verbosity switch seems to be -V rather than -v, but if I append -V | logger -t beanstalkd to my BEANSTALKD_EXTRA options in the /etc/default/beanstalkd config file and then restart Beanstalkd, I get the following error in the logs (and Beanstalkd fails to start):

beanstalkd[28955]: /usr/bin/beanstalkd: unknown argument: |

@JensRantil
Copy link
Contributor

@sijones-uk That's not a problem with beanstalkd, but rather with your beanstalkd package in your dist. More init systems (Upstart, systemd) will take care of collecting the output of your applications and storing them in some log files, so you should generally not need logger.

@sijones-uk
Copy link

Please could you clarify "your beanstalkd package in your dist"? I was trying to implement the suggestion above, i.e. piping the output, but the error in the log suggests that the pipe character is unrecognized in this context.

@JensRantil
Copy link
Contributor

"your beanstalkd package in your dist"

This Github project doesn't have any code to package the Beanstalkd application in a Debian (*.deb) package or an RPM package or something like this. Those packages are generally the ones that creates the /etc/default/beanstalkd file. They are also the ones that configures the process manager (Upstart, systemd etc.) how to start/run beanstalkd. TLDR; Your problem is a "system administrator" problem, not a problem that can be solved by changing any code in this project. I suggest you find a Linux distribution mailing list or post on StackOverflow about what you want to do.

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

6 participants