{"id":4843,"date":"2020-11-06T16:39:08","date_gmt":"2020-11-06T19:39:08","guid":{"rendered":"https:\/\/www.dbarj.com.br\/?p=4843"},"modified":"2020-11-06T16:39:08","modified_gmt":"2020-11-06T19:39:08","slug":"docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error","status":"publish","type":"post","link":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/","title":{"rendered":"Docker on Oracle Linux 8 with no access to the internet (yum error)"},"content":{"rendered":"<p>Those days, after deploying a brand new Oracle Linux 8 from OCI, I deployed <strong>docker-ce\u00a0<\/strong>on it to install a new Oracle Database based on docker.<\/p>\n<p>However, when trying to build the database docker image, I started to receive an strange error that was <span style=\"text-decoration: underline;\"><strong>not<\/strong><\/span> happening on Oracle Linux 7. I was receiving an strange error <strong>&#8220;Could not resolve host: yum.oracle.com; Unknown error&#8221;<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Loaded plugins: ovl\r\nhttps:\/\/yum.oracle.com\/repo\/OracleLinux\/OL7\/latest\/x86_64\/repodata\/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: yum.oracle.com; Unknown error\"\r\nTrying other mirror.\r\n\r\n\r\n One of the configured repositories failed (Oracle Linux 7Server Latest (x86_64)),\r\n and yum doesn't have enough cached data to continue. At this point the only\r\n safe thing yum can do is fail. There are a few ways to work \"fix\" this:\r\n\r\n     1. Contact the upstream for the repository and get them to fix the problem.\r\n\r\n     2. Reconfigure the baseurl\/etc. for the repository, to point to a working\r\n        upstream. This is most often useful if you are using a newer\r\n        distribution release than is supported by the repository (and the\r\n        packages for the previous distribution release still work).\r\n\r\n     3. Run the command with the repository temporarily disabled\r\n            yum --disablerepo=ol7_latest ...\r\n\r\n     4. Disable the repository permanently, so yum won't use it by default. Yum\r\n        will then just ignore the repository until you permanently enable it\r\n        again or use --enablerepo for temporary usage:\r\n\r\n            yum-config-manager --disable ol7_latest\r\n        or\r\n            subscription-manager repos --disable=ol7_latest\r\n\r\n     5. Configure the failing repository to be skipped, if it is unavailable.\r\n        Note that yum will try to contact the repo. when it runs most commands,\r\n        so will have to try and fail each time (and thus. yum will be be much\r\n        slower). If it is a very temporary problem though, this is often a nice\r\n        compromise:\r\n\r\n            yum-config-manager --save --setopt=ol7_latest.skip_if_unavailable=true\r\n\r\nfailure: repodata\/repomd.xml from ol7_latest: [Errno 256] No more mirrors to try.\r\nhttps:\/\/yum.oracle.com\/repo\/OracleLinux\/OL7\/latest\/x86_64\/repodata\/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: yum.oracle.com; Unknown error\"<\/pre>\n<p>Going further to try to understand the error, I started an Oracle Linux compute on docker and tried to access the internet on it:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># docker run -dit --name test oraclelinux:7-slim\r\n# docker exec -it test bash\r\nbash-4.2# yum install telnet\r\nLoaded plugins: ovl\r\nhttps:\/\/yum.oracle.com\/repo\/OracleLinux\/OL7\/latest\/x86_64\/repodata\/repomd.xml: [Errno 14] curl#6 - \"Could not resolve host: yum.oracle.com; Unknown error\"\r\nTrying other mirror.<\/pre>\n<p>So the same error&#8230;<\/p>\n<p>After digging further, I found a similar issue happening on CentOS 8 which the solution was:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># firewall-cmd --zone=public --add-masquerade --permanent\r\n# firewall-cmd --reload<\/pre>\n<div class=\"s-prose js-post-body\">\n<p>&#8220;Reboot or restart\u00a0<code>dockerd<\/code>, and both ingress and egress should work.&#8221;<\/p>\n<\/div>\n<p>Source: <a href=\"https:\/\/serverfault.com\/questions\/987686\/no-network-connectivity-to-from-docker-ce-container-on-centos-8\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/serverfault.com\/questions\/987686\/no-network-connectivity-to-from-docker-ce-container-on-centos-8<\/a><\/p>\n<b>Have you enjoyed? Please leave a comment or give a \ud83d\udc4d!<\/b>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style2 like-4843 jlk' href='javascript:void(0)' data-task='like' data-post_id='4843' data-nonce='de4404f630' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.dbarj.com.br\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-4843 lc'>+4<\/span><\/a><\/div><\/div> <div class='status-4843 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Those days, after deploying a brand new Oracle Linux 8 from OCI, I deployed docker-ce\u00a0on it to install a new Oracle Database based on docker. However, when trying to build the database docker image, I started to receive an strange error that was not happening on Oracle Linux 7. I was receiving an strange error &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-4843","post","type-post","status-publish","format-standard","hentry","category-linux-en","item-wrap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Docker on Oracle Linux 8 with no access to the internet (yum error) - DBA - Rodrigo Jorge - Oracle Tips and Guides<\/title>\n<meta name=\"description\" content=\"How to solve &quot;Could not resolve host: yum.oracle.com; Unknown error&quot; on docker running over Oracle Linux 8.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DBA RJ\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/\"},\"author\":{\"name\":\"DBA RJ\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"headline\":\"Docker on Oracle Linux 8 with no access to the internet (yum error)\",\"datePublished\":\"2020-11-06T19:39:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/\"},\"wordCount\":138,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"articleSection\":[\"Linux for Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/\",\"name\":\"Docker on Oracle Linux 8 with no access to the internet (yum error) - DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#website\"},\"datePublished\":\"2020-11-06T19:39:08+00:00\",\"description\":\"How to solve \\\"Could not resolve host: yum.oracle.com; Unknown error\\\" on docker running over Oracle Linux 8.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2020\\\/11\\\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker on Oracle Linux 8 with no access to the internet (yum error)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/\",\"name\":\"DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"description\":\"Blog about Databases, Security and High Availability\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\",\"name\":\"DBA RJ\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"contentUrl\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"width\":712,\"height\":712,\"caption\":\"DBA RJ\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker on Oracle Linux 8 with no access to the internet (yum error) - DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"How to solve \"Could not resolve host: yum.oracle.com; Unknown error\" on docker running over Oracle Linux 8.","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:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/","twitter_misc":{"Written by":"DBA RJ","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/#article","isPartOf":{"@id":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/"},"author":{"name":"DBA RJ","@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"headline":"Docker on Oracle Linux 8 with no access to the internet (yum error)","datePublished":"2020-11-06T19:39:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/"},"wordCount":138,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"articleSection":["Linux for Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/","url":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/","name":"Docker on Oracle Linux 8 with no access to the internet (yum error) - DBA - Rodrigo Jorge - Oracle Tips and Guides","isPartOf":{"@id":"https:\/\/www.dbarj.com.br\/en\/#website"},"datePublished":"2020-11-06T19:39:08+00:00","description":"How to solve \"Could not resolve host: yum.oracle.com; Unknown error\" on docker running over Oracle Linux 8.","breadcrumb":{"@id":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbarj.com.br\/en\/2020\/11\/docker-on-oracle-linux-8-with-no-access-to-the-internet-yum-error\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbarj.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Docker on Oracle Linux 8 with no access to the internet (yum error)"}]},{"@type":"WebSite","@id":"https:\/\/www.dbarj.com.br\/en\/#website","url":"https:\/\/www.dbarj.com.br\/en\/","name":"DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"Blog about Databases, Security and High Availability","publisher":{"@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbarj.com.br\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9","name":"DBA RJ","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","url":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","contentUrl":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","width":712,"height":712,"caption":"DBA RJ"},"logo":{"@id":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png"}}]}},"_links":{"self":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/4843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/comments?post=4843"}],"version-history":[{"count":1,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/4843\/revisions"}],"predecessor-version":[{"id":4844,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/4843\/revisions\/4844"}],"wp:attachment":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/media?parent=4843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/categories?post=4843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/tags?post=4843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}