首页 > 解决方案 > Redhat codeready 容器部署从主机抛出错误查询 DNS: Invalid IP for foo.apps-crc.testing

问题描述

我正在尝试使用此文档https://computingforgeeks.com/setup-local-openshift-cluster-with-codeready-containers/使用 CRC 安装 redhat openshift 。但是在分层容器时,它给出了以下异常

[crc@openshift ~]$ crc start
INFO Checking if oc binary is cached
INFO Checking if podman remote binary is cached
INFO Checking if goodhosts binary is cached
INFO Checking minimum RAM requirements
INFO Checking if running as non-root
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking if libvirt 'crc' network is available
INFO Checking if libvirt 'crc' network is active
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists
INFO Starting CodeReady Containers VM for OpenShift 4.5.9...
INFO CodeReady Containers VM is running
INFO Starting network time synchronization in CodeReady Containers VM
INFO Verifying validity of the cluster certificates ...
INFO Adding 8.8.8.8 as nameserver to the instance ...
INFO Check internal and public DNS query ...
INFO Check DNS query from host ...
WARN foo.apps-crc.testing resolved to [127.0.0.1] but 192.168.130.11 was expected
ERRO Failed to query DNS from host: Invalid IP for foo.apps-crc.testing
Failed to query DNS from host: Invalid IP for foo.apps-crc.testing

我使用的操作系统是 RHEL8。我不明白为什么会出现上述错误。如果我运行host -R 3 foo.apps-crc.testing我得到以下响应:

[crc@openshift ~]$ host -R 3 foo.apps-crc.testing
foo.apps-crc.testing has address 127.0.0.1

/etc/resolv.conf:

# Generated by NetworkManager
search 8.8.4.4
nameserver 127.0.0.1

.

[crc@openshift ~]$ ping foo.apps-crc.testing
PING foo.apps-crc.testing (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.036 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.066 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.062 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.066 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.068 ms
64 bytes from localhost (127.0.0.1): icmp_seq=7 ttl=64 time=0.051 ms
64 bytes from localhost (127.0.0.1): icmp_seq=8 ttl=64 time=0.054 ms
64 bytes from localhost (127.0.0.1): icmp_seq=9 ttl=64 time=0.053 ms

标签: openshiftredhatopenshift-enterprise

解决方案


推荐阅读