Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
容器运行时未运行:输出:无法连接到unix:///var/run/docker.sock. docker守护进程正在运行吗?_Docker_Ubuntu_Kubernetes_Cluster Computing - Fatal编程技术网

容器运行时未运行:输出:无法连接到unix:///var/run/docker.sock. docker守护进程正在运行吗?

容器运行时未运行:输出:无法连接到unix:///var/run/docker.sock. docker守护进程正在运行吗?,docker,ubuntu,kubernetes,cluster-computing,Docker,Ubuntu,Kubernetes,Cluster Computing,基本上,我试图用我的Ubuntu机器作为主节点,用两个Raspberry PI 3作为工作节点创建一个集群,并在集群上部署一个经过训练的ML算法,但在尝试初始化主节点时,我得到的只是错误。我已经尝试过卸载和重新安装docker和kubernetes,我尝试过kubeadl reset命令和许多其他解决方案 运行journalctl-xe时,错误似乎如下 [pulseaudio]bluez5 util.c:GetManagedObjects()失败:org.freedesktop.DBus.Err

基本上,我试图用我的Ubuntu机器作为主节点,用两个Raspberry PI 3作为工作节点创建一个集群,并在集群上部署一个经过训练的ML算法,但在尝试初始化主节点时,我得到的只是错误。我已经尝试过卸载和重新安装docker和kubernetes,我尝试过kubeadl reset命令和许多其他解决方案

运行journalctl-xe时,错误似乎如下 [pulseaudio]bluez5 util.c:GetManagedObjects()失败:org.freedesktop.DBus.Error.TimedOut:未能激活服务“org.bluez”:超时 因为它都是红色的,但我在下面提供了所使用命令的完整输出

    sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=192.168.0.1
    [init] Using Kubernetes version: v1.16.0
    [preflight] Running pre-flight checks
    [preflight] The system verification failed. Printing the output from the verification:
    KERNEL_VERSION: 4.15.0-64-generic
    CONFIG_NAMESPACES: enabled
    CONFIG_NET_NS: enabled
    CONFIG_PID_NS: enabled
    CONFIG_IPC_NS: enabled
    CONFIG_UTS_NS: enabled
    CONFIG_CGROUPS: enabled
    CONFIG_CGROUP_CPUACCT: enabled
    CONFIG_CGROUP_DEVICE: enabled
    CONFIG_CGROUP_FREEZER: enabled
    CONFIG_CGROUP_SCHED: enabled
    CONFIG_CPUSETS: enabled
    CONFIG_MEMCG: enabled
    CONFIG_INET: enabled
    CONFIG_EXT4_FS: enabled
    CONFIG_PROC_FS: enabled
    CONFIG_NETFILTER_XT_TARGET_REDIRECT: enabled (as module)
    CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled (as module)
    CONFIG_OVERLAY_FS: enabled (as module)
    CONFIG_AUFS_FS: enabled (as module)
    CONFIG_BLK_DEV_DM: enabled
    OS: Linux
    CGROUPS_CPU: enabled
    CGROUPS_CPUACCT: enabled
    CGROUPS_CPUSET: enabled
    CGROUPS_DEVICES: enabled
    CGROUPS_FREEZER: enabled
    CGROUPS_MEMORY: enabled
    error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR CRI]: container runtime is not running: output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    , error: exit status 1
        [ERROR Service-Docker]: docker service is not active, please run 'systemctl start docker.service'
        [ERROR IsDockerSystemdCheck]: cannot execute 'docker info': exit status 1
        [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
        [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
        [ERROR SystemVerification]: failed executing "docker info --format '{{json .}}'"\noutput: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    \nerror: exit status 1
    [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
    To see the stack trace of this error execute with --v=5 or higher





    sudo systemctl start docker.service
    A dependency job for docker.service failed. See 'journalctl -xe' for details.




    -- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
    sep 23 12:14:37 master01 gnome-keyring-daemon[2655]: The PKCS#11 component was already initialized
    sep 23 12:14:37 master01 gnome-session[2952]: SSH_AUTH_SOCK=/run/user/1003/keyring/ssh
    sep 23 12:14:37 master01 gnome-session[2952]: SSH_AUTH_SOCK=/run/user/1003/keyring/ssh
    sep 23 12:14:37 master01 gnome-keyring-daemon[2655]: The SSH agent was already initialized
    sep 23 12:14:37 master01 gnome-session[2952]: SSH_AUTH_SOCK=/run/user/1003/keyring/ssh
    sep 23 12:14:37 master01 gnome-keyring-daemon[2655]: The Secret Service was already initialized
    sep 23 12:14:38 master01 gnome-session-binary[2952]: Entering running state
    sep 23 12:14:38 master01 gnome-session[2952]: (process:3140): indicator-application-service-WARNING **: Unable to get watcher name 'org.kde.StatusNotifierWatcher'
    sep 23 12:14:38 master01 gnome-session[2952]: (process:3140): indicator-application-service-WARNING **: Name Lost
    sep 23 12:14:42 master01 gnome-session[2952]: sys:1: PyGIWarning: Nautilus was imported without specifying a version first. Use gi.require_version('Nautilus', '3.0') before import to ensure that the right
    sep 23 12:14:42 master01 pulseaudio[2932]: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.bluez': timed out
    sep 23 12:14:45 master01 gnome-session[2952]: RuntimeError: Bad magic number in .pyc file
    sep 23 12:14:45 master01 gnome-session[2952]: ERROR        rabbitvcs.services.checkerservice        org.freedesktop.DBus.Error.ServiceUnknown: The name org.google.code.rabbitvcs.RabbitVCS.Checker was not 
    sep 23 12:14:45 master01 gnome-session[2952]: Traceback (most recent call last):
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/rabbitvcs/services/checkerservice.py", line 265, in _connect_to_checker
    sep 23 12:14:45 master01 gnome-session[2952]:     OBJECT_PATH)
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    sep 23 12:14:45 master01 gnome-session[2952]:     follow_name_owner_changes=follow_name_owner_changes)
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    sep 23 12:14:45 master01 gnome-session[2952]:     self._named_service = conn.activate_name_owner(bus_name)
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    sep 23 12:14:45 master01 gnome-session[2952]:     self.start_service_by_name(bus_name)
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    sep 23 12:14:45 master01 gnome-session[2952]:     'su', (bus_name, flags)))
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    sep 23 12:14:45 master01 gnome-session[2952]:     message, timeout)
    sep 23 12:14:45 master01 gnome-session[2952]: DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.google.code.rabbitvcs.RabbitVCS.Checker was not provided by any .service files
    sep 23 12:14:45 master01 gnome-session[2952]: Traceback (most recent call last):
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/share/nautilus-python/extensions/RabbitVCS.py", line 197, in __init__
    sep 23 12:14:45 master01 gnome-session[2952]:     self.status_checker.assert_version(EXT_VERSION)
    sep 23 12:14:45 master01 gnome-session[2952]:   File "/usr/lib/python2.7/dist-packages/rabbitvcs/services/checkerservice.py", line 280, in assert_version
    sep 23 12:14:45 master01 gnome-session[2952]:     pid = self.status_checker.CheckVersionOrDie(version)
    sep 23 12:14:45 master01 gnome-session[2952]: AttributeError: 'NoneType' object has no attribute 'CheckVersionOrDie'
    sep 23 12:14:45 master01 gnome-session[2952]: Nautilus-Share-Message: Called "net usershare info" but it failed: Failed to execute child process "net" (No such file or directory)
    sep 23 12:20:17 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/nm/.face': No such file or director
    sep 23 12:20:17 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/mihaiscutaru/.face': No such file o
    sep 23 12:20:17 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/ifdstudent/.face': No such file or 
    sep 23 12:20:17 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/ken/.face': No such file or directo
    sep 23 12:20:17 master01 gnome-session[2952]: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
    sep 23 12:24:34 master01 gnome-session[2952]: ** (nautilus:3142): CRITICAL **: nautilus_info_provider_update_file_info: assertion 'NAUTILUS_IS_INFO_PROVIDER (provider)' failed
    sep 23 12:24:34 master01 gnome-session[2952]: sys:1: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
    sep 23 12:24:34 master01 gnome-session[2952]: ** (nautilus:3142): CRITICAL **: nautilus_info_provider_update_file_info: assertion 'NAUTILUS_IS_INFO_PROVIDER (provider)' failed
    sep 23 12:24:34 master01 gnome-session[2952]: ** (nautilus:3142): CRITICAL **: nautilus_info_provider_update_file_info: assertion 'NAUTILUS_IS_INFO_PROVIDER (provider)' failed
    sep 23 12:24:34 master01 gnome-session[2952]: ** (nautilus:3142): CRITICAL **: nautilus_info_provider_update_file_info: assertion 'NAUTILUS_IS_INFO_PROVIDER (provider)' failed
    sep 23 12:24:34 master01 gnome-session[2952]: ** (nautilus:3142): CRITICAL **: nautilus_info_provider_update_file_info: assertion 'NAUTILUS_IS_INFO_PROVIDER (provider)' failed
    sep 23 12:24:34 master01 gnome-session[2952]: ** (nautilus:3142): CRITICAL **: nautilus_info_provider_update_file_info: assertion 'NAUTILUS_IS_INFO_PROVIDER (provider)' failed
    sep 23 12:24:36 master01 gnome-session[2952]: (nautilus:3142): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
    sep 23 12:24:36 master01 gnome-session[2952]: (nautilus:3142): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
    sep 23 12:24:36 master01 gnome-session[2952]: (nautilus:3142): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
    sep 23 12:24:36 master01 gnome-session[2952]: (nautilus:3142): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
    sep 23 12:24:36 master01 gnome-session[2952]: (nautilus:3142): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
    sep 23 12:24:36 master01 gnome-session[2952]: (nautilus:3142): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
    sep 23 12:43:09 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/nm/.face': No such file or director
    sep 23 12:43:09 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/mihaiscutaru/.face': No such file o
    sep 23 12:43:09 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/ifdstudent/.face': No such file or 
    sep 23 12:43:09 master01 gnome-session[2952]: (polkit-gnome-authentication-agent-1:3143): polkit-gnome-1-WARNING **: Couldn't open user icon: Failed to open file '/home/ken/.face': No such file or directo
    sep 23 12:43:09 master01 gnome-session[2952]: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
以下是docker信息,以防它们很重要

    Client:
     Version:           18.06.2-ce
     API version:       1.38
     Go version:        go1.10.3
     Git commit:        6d37f41
     Built:             Sun Feb 10 03:48:06 2019
     OS/Arch:           linux/amd64
     Experimental:      false
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
这里是库伯尼特斯的信息,以防它们也很重要

kubeadm version -o=json
{
  "clientVersion": {
    "major": "1",
    "minor": "16",
    "gitVersion": "v1.16.0",
    "gitCommit": "2bd9643cee5b3b3a5ecbd3af49d09018f0773c77",
    "gitTreeState": "clean",
    "buildDate": "2019-09-18T14:34:01Z",
    "goVersion": "go1.12.9",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}

确保您当前的linux用户已添加到docker组。谢谢,它修复了我当前的问题,但现在又出现了另一个问题。我已经在下面详细说明了。@Alex你能描述一下另一个问题吗?或者如果它复杂,请考虑创建另一个问题。