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

pdsh hangs on creating a daemon process #8

Closed
GoogleCodeExporter opened this issue Sep 6, 2015 · 3 comments
Closed

pdsh hangs on creating a daemon process #8

GoogleCodeExporter opened this issue Sep 6, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I am trying to use pdsh to startup a hiphop server in daemon mode. I see that 
pdsh hangs on the issuing machine.

If I shutdown hiphop on the target machine, through other means, pdsh shuts 
down on the issuing machine.

As a workaround I am using the '-u' option to timeout after 10 seconds. But 
this is error-prone.

If you can give me reasons why this is happening (created process not shutting 
down file descriptors etc) I can fix this on hiphop.

I would really appreciate any pointers.
-- Param

Original issue reported on code.google.com by param.po...@gmail.com on 28 Jan 2011 at 2:03

@GoogleCodeExporter
Copy link
Author

What I assume is happening is that the server you are starting with pdsh
is not closing stdout/stderr/stdin, so the ssh connection started by pdsh
remains open and pdsh does not exit.

You can test this by running 

 ssh -2 -a -x -l<user> <host> <server-start>

and verify that ssh does not exit.

Another thing you can try is wrapping your daemon in a script that first
closes stdin/stderr/stdout, e.g. maybe something like this?

 #!/bin/bash
 exec >/dev/null 2>&1
 exec </dev/null
 /etc/init.d/server start


If this is the case, then the hiphop server is failing to close all fds when it
daemonizes I would guess.

Original comment by mark.gro...@gmail.com on 28 Jan 2011 at 3:53

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Assuming this was not a bug and that the above solution worked.

Original comment by mark.gro...@gmail.com on 1 Mar 2011 at 10:13

  • Changed state: Done

@GoogleCodeExporter
Copy link
Author

yep it is an issue with hiphop, it doesnt close fds.
thanks
Param

Original comment by param.po...@gmail.com on 2 Mar 2011 at 5:06

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

No branches or pull requests

1 participant