LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 03-20-2020, 02:49 AM   #16
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,798

Rep: Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427

Quote:
Originally Posted by venugosr View Post
As i said earlier, i have tried all the possible ways to resolve the deb.debian.org error.
I have updated the /etc/resolv.conf by entering "namesever 8.8.8.8" and "nameserver 192.168.221.1", but nothing works.
I am confused because I don't know where you do what. I fear we are mixing the Centos VM and the container that is on it.

Can you confirm the following:
- in the container, /etc/resolv.conf configures a valid nameserver, for example 192.168.221.1
- in the container, ping 192.168.221.1 or ping 8.8.8.8 succeed
- in the container, ping deb.debian.org and ping www.google.com fail

If that is the case, run tcpdump in the Centos container host and trace packets with UDP port 53 while you try to resolve deb.debian.org.

As a workaround, in the container put the address of deb.debian.org in /etc/hosts and ping it again.

There is also the possibility that /etc/nsswitch in the container is incorrect. It should have a line like this:
Code:
hosts:          files dns
 
Old 03-20-2020, 02:51 AM   #17
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,798

Rep: Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427
Quote:
Originally Posted by venugosr View Post
Hi,

Could someone please help me how to set the Windows IP Address in Linux as i am using VMWare.
Can you clarify what you want? The question seems to ask how you can change the IP address of the Windows host by running commands in the Centos guest. I don't think that is possible.

Perhaps you should ask a different question, as it is not related to name resolution.
 
Old 03-20-2020, 03:17 AM   #18
venugosr
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Hi,

If possible could you please take remote connection and help me.

As i said im a new to dockers and containers.
 
Old 03-20-2020, 03:52 AM   #19
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,798

Rep: Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427Reputation: 1427
I don't know much about Docker and containers either.

Why don't you just do the tests that I suggest? I would do the same thing if I had a remote connection to your server.
 
Old 03-20-2020, 03:56 AM   #20
venugosr
LQ Newbie
 
Registered: Apr 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
as per my knowledge i have tested everything. After that only i have requested help here.
Sorry for the trouble.

I'll close this request.

Its my bad.

Thanks for your time and help.
 
Old 05-22-2020, 04:10 PM   #21
nomad-57
LQ Newbie
 
Registered: May 2020
Location: IN
Distribution: Windows 10, Fedora
Posts: 1

Rep: Reputation: Disabled
Lightbulb

Quote:
Originally Posted by venugosr View Post
Hi Team,

Code:
root@7d73e397628d:/usr/local/apache2# apt update
When i execute the above command and getting the attached error. Please help me how to resolve this.

Note:
I have tried the same in Ubuntu which I have installed in same VMWare, but i did not face any issues.
sorry for necroposting, I may have some idea about why you can't update it, but you're not supposed to do updates(or any changes) within the container. Any changed you make within the container won't persist as in they'll be reset when you stop and start the container again

that being said, I'm more interested in how you got docker working tbh, it's not supported on centOS 8 as far as I'm aware and you're bound to run into issues(as many others have especially with dns resolution, which might explain why you can't update it) and you're supposed to use podman instead.
 
Old 05-24-2020, 11:47 AM   #22
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,149

Rep: Reputation: 85
How did you install docker on Centos? Directly from the repositories of docker or from centos?
I'm guessing from the docker repository, because RHEL might not support docker anymore because of podman. But they're still backporting it on Centos 7.

I assume you have no problems with DNS on your Centos 8 VM, because otherwise you wouldn't have been able to install Docker at all (unless you've downloaded the rpms and copied them through other means, which I doubt).

I'm not sure if this is related to the changes RHEL have made lately (since being taken over by IBM), but I'm starting to becoms suspcious of their intentions. Anyhow, this has nothing to do with your vmware environment, it can't, because Centos works as expected, and then it's only the OS/docker daemon's job to provide the container with a proper dns service.

This is my experience with Centos 8 + docker:
Code:
[root@localhost ~]# docker ps
Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39
[root@localhost ~]# rpm -qa | grep docker
docker-ce-18.09.1-3.el7.x86_64
docker-ce-cli-19.03.9-3.el7.x86_64
[root@localhost ~]# export DOCKER_API_VERSION=1.39
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
So from the start the client version is not set correctly (for whatever reason!) * actually most probably because the docker version is supposed to work on Centos 7, indeed.

After creating the container and entering it, I see that I don't get any DNS either. I find it suspcious that the nameserver is 192.168.0.1 (in my case). Normally it's supposed to be 127.0.0.11 - I'm not sure why you'd have 192.168.221.1 - that cannot be the default - you've either changed it or you are referring to the Centos 8 VM (the host).

Further tests show me that there's no internet connectivity at all from the container:
Code:
root@c2f42946cc00:/dev# exec 3<>/dev/tcp/172.217.20.110/80 # this is google's ip, port 80
bash: connect: No route to host
bash: /dev/tcp/8.8.8.8/: No route to host
I've no idea what's going on, but if you've tested Centos 8 on GCP, they've obviously adjusted it in such a way as to work. Are you sure it was Centos 8 and not 7 or another distro?

If you want to start learning as fast as possible, I suggest simply using Centos 7 (you can install it through docker repos or centos repo - backported, but then you'd get a much older version, but still maintained by centos/rhel) or Debian/Ubuntu. It works without any issues.

I have a bad feeling that Centos 8 has some clear issues, I've heard of official repositories being turned off, whatever. I just hope I'm mistaken and these were just misunderstandings/rumors.

One more important thing:
https://download.docker.com/linux/centos/
Docker doesn't seem to have released a version for Centos 8 at all - it might be related to the fact that RHEL has given up on officially supporting docker, I'm not sure. So that information alone could be enough for you to switch to another distro/version.

* I've posted without actually seeing the second page of this thread, but the post is still relevant and nomad had already offered important info on that.

Last edited by vincix; 05-24-2020 at 11:50 AM.
 
Old 05-25-2020, 03:39 PM   #23
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,149

Rep: Reputation: 85
Ok, I've just discovered that this is related to firewalld.
If you stop firewalld, and restart docker, it works. At least this is what happened in my case. I think there's an incompatibility between firewalld and docker (on Centos 8). Docker is trying to insert its own rules, but it cannot - for some reason - haven't really checked what's going on.

Of course, I don't recommend disabling firewalld, but in your case, I suppose you can do that, as you're testing it in an isolated environment.

Last edited by vincix; 05-25-2020 at 03:45 PM.
 
1 members found this post helpful.
Old 05-28-2020, 04:07 AM   #24
iquestions
LQ Newbie
 
Registered: May 2020
Posts: 1

Rep: Reputation: 0
Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux container host os and container os question jzoudavy Linux - Newbie 1 09-01-2015 05:21 AM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM
[SOLVED] Outputting X display from inside an LXC Container charlie101 Linux - Virtualization and Cloud 1 02-04-2013 09:41 PM
Slackware network scripts inside OpenVZ container yenn Slackware 2 08-21-2012 04:19 PM
QEMU / DosEMU inside OpenVZ container kirtimaan_bkn Linux - Virtualization and Cloud 2 11-09-2010 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration