-
Notifications
You must be signed in to change notification settings - Fork 34
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
tail: write error when run by node, not when run manually #5
Comments
What does the debug output give you? |
Since I'm using RVM the default path for for request-log-analyzer needs to be changed, I do this in the plugin configuration: env.request_log_analyzer '/usr/local/rvm/gems/ruby-1.9.2-head/bin/request-log-analyzer' But I can't do that when running the plugin in debug mode from the command line (it only accepts a log file path). Because of this I'm unable to provide debug output - though I suppose I could edit the plugin script and change the default path. |
Ok, here is the debug output: /etc/munin/plugins/rails_redmine_requests debug '/var/rails/Redmine/log/production.log' Processing the last 50000 lines of /var/rails/Redmine/log/production.log which are less then 300 seconds old. "tail -n 50000 /var/rails/Redmine/log/production.log | /usr/local/rvm/gems/ruby-1.9.2-head/bin/request-log-analyzer - --after 20100827181909 -b --dump /tmp/rla_1282929600.yml 2>/dev/null" get.value 0.26666666666666666 Looks ok to me? |
FYI, here's the plugin configuration block: [rails_redmine_requests] env.log_file '/var/rails/Redmine/log/production.log' |
That's really strange. Your config looks okay and as the debug output is working, I'm assuming RLA and the scripts are working, so the problem must lie elsewhere. Are you sure you have the RLA gem installed in the 1.9.2 RVM environment you're using? Because it is TAIL who is giving a write error, which it'll probably do if the pipe is closed for some reason. This could be either RLA missing or that it is unable to write to /tmp/. What you could try is to replace "2>/dev/null" with " >> /tmp/rla_log.txt 2>&1" And checkout what is in the generated file. Also make sure that there are no lingering files in /tmp/rla_*. |
I think this is because you used quotes in the names of the files. Try env.log_file /var/rails/Redmine/log/production.log instead of env.log_file '/var/rails/Redmine/log/production.log' |
Mikrogroove, is it working for you? If so, please let me know so I can close this ticket. |
When the plugin is run as normal I get:
tail: write error
failed executing request-log-analyzer. Is the path to the binary correct?
But "munin-run rails_requests" works fine. My first assumption was a permissions problem but that doesn't seem to be the case. I've tried running the plugin as root, www-data and a local user account - no change. Any ideas?
Thanks,
mikrogroove
The text was updated successfully, but these errors were encountered: