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

daemon: Resource temporarily unavailable #37

Open
linzx0403 opened this issue Mar 15, 2018 · 4 comments
Open

daemon: Resource temporarily unavailable #37

linzx0403 opened this issue Mar 15, 2018 · 4 comments

Comments

@linzx0403
Copy link

when child process create by the program via exec.Command() ,and restart the program without wait the child process ends, the program always report error 'daemon: Resource temporarily unavailable'. Is any way to resolve the problem?

@sevlyar
Copy link
Owner

sevlyar commented Mar 15, 2018

@linzx0403 Could you provide your environment (uname -a && go env) and detailed steps to reproduce the error?

@linzx0403
Copy link
Author

My host environment shows below:
uname -a : Linux localhost.localdomain 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

env:
HOME=/root
GOROOT=/usr/local/go
LOGNAME=root
GOPATH=/linzx/gowork/
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/0
_=/usr/bin/env

The go program execute shell script via 'cmd := exec.CommandContext(ctx, "/bin/sh", AgentShellDir + "docker_install.sh")', and this script needs long time to finish. I restart the program before script execute finished, then logs show 'daemon: Resource temporarily unavailable'.

@sevlyar
Copy link
Owner

sevlyar commented May 2, 2018

It is caused by already running daemon. You should stop the daemon before run it again. Because daemon on startup uses setsid() you can't terminate it through console, you should send a signal to it directly.

@fredkan
Copy link

fredkan commented Mar 22, 2019

remove the pid file before starting daemon.

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

3 participants