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

Marvel throws ConnectionException on stopping elasticsearch #5311

Closed
paweloque opened this issue Mar 1, 2014 · 1 comment
Closed

Marvel throws ConnectionException on stopping elasticsearch #5311

paweloque opened this issue Mar 1, 2014 · 1 comment

Comments

@paweloque
Copy link

Marvel throws a ConnectionException when closing elasticsearch. It keeps sending data to elasticsearch event though elasticsearch is about to terminate. In this case I'm running elasticsearch in foreground mode and closing it with Ctrl-C in bash.

Probably elasticsearch should inform its plugins about the termination, so that the plugins can finish operating.

Context: elasticsearch 1.0.1
marvel 1.0.2

Stacktrace:
^C[2014-03-02 00:15:26,288][INFO ][node ] [Puck] stopping ...
[2014-03-02 00:15:26,317][ERROR][marvel.agent.exporter ] error sending data
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:763)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at org.elasticsearch.marvel.agent.exporter.ESExporter.sendCloseExportingConnection(ESExporter.java:232)
at org.elasticsearch.marvel.agent.exporter.ESExporter.exportXContent(ESExporter.java:252)
at org.elasticsearch.marvel.agent.exporter.ESExporter.exportEvents(ESExporter.java:166)
at org.elasticsearch.marvel.agent.AgentService$ExportingWorker.exportEvents(AgentService.java:230)
at org.elasticsearch.marvel.agent.AgentService$ExportingWorker.run(AgentService.java:192)
at java.lang.Thread.run(Thread.java:744)
[2014-03-02 00:15:26,319][INFO ][node ] [Puck] stopped
[2014-03-02 00:15:26,319][INFO ][node ] [Puck] closing ...
[2014-03-02 00:15:26,325][INFO ][node ] [Puck] closed

@bleskes
Copy link
Contributor

bleskes commented Mar 3, 2014

At the moment ES does notify it's plugins of closing to give a chance to clean up. That is Marvel does and it tries to send the last queued up events - which is what you want to do in the case that data is sent to another ES cluster (our recommended production set up). This does generate an error if the data is sent to the very same node because as it is refusing new connections. I have already a note to be smarter about it but the solution is not trivial.

I'm closing the issue because it's expected (though not ideal). Thx for bringing it up.

@bleskes bleskes closed this as completed Mar 3, 2014
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

No branches or pull requests

2 participants