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

Error: Resolver Setup/Start failed for container 6b81802576bd4f16aa117061f81b5c3e, "setup not done yet" #971

Closed
sithembiso opened this issue Feb 25, 2016 · 7 comments

Comments

@sithembiso
Copy link

I am trying to setup a network in the container, but I keep running into this issue. As far as I can tell it's looking into some_app to get some sandbox information?

INFO[3808] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers : [nameserver 8.8.8.8 nameserver 8.8.4.4] 
INFO[3808] IPv6 enabled; Adding default IPv6 external servers : [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844] 
Error: unknown command "/var/run/docker/netns/582bd184e561" for "some_app"
Run 'some_app --help' for usage.
ERRO[3808] Resolver Setup/Start failed for container 6b81802576bd4f16aa117061f81b5c3e, "setup not done yet" 
ERRO[3808] failed to add interface vethef0a693 to sandbox: failed in prefunc: failed to set namespace on link "vethef0a693": invalid argument 
ERRO[3808] failed to add interface vethef0a693 to sandbox: failed in prefunc: failed to set namespace on link "vethef0a693": invalid argument 

I was wondering if anyone could help me make sense of this and perhaps prevent it. Are these two separate errors?

Thank you

@sithembiso
Copy link
Author

Hi. I am still struggling with this issue. I have been looking at the libnetwork source code and I notice that the resolver.SetupFunc in sandbox_dns_unix.go never gets invoked hence the "setup not done yet" error.
This error goes away if I call that function like this:

...
//sb.osSbox.InvokeFunc(sb.resolver.SetupFunc())
sb.resolver.SetupFunc()()
...

But this doesn't seem right. It doesn't seem like this was meant to be called directly.

This is still a mystery:

Error: unknown command "/var/run/docker/netns/582bd184e561" for "some_app"
Run 'some_app --help' for usage.

And I always get the following error after that output:

ERRO[0021] failed to add interface vethec5dedd to sandbox: failed in prefunc: failed to set namespace on link "vethec5dedd": invalid argument

Does anyone know why this is happening? Any input with be highly valued. Please let me know if I need to provide more details.

@sithembiso sithembiso changed the title Clarity: Error: unknown command "/var/run/docker/netns/582bd184e561" for "some_app" Error: Resolver Setup/Start failed for container 6b81802576bd4f16aa117061f81b5c3e, "setup not done yet" Mar 4, 2016
@sanimej
Copy link

sanimej commented Mar 4, 2016

@sithembiso Can you send your docker info output, and exact command syntax you are using for docker daemon, network creation and docker run.

@sithembiso
Copy link
Author

@sanimej I am using libnetwork outside of Docker (I don't have Docker installed right now). I created my container using libcontainer/runc (imported it as a library, not the command line tool). To add networking to the container, I follow the example here https://github.com/docker/libnetwork/blob/master/README.md (replacing container1 with my container ID).

If it is any relavant, this error:

Error: unknown command "/var/run/docker/netns/582bd184e561" for "some_app"
Run 'some_app --help' for usage.

Appears to come from:

cmd := &exec.Cmd{
       Path:   reexec.Self(),
    Args:   append([]string{"netns-create"}, path),
    Stdout: os.Stdout,
    Stderr: os.Stderr,
}
if osCreate {
    cmd.SysProcAttr = &syscall.SysProcAttr{}
    cmd.SysProcAttr.Cloneflags = syscall.CLONE_NEWNET
}
if err := cmd.Run(); err != nil {
    return fmt.Errorf("namespace creation reexec command failed: %v", err)
}

in osl/namespace_linux.go line 212

@sanimej
Copy link

sanimej commented Mar 4, 2016

@sithembiso Using libnetwork outside of docker engine is not something we support. Give it a try with the docker and let us know if you see any issues. I will close this issue.

@sanimej sanimej closed this as completed Mar 4, 2016
@sithembiso
Copy link
Author

@sanimej, this seem contradicting to the goal of this project:

https://github.com/docker/libnetwork/blob/master/docs/design.md#goal

This clearly states that libnetwork project will follow Docker and Linux philosophy of developing small, highly modular and composable tools that works well independently. I would hope that allowing this library to be used outside of Docker is a step in the right direction.

The reason I did not upload all my code is because I understand that I cannot expect you to debug a different application. That is why I am making references to the libnetwork source code, I am trying to understand what it is expecting for instance by calling my executable with this argument: /var/run/docker/netns/582bd184e561 and resulting in:

Error: unknown command "/var/run/docker/netns/582bd184e561" for "some_app"
Run 'some_app --help' for usage.

Which seems to be the reason behind the errors that follow.

@mavenugo mavenugo reopened this Mar 4, 2016
@mavenugo
Copy link
Contributor

mavenugo commented Mar 4, 2016

@sithembiso Please take a look at our dnet application under cmd/dnet/dnet.go. We use this for our IT & obviously it uses libnetwork directly.

Please use this as your reference for writing any application that uses libnetwork.

As you can imagine, we dont actively test libnetwork outside of docker and dnet. If you have any issues feel free to raise issues. But always use docker and dnet as a reference of how to use libnetwork. And you would have seen that libnetwork is an active project with lots of features added in the past releases. Expect and embrace API changes :).

@GordonTheTurtle
Copy link

@sithembiso It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:

  • For a bug: do you still experience the issue with the latest version?
  • For a feature request: was your request appropriately answered in a later version?

Thank you!
This issue will be automatically closed in 1 week unless it is commented on.
For more information please refer to #1926

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

4 participants