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

critical errors don't hit stderr #1021

Merged
merged 1 commit into from
Oct 24, 2014
Merged

critical errors don't hit stderr #1021

merged 1 commit into from
Oct 24, 2014

Conversation

jvshahid
Copy link
Contributor

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 :(

@Dieterbe
Copy link
Contributor

errors shouldn't go to stdout. i presume you meant stderr.

@damm damm changed the title critical errors don't hit stdout critical errors don't hit stderr Oct 12, 2014
@damm
Copy link
Author

damm commented Oct 12, 2014

@Dieterbe Well I would have taken it on stdout. But you are right stderr is correct.

@jvshahid jvshahid added the bug label Oct 14, 2014
@jvshahid jvshahid added this to the 0.8.4 milestone Oct 14, 2014
@jvshahid jvshahid self-assigned this Oct 14, 2014
@jvshahid
Copy link
Contributor

How is stdout/stderr different from the log file ? Won't you redirect stdout to a file anyway

@damm
Copy link
Author

damm commented Oct 14, 2014

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 docker logs influxdb. But that really never changes.

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)

[2014/09/25 00:21:02 UTC] [INFO] (github.com/influxdb/influxdb/datastore.(*ShardDatastore).GetOrCreateShard:162) DATASTORE: unable to open /opt/influxdb/shared/data/db/shard_db_v2/00001

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.

@jvshahid
Copy link
Contributor

@toddboom @dgnorton can you guys take a look

@damm
Copy link
Author

damm commented Oct 24, 2014

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

@jvshahid
Copy link
Contributor

@damm you can use ./influxdb --stdout to redirect all the log lines to standard output. Is that what you're trying to do ?

@damm
Copy link
Author

damm commented Oct 24, 2014

@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 :(

@jvshahid
Copy link
Contributor

This is an issue with the logging library we're using. We will address this in a separate issue

@damm
Copy link
Author

damm commented Oct 24, 2014

Works for me :) Thanks!

jvshahid added a commit that referenced this pull request Oct 24, 2014
critical errors don't hit stderr
@jvshahid jvshahid merged commit 3f551b2 into master Oct 24, 2014
@jvshahid jvshahid removed the review label Oct 24, 2014
@jvshahid jvshahid deleted the fix-1021 branch October 24, 2014 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants