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

Serf reconnect #55

Closed
rmoriz opened this issue Jul 28, 2017 · 5 comments
Closed

Serf reconnect #55

rmoriz opened this issue Jul 28, 2017 · 5 comments

Comments

@rmoriz
Copy link

rmoriz commented Jul 28, 2017

When using goiardi with serf for shovey/shob, goiardi does not reconnect to serf when the connection gets dropped (e.g. serf instance restarts).
Log:

2017/07/28 16:38:57 [ERR] agent.client: Failed to decode response header: EOF
@ctdk
Copy link
Owner

ctdk commented Jul 28, 2017

Thanks for the heads up. Also-also, I must say I'm a bit surprised (pleased, but surprised) that someone's actually doing something with shovey -- after I went through the effort to get it all up and going I found to my disappointment and mild annoyance that no one (including myself) had much of a use case for it. Incidentally, I've been told that state of events also applies to Chef Push.

@rmoriz
Copy link
Author

rmoriz commented Jul 28, 2017

Well… I'm a bit in a hate-love relationship with Chef since 2010 so I could tell a loooong story ;-)

But to cut it short:

The only push-job use case is IMHO to force a chef-client run (which then deploys a new app release or whatever).

Some people use consul but I though why not give shovey a try. And it works nice and Serf seems to be a lot less heavy in operations as Consul.

@ctdk
Copy link
Owner

ctdk commented Aug 9, 2017

Take a look at https://github.com/ctdk/goiardi/tree/serf-reconnecting and let me know whether or not that clears up the serf reconnecting issue.

@rmoriz
Copy link
Author

rmoriz commented Aug 11, 2017

Looks good, thank you!

Here is the log when using the branch. I killed and restarted serf:

2017/08/11 17:23:40 [DEBUG] [main] (goiardi.go:runEventMonitor:715) Got an event: map[LTime:655150 Name:node_status Payload:[...] Event:query ID:39] nil? false
2017/08/11 17:23:40 [ERR] agent.client: Failed to decode response header: EOF
2017/08/11 17:23:40 [ERR] agent.client: Failed to decode response header: EOF
2017/08/11 17:23:40 [DEBUG] [main] (goiardi.go:runEventMonitor:715) Got an event: map[] nil? true
2017/08/11 17:23:40 [DEBUG] [main] (goiardi.go:runEventMonitor:718) Serf client has been closed, returning from runEventMonitor in hopes of being able to reconnect
2017/08/11 17:23:40 [ERROR] [main] Error from event monitor: serf client closed
2017/08/11 17:23:40 [ERROR] [main] Error recreating serf client, waiting 5 seconds before recreating: dial tcp 178.63.77.21:7373: getsockopt: connection refused
2017/08/11 17:23:46 [DEBUG] [main] (goiardi.go:runEventMonitor:715) Got an event: map[Event:query ID:1 LTime:655154 Name:node_status Payload:[...]] nil? false

A nitpick: Maybe you can print a message once the reconnect worked. I assume it is before the "Got an event" message.

@ctdk
Copy link
Owner

ctdk commented Jan 28, 2018

This has been merged into master and released.

@ctdk ctdk closed this as completed Jan 28, 2018
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