-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
critical errors don't hit stderr #1021
Conversation
errors shouldn't go to stdout. i presume you meant stderr. |
@Dieterbe Well I would have taken it on stdout. But you are right stderr is correct. |
How is stdout/stderr different from the log file ? Won't you redirect stdout to a file anyway |
perhaps this is my own expectations and it ma not be right. But if the server is having problems (it cannot open a shard file due to running out of fd's, issues with connecting to your seed servers) could be landing in stderr instead of just the logfile. I use Docker; so my primary method of knowing what's up out or reflex is Erebus :: ~ » docker logs influxdb
[10/07/14 20:32:45] [INFO] Loading configuration file /opt/influxdb/shared/config.toml
+---------------------------------------------+
| _____ __ _ _____ ____ |
| |_ _| / _| | | __ \| _ \ |
| | | _ __ | |_| |_ ___ _| | | | |_) | |
| | | | '_ \| _| | | | \ \/ / | | | _ < |
| _| |_| | | | | | | |_| |> <| |__| | |_) | |
| |_____|_| |_|_| |_|\__,_/_/\_\_____/|____/ |
+---------------------------------------------+ So I had a bunch of messages like (I don't have the exact log file as they've been rotated out)
It could open some shards; so when querying I could render some data but not always. It just made seeing this problem much more complicated I know that typically init.d style processes throws stderr into a logfile typically instead of console. I guess I could configure the logfile to be stderr but that would be super heavy. |
For the record I don't use the 'init' script here, so I am not piping stdout or stderr to >/dev/null here. You can see how I run it at github.com/damm/docker-influxdb. https://github.com/damm/docker-influxdb/blob/master/run.sh#L6 for exactness |
@damm you can use |
@jvshahid not really; I ran out of file descriptors and I kinda think it's bad that it was logged in log.txt but nothing was in stderr. Maybe i'm spoiled and used to those errors hitting stderr :( |
This is an issue with the logging library we're using. We will address this in a separate issue |
Works for me :) Thanks! |
critical errors don't hit stderr
So I ran out of file descriptors earlier (not sure why as my limits.conf should allow enough) but I was oblivious of this fact (and the fact) that influxdb was not performing correctly because the stdout was pristine.
log.txt however told a much different story; showing how it could not write shard files and read them. Really this should be in stdout as loosing something like this due to log rotation and lots of data in the log file is :(