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

Docker starting..... & Kubernetes is stopped #3383

Closed
essien1990 opened this issue Nov 30, 2018 · 4 comments

Comments

@essien1990
Copy link

commented Nov 30, 2018

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Actual behavior

Information

  • macOS Version:

Diagnostic logs

Docker for Mac: version...

Steps to reproduce the behavior

  1. ...
  2. ...

@essien1990 essien1990 changed the title Docker starting..... & Kubernetes is stooped Docker starting..... & Kubernetes is stopped Nov 30, 2018

@abdennour

This comment has been minimized.

Copy link

commented Nov 30, 2018

docker version ?
uname -a ? (Darwin MacBook-Pro.local ....)
kubectl version ?

@abdennour

This comment has been minimized.

Copy link

commented Nov 30, 2018

I fixed it.

Brief

Add the following lines in /etc/hosts if it is empty.

127.0.0.1 localhost
::1       localhost

Details:

  1. Display the log of docker:
pred='process matches ".*(ocker|vpnkit).*"
  || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
/usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"
  1. Analyze the log:
    Found
2018-11-30 08:33:37.468984+0300  localhost com.docker.driver.amd64-linux[38047]: Cannot list nodes: Get https://localhost:6443/api/v1/nodes: dial tcp: lookup localhost: no such host

It means, it cannot resolve localhost ???!!

  1. Check /etc/hosts

Oops! it is empty.

  1. Remediation
# cat /etc/hosts

127.0.0.1 localhost
::1       localhost
  1. Watch the log again:
pred='process matches ".*(ocker|vpnkit).*"
  || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
/usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"

🎉 It works. k8s is now up and running with docker-for-mac.

@essien1990

This comment has been minimized.

Copy link
Author

commented Nov 30, 2018

@docker-desktop-robot

This comment has been minimized.

Copy link
Collaborator

commented Feb 28, 2019

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.