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

Init script hangs when executed over SSH #1394

Closed
tsg opened this issue Apr 14, 2016 · 4 comments
Closed

Init script hangs when executed over SSH #1394

tsg opened this issue Apr 14, 2016 · 4 comments
Labels

Comments

@tsg
Copy link
Contributor

tsg commented Apr 14, 2016

Easiest way to reproduce, do something like this:

ssh host "sudo /etc/init.d/topbeat start"

where the target host is a centos6 machine. The SSH session stays open forever instead of returning after starting topbeat in background. I tracked this to go-daemon and opened a PR that I think should fix the issue: fiorix/go-daemon#7

This ticket is to make sure we incorporate the fix when it's merged upstream.

@tsg tsg added the bug label Apr 14, 2016
@frederic-joventures
Copy link

Hello,
Same problem when using tool like Saltstack.

As a quick workaround in the init script (line 61 on ubuntu), I replaced :
--exec $WRAPPER -- $WRAPPER_ARGS $DAEMON $DAEMON_ARGS \
with
--exec $WRAPPER -- $WRAPPER_ARGS -- $DAEMON $DAEMON_ARGS \

@tsg
Copy link
Contributor Author

tsg commented Apr 14, 2016

@frederic-jomedia looks like we already have that change: https://github.com/elastic/beats/blob/master/dev-tools/packer/platforms/debian/init.j2#L61

I seem to remember we add it at some point, perhaps you tried a while ago? Or you mean the change in the other direction?

@frederic-joventures
Copy link

My bad, the replacement was actually :
--exec $WRAPPER -- $WRAPPER_ARGS -- $DAEMON -- $DAEMON_ARGS \

but I was wrong. it returned true but filebeat did not start.
At the moment there is no way to start or restart filebeat if you are not logged in.
We are using Ubuntu 14.04 and filebeat 1.2.1
And using saltstack for deployment.
I found a lot of "work around" but they all failed

@tsg
Copy link
Contributor Author

tsg commented Apr 14, 2016

fiorix/go-daemon#7 was just merged, so this should be fixed with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants