{"id":492,"date":"2022-07-06T15:10:56","date_gmt":"2022-07-06T22:10:56","guid":{"rendered":"https:\/\/liangqi.org\/?p=492"},"modified":"2022-07-07T08:30:37","modified_gmt":"2022-07-07T15:30:37","slug":"docker-daemon-doesnt-listen-on-2375-in-ubuntu","status":"publish","type":"post","link":"https:\/\/liangqi.org\/?p=492","title":{"rendered":"Docker Daemon doesn&#8217;t listen on 2375 in Ubuntu"},"content":{"rendered":"\n<p>By default, it&#8217;s using Unit Socket. We need to use TCP.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Update the docker config service to add TCP:<\/h2>\n\n\n\n<p>nano \/lib\/systemd\/system\/docker.service<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ExecStart=\/usr\/bin\/dockerd -H tcp:\/\/192.l68.103.98:2375 -H tcp:\/\/127.0.0.1:2375<\/code><\/pre>\n\n\n\n<p>Somehow if we don&#8217;t add the real IP I still cannot access it through remote host but only through localhost<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reload Daemon:<\/h2>\n\n\n\n<p>systemctl daemon-reload<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Restart Docker:<\/h2>\n\n\n\n<p>systemctl restart docker<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify:<\/h2>\n\n\n\n<p>ps -aux | grep dockerd<\/p>\n\n\n\n<p>root 1575160 4.9 0.1 2710596 88768 ? Ssl 15:08 0:01 \/usr\/bin\/dockerd -H tcp:\/\/127.0.0.1:2375 -H fd:\/\/ &#8211;containerd=\/run\/containerd\/containerd.sock<\/p>\n\n\n\n<p>sudo netstat -lntp | grep dockerd<\/p>\n\n\n\n<p>tcp 0 0 192.168.103.98:2375 0.0.0.0:* LISTEN 1577963\/dockerd<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Notes:<\/p>\n\n\n\n<p>I got this error:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>ERROR: for redis Cannot start service redis: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: error while starting unit &#8220;docker-ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0.scope&#8221; with properties [{Name:Description Value:&#8221;libcontainer container ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0&#8243;} {Name:Slice Value:&#8221;\/docker_limit.slice&#8221;} {Name:PIDs Value:@au [1710453]} {Name:Delegate Value:true} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]: Invalid unit name &#8216;\/docker_limit.slice&#8217;: unknown<\/p><\/blockquote>\n\n\n\n<p>Somehow, after upgrading to latest ubuntu, following config doesn&#8217;t work:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cat \/etc\/docker\/daemon.json<br>{<br>\"cgroup-parent\": \"\/docker_limit.slice\"<br>}<\/pre>\n\n\n\n<p>I have to remove the slice config.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, it&#8217;s using Unit Socket. We need to use TCP. Update the docker config service to add TCP: nano \/lib\/systemd\/system\/docker.service Somehow if we don&#8217;t add the real IP I still cannot access it through remote host but only through localhost Reload Daemon: systemctl daemon-reload Restart Docker: systemctl restart docker Verify: ps -aux | grep dockerd root 1575160 4.9 0.1 2710596 88768 ? Ssl 15:08 0:01 \/usr\/bin\/dockerd -H tcp:\/\/127.0.0.1:2375 -H fd:\/\/ &#8211;containerd=\/run\/containerd\/containerd.sock sudo netstat -lntp | grep dockerd tcp 0 0 192.168.103.98:2375 0.0.0.0:* LISTEN 1577963\/dockerd Notes: I got this error: ERROR: for redis Cannot start service redis: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: error while starting unit &#8220;docker-ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0.scope&#8221; with properties [{Name:Description Value:&#8221;libcontainer container ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0&#8243;} {Name:Slice Value:&#8221;\/docker_limit.slice&#8221;} {Name:PIDs Value:@au [1710453]} {Name:Delegate Value:true} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]: Invalid unit name &#8216;\/docker_limit.slice&#8217;: unknown Somehow, after upgrading to latest ubuntu, following config doesn&#8217;t work: cat \/etc\/docker\/daemon.json{&#8220;cgroup-parent&#8221;: &#8220;\/docker_limit.slice&#8221;} I have to remove the slice config.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,16],"tags":[],"class_list":["post-492","post","type-post","status-publish","format-standard","hentry","category-docker","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker Daemon doesn&#039;t listen on 2375 in Ubuntu - Liangqi\u2018s Technical Journey<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/liangqi.org\/?p=492\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker Daemon doesn&#039;t listen on 2375 in Ubuntu - Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"og:description\" content=\"By default, it&#8217;s using Unit Socket. We need to use TCP. Update the docker config service to add TCP: nano \/lib\/systemd\/system\/docker.service Somehow if we don&#8217;t add the real IP I still cannot access it through remote host but only through localhost Reload Daemon: systemctl daemon-reload Restart Docker: systemctl restart docker Verify: ps -aux | grep dockerd root 1575160 4.9 0.1 2710596 88768 ? Ssl 15:08 0:01 \/usr\/bin\/dockerd -H tcp:\/\/127.0.0.1:2375 -H fd:\/\/ &#8211;containerd=\/run\/containerd\/containerd.sock sudo netstat -lntp | grep dockerd tcp 0 0 192.168.103.98:2375 0.0.0.0:* LISTEN 1577963\/dockerd Notes: I got this error: ERROR: for redis Cannot start service redis: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: error while starting unit &#8220;docker-ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0.scope&#8221; with properties [{Name:Description Value:&#8221;libcontainer container ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0&#8243;} {Name:Slice Value:&#8221;\/docker_limit.slice&#8221;} {Name:PIDs Value:@au [1710453]} {Name:Delegate Value:true} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]: Invalid unit name &#8216;\/docker_limit.slice&#8217;: unknown Somehow, after upgrading to latest ubuntu, following config doesn&#8217;t work: cat \/etc\/docker\/daemon.json{&quot;cgroup-parent&quot;: &quot;\/docker_limit.slice&quot;} I have to remove the slice config.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/liangqi.org\/?p=492\" \/>\n<meta property=\"og:site_name\" content=\"Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-06T22:10:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-07T15:30:37+00:00\" \/>\n<meta name=\"author\" content=\"liangqi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"liangqi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/liangqi.org\/?p=492#article\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/?p=492\"},\"author\":{\"name\":\"liangqi\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"headline\":\"Docker Daemon doesn&#8217;t listen on 2375 in Ubuntu\",\"datePublished\":\"2022-07-06T22:10:56+00:00\",\"dateModified\":\"2022-07-07T15:30:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/liangqi.org\/?p=492\"},\"wordCount\":226,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"articleSection\":[\"Docker\",\"\u6280\u672f\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/liangqi.org\/?p=492#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/liangqi.org\/?p=492\",\"url\":\"https:\/\/liangqi.org\/?p=492\",\"name\":\"Docker Daemon doesn't listen on 2375 in Ubuntu - Liangqi\u2018s Technical Journey\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/#website\"},\"datePublished\":\"2022-07-06T22:10:56+00:00\",\"dateModified\":\"2022-07-07T15:30:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/liangqi.org\/?p=492#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/liangqi.org\/?p=492\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/liangqi.org\/?p=492#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/liangqi.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker Daemon doesn&#8217;t listen on 2375 in Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/liangqi.org\/#website\",\"url\":\"https:\/\/liangqi.org\/\",\"name\":\"Liangqi\u2018s Technical Journey\",\"description\":\"Chasing Excellence; Enjoy life.\",\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/liangqi.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\",\"name\":\"liangqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"contentUrl\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"width\":2560,\"height\":1920,\"caption\":\"liangqi\"},\"logo\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/liangqi.org\"],\"url\":\"https:\/\/liangqi.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker Daemon doesn't listen on 2375 in Ubuntu - Liangqi\u2018s Technical Journey","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/liangqi.org\/?p=492","og_locale":"en_US","og_type":"article","og_title":"Docker Daemon doesn't listen on 2375 in Ubuntu - Liangqi\u2018s Technical Journey","og_description":"By default, it&#8217;s using Unit Socket. We need to use TCP. Update the docker config service to add TCP: nano \/lib\/systemd\/system\/docker.service Somehow if we don&#8217;t add the real IP I still cannot access it through remote host but only through localhost Reload Daemon: systemctl daemon-reload Restart Docker: systemctl restart docker Verify: ps -aux | grep dockerd root 1575160 4.9 0.1 2710596 88768 ? Ssl 15:08 0:01 \/usr\/bin\/dockerd -H tcp:\/\/127.0.0.1:2375 -H fd:\/\/ &#8211;containerd=\/run\/containerd\/containerd.sock sudo netstat -lntp | grep dockerd tcp 0 0 192.168.103.98:2375 0.0.0.0:* LISTEN 1577963\/dockerd Notes: I got this error: ERROR: for redis Cannot start service redis: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: error while starting unit &#8220;docker-ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0.scope&#8221; with properties [{Name:Description Value:&#8221;libcontainer container ff0191bcee5eeb3eb0b7d80df55e753248db6494d0110a158b7809078fc062f0&#8243;} {Name:Slice Value:&#8221;\/docker_limit.slice&#8221;} {Name:PIDs Value:@au [1710453]} {Name:Delegate Value:true} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]: Invalid unit name &#8216;\/docker_limit.slice&#8217;: unknown Somehow, after upgrading to latest ubuntu, following config doesn&#8217;t work: cat \/etc\/docker\/daemon.json{\"cgroup-parent\": \"\/docker_limit.slice\"} I have to remove the slice config.","og_url":"https:\/\/liangqi.org\/?p=492","og_site_name":"Liangqi\u2018s Technical Journey","article_published_time":"2022-07-06T22:10:56+00:00","article_modified_time":"2022-07-07T15:30:37+00:00","author":"liangqi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"liangqi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/liangqi.org\/?p=492#article","isPartOf":{"@id":"https:\/\/liangqi.org\/?p=492"},"author":{"name":"liangqi","@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"headline":"Docker Daemon doesn&#8217;t listen on 2375 in Ubuntu","datePublished":"2022-07-06T22:10:56+00:00","dateModified":"2022-07-07T15:30:37+00:00","mainEntityOfPage":{"@id":"https:\/\/liangqi.org\/?p=492"},"wordCount":226,"commentCount":0,"publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"articleSection":["Docker","\u6280\u672f"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/liangqi.org\/?p=492#respond"]}]},{"@type":"WebPage","@id":"https:\/\/liangqi.org\/?p=492","url":"https:\/\/liangqi.org\/?p=492","name":"Docker Daemon doesn't listen on 2375 in Ubuntu - Liangqi\u2018s Technical Journey","isPartOf":{"@id":"https:\/\/liangqi.org\/#website"},"datePublished":"2022-07-06T22:10:56+00:00","dateModified":"2022-07-07T15:30:37+00:00","breadcrumb":{"@id":"https:\/\/liangqi.org\/?p=492#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/liangqi.org\/?p=492"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/liangqi.org\/?p=492#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/liangqi.org\/"},{"@type":"ListItem","position":2,"name":"Docker Daemon doesn&#8217;t listen on 2375 in Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/liangqi.org\/#website","url":"https:\/\/liangqi.org\/","name":"Liangqi\u2018s Technical Journey","description":"Chasing Excellence; Enjoy life.","publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/liangqi.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3","name":"liangqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/","url":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","contentUrl":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","width":2560,"height":1920,"caption":"liangqi"},"logo":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/liangqi.org"],"url":"https:\/\/liangqi.org\/?author=1"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=492"}],"version-history":[{"count":4,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions"}],"predecessor-version":[{"id":498,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions\/498"}],"wp:attachment":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}