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

"stopping server" logs not always visible #663

Closed
wants to merge 1 commit into from
Closed

Conversation

jvshahid
Copy link
Contributor

@jvshahid jvshahid commented Nov 4, 2014

when invoking /etc/init.d/influxdb stop, all messages from https://github.com/influxdb/influxdb/blob/ffbe9be48a00e3e8361af0180b9237f05bb5d0a1/src/server/server.go#L212-242
should appear in the log, but this doesn't seem the case.
i suspect this is a race, the log.Info()'s are probably called correctly but the server exits before the records get written to the log.
I made sure to edit influxdb-daemon and to redirect all stderr/stdout to a file, so that if it panics, i would see it there (see #650), but the daemon records no stdout/stderr, implying a clean exit.

all the snippets below are the tail of a log, after calling /etc/init.d/influxdb stop and confirming the process is no longer running. It seems pretty arbitrary how much of the log messages make it into the log.

[2014/06/19 14:22:40 EDT] [INFO] (coordinator.(*CoordinatorImpl).RunQuery:69) Start Query: db: graphite, u: graphite, q: list series
[2014/06/19 14:22:42 EDT] [INFO] (main.waitForSignals:24) Received signal: terminated
[2014/06/19 14:22:42 EDT] [INFO] (server.(*Server).Stop:216) Stopping server
[2014/06/19 14:22:42 EDT] [INFO] (server.(*Server).Stop:219) Stopping api server
[2014/06/19 14:15:50 EDT] [INFO] (server.(*Server).Stop:216) Stopping server
[2014/06/19 14:15:50 EDT] [INFO] (server.(*Server).Stop:219) Stopping api server
[2014/06/19 14:15:50 EDT] [INFO] (server.(*Server).Stop:221) Api server stopped
[2014/06/19 14:17:53 EDT] [INFO] (coordinator.(*CoordinatorImpl).RunQuery:69) Start Query: db: graphite, u: graphite, q: list series
[2014/06/19 14:17:56 EDT] [INFO] (coordinator.(*CoordinatorImpl).RunQuery:69) Start Query: db: graphite, u: graphite, q: list series
[2014/06/19 14:17:58 EDT] [INFO] (main.waitForSignals:24) Received signal: terminated
[2014/06/19 14:17:58 EDT] [INFO] (server.(*Server).Stop:216) Stopping server
[2014/06/19 14:17:58 EDT] [INFO] (server.(*Server).Stop:219) Stopping api server
[2014/06/19 14:17:58 EDT] [INFO] (api/http.(*HttpServer).Close:194) Closing http server

@dgnorton
Copy link
Contributor

dgnorton commented Nov 5, 2014

@jvshahid lgtm

@jvshahid jvshahid closed this in b5fb484 Nov 5, 2014
@jvshahid jvshahid removed the review label Nov 5, 2014
@toddboom toddboom deleted the fix-663 branch May 5, 2015 19:44
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