If centos in Docker reports an error, restart Docker service, Service Docker Restart,
Detailed reference “docker port mapping or start the container times wrong” https://blog.csdn.net/whatday/article/details/86762264
First, report the wrong situation
When using the yum command, you cannot parse the yum source, and an error occurs:
Second, report the cause of the error
The machine cannot parse the yum source, for three reasons:
(1) The machine can not access the Internet! Please check the network configuration to make sure that you can surf the Internet and then look at the second situation. A simple point is ping a public network IP, such as ping 114.114.114.114 if ping does not work, is not on the network. If you can ping it, that would be the second case.
(2) DNS configuration problem! Nslookup www.baidu.com
nslookup www.baidu.com
nslookup www.baidu.com
nslookup www.baidu.com
nslookup www.baidu.com
nslookup www.baidu.com
(3) The machine can access the Internet, DNS configuration has also been configured, but still cannot resolve yum source, then you can change to a yum source and try again.
Three, can’t access the Internet solution
(1) Check the network card name and enter the command:
(2) Start to modify the network information configuration file, open the configuration file, and enter the command:
vi /etc/sysconfig/network-scripts/ifcfg-Name of the network card
e.g:vi /etc/sysconfig/network-scripts/ifcfg-ens33
(3) Change ONBOOT=no to ONBOOT=yes
4. DNS configuration error solution
(1) This problem is caused by yum’s inability to resolve the domain name corresponding to the remote packet management library even though it has been connected to the Internet during the process of package installation. Therefore, we only need to add the IP address corresponding to DNS to the network configuration. Open the configuration file and enter the command:
vi /etc/sysconfig/network-scripts/ifcfg-Name
(2) Append DNS at the end of the file:
DNS1=8.8.8.8
DNS2=4.2.2.2
(3) Restart the network and enter the command:
ifup Name
e.g:ifup ens33
Read More:
- The solution to frequently pop up “cannot find a valid baseurl for repo” error prompt box in CentOS 6.7
- CentOS 8.2 installation-solve Error setting up base repository
- Centos8 Install Failed to synchronize cache for repo ‘AppStream’, ignoring this repo.
- Linux rhel7/centos7 source code compilation and installation Emacs Error NO x toolkit could be found
- Error 0x00003 occurred during tableau installation. The system cannot find the specified path
- Alicloud centos8 reports an error “error: failed to synchronize cache for repo ‘EPEL modular’”
- [extremely simple and effective] installing docker under centos6. X
- A solution to the default invalid host only mode of CentOS virtual machine in VirtualBox
- Centos7 quick installation of docker and configuration of image acceleration
- RuntimeError: Expected hidden[0] size (x, x, x), got(x, x, x)
- Solution for AutoCAD 2020 installation failure (error code: 1603) / valid for Autodesk family products
- Failed to decrypt protected XML node “DTS:Password” with error 0x8009000B “Key not valid for use in …
- Centos7 network is unreachable
- Error running ‘** [install]‘: No valid Maven installation found. Either set the home director
- Load balancing failed to find a valid mailbox database
- Vacuum box installation CentOS encountered the pit
- Error: nothing to do in centos7’s Yum installation
- Centos7 offline installation of redis and PHP extension redis
- MySQL error — multiple methods of failed to find valid data directory and MySQL setting password appear
- Description: Failed to decrypt protected XML node “DTS:Password” with error 0x8009000B “Key not valid for use in specified state