minishift: Locally installed dnsmasq server causes DNS lookups to fail for instances using the xhyve driver

dwojciec-osx:bin dwojciec$ minishift start 
-- Checking if requested hypervisor 'xhyve' is supported on this platform ... OK
-- Checking if xhyve driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-xhyve
   Checking for setuid bit ... OK
-- Checking the ISO URL ... 
   Checking if /Users/dwojciec/.minishift/cache/iso/minishift-rhel7.iso exists ... OK
-- Starting local OpenShift cluster using 'xhyve' hypervisor ...
-- Starting Minishift VM ............... OK
-- Registering machine using subscription-manager
   Registration in progress . FAIL [2s]
Error to register VM: ssh command error:
command : sudo -E subscription-manager register --auto-attach --username XXXXX --password 'XXXXX' 
err     : exit status 70
output  : Registering to: subscription.rhsm.redhat.com:443/subscription
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

I tried to start it using this command to have more information 
minishift start -v 5 --show-libmachine-logs
but not real additional information.
Except the version of subscription-manager

sudo -E subscription-manager version
SSH cmd err, output: <nil>: server type: This system is currently not registered.
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.19.23-1.el7_4
python-rhsm: 1.19.10-1.el7_4

by using minishift ssh I checked the /var/log/rhsm/rhsm.log

see here https://gist.github.com/dwojciec/c05459256b0016214883ea52ae62cf21

any helps are welcome

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (15 by maintainers)

Most upvoted comments

I solved it now. dnsmasq ran on my MAC OSX I have just

sudo launchctl stop homebrew.mxcl.dnsmasq

and now it’s working

dwojciec-osx:.minishift dwojciec$ minishift stop
Stopping local OpenShift cluster...
Cluster stopped.
dwojciec-osx:.minishift dwojciec$ minishift start
-- Checking if xhyve driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-xhyve
   Checking for setuid bit ... OK
-- Starting local OpenShift cluster using 'xhyve' hypervisor ...
-- Starting Minishift VM ............... OK
-- Registering machine using subscription-manager
-- Checking for IP address ... OK
-- Checking if external host is reachable from the Minishift VM ... 
   Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ... 
   Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 1% used OK
-- OpenShift cluster will be configured with ...
   Version: v3.6.173.0.21
-- Checking `oc` support for startup flags ... 
   host-config-dir ... OK
   host-data-dir ... OK
   host-pv-dir ... OK
   host-volumes-dir ... OK
   routing-suffix ... OK
Starting OpenShift using registry.access.redhat.com/openshift3/ose:v3.6.173.0.21 ...
Pulling image registry.access.redhat.com/openshift3/ose:v3.6.173.0.21
Pulled 1/4 layers, 26% complete
Pulled 1/4 layers, 49% complete
Pulled 1/4 layers, 71% complete
Pulled 2/4 layers, 89% complete
Pulled 3/4 layers, 92% complete
Pulled 4/4 layers, 100% complete
Extracting
Image pull complete
OpenShift server started.

The server is accessible via web console at:
    https://192.168.64.2:8443

You are logged in as:
    User:     developer
    Password: <any value>

To login as administrator:
    oc login -u system:admin

dwojciec-osx:.minishift dwojciec$ minishift ssh
Last login: Thu Nov  9 10:35:08 2017 from gateway
[docker@minishift ~]$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 192.168.64.1
[docker@minishift ~]$ ping minishift.io
PING minishift.io (104.28.22.36) 56(84) bytes of data.
64 bytes from 104.28.22.36 (104.28.22.36): icmp_seq=1 ttl=52 time=28.6 ms
64 bytes from 104.28.22.36 (104.28.22.36): icmp_seq=2 ttl=52 time=28.5 ms
64 bytes from 104.28.22.36 (104.28.22.36): icmp_seq=3 ttl=52 time=28.1 ms
https://192.168.64.2:844364 bytes from 104.28.22.36 (104.28.22.36): icmp_seq=4 ttl=52 time=28.3 ms
64 bytes from 104.28.22.36 (104.28.22.36): icmp_seq=5 ttl=52 time=27.3 ms
64 bytes from 104.28.22.36 (104.28.22.36): icmp_seq=6 ttl=52 time=27.8 ms
^C
--- minishift.io ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5005ms
rtt min/avg/max/mdev = 27.397/28.140/28.637/0.458 ms
[docker@minishift ~]$ 

Thanks again for all your help.

@sensadrome The error about seeing a password should be filed against CDK, http://issues.jboss.org/ This is likely do to the way libmachine handles the ssh command (as it fails, it dumps it). Seems we didn’t find all the cases…

I am also seeing this error - and can confirm that either stopping the local dnsmasq server or making it listen on all interfaces (listen-address=0.0.0.0) will alleviate the issue (presumably the latter is not desired since it will break any internal dns?).

It should also be noted that the error is reported in the console and spits out the RHN password which is, presumably, not desirable.

Registering machine using subscription-manager
Registration unsuccessful [554.5ms]
Error to register VM: ssh command error:
command : sudo -E subscription-manager register --auto-attach --username simon-13 --password 'MyActualPassword!'