Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minkube mount: can't assign requested address #11475

Closed
AlexandrePieroux opened this issue May 21, 2021 · 3 comments
Closed

Minkube mount: can't assign requested address #11475

AlexandrePieroux opened this issue May 21, 2021 · 3 comments
Labels
kind/support Categorizes issue or PR as a support question. os/macos packaging/brew macOS (brew) packaging issues

Comments

@AlexandrePieroux
Copy link

AlexandrePieroux commented May 21, 2021

Steps to reproduce the issue:

  1. install minikube on macOS Big Sur 11.2.3 (minikube: stable 1.20.0 (bottled), HEAD) using: brew install minikube
  2. create a new cluster using this command: minikube start --cpus 6 --memory 12288 --disk-size=50GB --vm=true
  3. try to mount a folder using: minikube mount --uid 1000 --gid 1000 ./:/efs --v=10

Full output of minikube logs command:

Log file created at: 2021/05/21 13:59:56
Running on machine: MacBook-Pro-de-Alexandre
Binary: Built with gc go1.16.3 for darwin/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0521 13:59:56.531969   92270 out.go:291] Setting OutFile to fd 1 ...
I0521 13:59:56.533090   92270 out.go:343] isatty.IsTerminal(1) = true
I0521 13:59:56.533095   92270 out.go:304] Setting ErrFile to fd 2...
I0521 13:59:56.533103   92270 out.go:343] isatty.IsTerminal(2) = true
I0521 13:59:56.533701   92270 root.go:316] Updating PATH: /Users/alexandrepieroux/.minikube/bin
I0521 13:59:56.535172   92270 mustload.go:65] Loading cluster: minikube
I0521 13:59:56.536831   92270 main.go:128] libmachine: Found binary path at /Users/alexandrepieroux/.minikube/bin/docker-machine-driver-hyperkit
I0521 13:59:56.538816   92270 main.go:128] libmachine: Launching plugin server for driver hyperkit
I0521 13:59:56.667072   92270 main.go:128] libmachine: Plugin server listening at address 127.0.0.1:60939
I0521 13:59:56.689990   92270 main.go:128] libmachine: () Calling .GetVersion
I0521 13:59:56.693148   92270 main.go:128] libmachine: Using API Version  1
I0521 13:59:56.693163   92270 main.go:128] libmachine: () Calling .SetConfigRaw
I0521 13:59:56.694494   92270 main.go:128] libmachine: () Calling .GetMachineName
I0521 13:59:56.694611   92270 main.go:128] libmachine: (minikube) Calling .GetState
I0521 13:59:56.694837   92270 main.go:128] libmachine: (minikube) DBG | exe=/Users/alexandrepieroux/.minikube/bin/docker-machine-driver-hyperkit uid=0
I0521 13:59:56.695871   92270 main.go:128] libmachine: (minikube) DBG | hyperkit pid from json: 91904
I0521 13:59:56.697775   92270 host.go:66] Checking if "minikube" exists ...
I0521 13:59:56.698698   92270 main.go:128] libmachine: Found binary path at /Users/alexandrepieroux/.minikube/bin/docker-machine-driver-hyperkit
I0521 13:59:56.699052   92270 main.go:128] libmachine: Launching plugin server for driver hyperkit
I0521 13:59:56.726617   92270 main.go:128] libmachine: Plugin server listening at address 127.0.0.1:60945
I0521 13:59:56.727481   92270 main.go:128] libmachine: () Calling .GetVersion
I0521 13:59:56.727935   92270 main.go:128] libmachine: Using API Version  1
I0521 13:59:56.727957   92270 main.go:128] libmachine: () Calling .SetConfigRaw
I0521 13:59:56.728308   92270 main.go:128] libmachine: () Calling .GetMachineName
I0521 13:59:56.728452   92270 main.go:128] libmachine: (minikube) Calling .DriverName
I0521 13:59:56.728750   92270 main.go:128] libmachine: (minikube) Calling .DriverName
I0521 13:59:56.731858   92270 main.go:128] libmachine: (minikube) Calling .DriverName
I0521 13:59:56.768676   92270 out.go:170] 📁  Mounting host path ./ into VM as /efs ...
I0521 13:59:56.802230   92270 out.go:170]     ▪ Mount type:   
I0521 13:59:56.830489   92270 out.go:170]     ▪ User ID:      1000
I0521 13:59:56.856431   92270 out.go:170]     ▪ Group ID:     1000
I0521 13:59:56.882229   92270 out.go:170]     ▪ Version:      9p2000.L
I0521 13:59:56.915436   92270 out.go:170]     ▪ Message Size: 262144
I0521 13:59:56.941478   92270 out.go:170]     ▪ Permissions:  755 (-rwxr-xr-x)
I0521 13:59:56.986209   92270 out.go:170]     ▪ Options:      map[]
I0521 13:59:57.028648   92270 out.go:170]     ▪ Adresse de liaison : 192.168.64.1:60947
W0521 13:59:57.029100   92270 out.go:424] no arguments passed for "🚀  Userspace file server: " - returning raw string
I0521 13:59:57.031295   92270 ssh_runner.go:149] Run: /bin/bash -c "[ "x$(findmnt -T /efs | grep /efs)" != "x" ] && sudo umount -f /efs || echo "
I0521 13:59:57.056461   92270 out.go:170] 🚀  Userspace file server: 
I0521 13:59:57.056874   92270 main.go:128] libmachine: (minikube) Calling .GetSSHHostname
I0521 13:59:57.057082   92270 main.go:128] libmachine: (minikube) Calling .GetSSHPort
I0521 13:59:57.057212   92270 main.go:128] libmachine: (minikube) Calling .GetSSHKeyPath
I0521 13:59:57.057342   92270 main.go:128] libmachine: (minikube) Calling .GetSSHUsername
I0521 13:59:57.057567   92270 main.go:114] stdlog: ufs.go:27 listen tcp 192.168.64.1:60947: bind: can't assign requested address
W0521 13:59:57.057574   92270 out.go:424] no arguments passed for "🛑  Userspace file server is shutdown\n" - returning raw string
W0521 13:59:57.057587   92270 out.go:424] no arguments passed for "🛑  Userspace file server is shutdown\n" - returning raw string
I0521 13:59:57.057635   92270 sshutil.go:53] new ssh client: &{IP:192.168.65.5 Port:22 SSHKeyPath:/Users/alexandrepieroux/.minikube/machines/minikube/id_rsa Username:docker}
I0521 13:59:57.086329   92270 out.go:170] 🛑  Userspace file server is shutdown
I0521 13:59:57.172250   92270 mount.go:147] unmount for /efs ran successfully
I0521 13:59:57.172264   92270 ssh_runner.go:149] Run: /bin/bash -c "sudo mkdir -m 755 -p /efs"
I0521 13:59:57.190594   92270 ssh_runner.go:149] Run: /bin/bash -c "sudo mount -t 9p -o dfltgid=1000,dfltuid=1000,msize=262144,port=60947,trans=tcp,version=9p2000.L 192.168.64.1 /efs"
I0521 14:00:28.855071   92270 command_runner.go:124] ! mount: /efs: mount(2) system call failed: Connection timed out.
I0521 14:00:28.855249   92270 ssh_runner.go:189] Completed: /bin/bash -c "sudo mount -t 9p -o dfltgid=1000,dfltuid=1000,msize=262144,port=60947,trans=tcp,version=9p2000.L 192.168.64.1 /efs": (31.664902588s)
I0521 14:00:28.886047   92270 out.go:170] 
W0521 14:00:28.887326   92270 out.go:235] ❌  Exiting due to GUEST_MOUNT: mount with cmd /bin/bash -c "sudo mount -t 9p -o dfltgid=1000,dfltuid=1000,msize=262144,port=60947,trans=tcp,version=9p2000.L 192.168.64.1 /efs" : /bin/bash -c "sudo mount -t 9p -o dfltgid=1000,dfltuid=1000,msize=262144,port=60947,trans=tcp,version=9p2000.L 192.168.64.1 /efs": Process exited with status 32
stdout:

stderr:
mount: /efs: mount(2) system call failed: Connection timed out.

W0521 14:00:28.888009   92270 out.go:424] no arguments passed for "\n" - returning raw string
W0521 14:00:28.888133   92270 out.go:235] 
W0521 14:00:28.899258   92270 out.go:424] no arguments passed for "😿  If the above advice does not help, please let us know:\n" - returning raw string
W0521 14:00:28.901368   92270 out.go:424] no arguments passed for "👉  https://github.com/kubernetes/minikube/issues/new/choose\n\n" - returning raw string
W0521 14:00:28.901380   92270 out.go:424] no arguments passed for "Please attach the following file to the GitHub issue:\n" - returning raw string
W0521 14:00:28.901656   92270 out.go:424] no arguments passed for "😿  If the above advice does not help, please let us know:\n👉  https://github.com/kubernetes/minikube/issues/new/choose\n\nPlease attach the following file to the GitHub issue:\n- /var/folders/w0/c0n3b6s579359dp5r08szmhh0000gn/T/minikube_mount_8557536ad7d3441419475d1dd1c8407d158a5445_0.log\n\n" - returning raw string
W0521 14:00:28.906645   92270 out.go:235] �[31m╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮�[0m
W0521 14:00:28.907207   92270 out.go:235] �[31m│�[0m                                                                                                                        �[31m│�[0m
W0521 14:00:28.907215   92270 out.go:235] �[31m│�[0m    😿  If the above advice does not help, please let us know:                                                          �[31m│�[0m
W0521 14:00:28.907219   92270 out.go:235] �[31m│�[0m    👉  https://github.com/kubernetes/minikube/issues/new/choose                                                        �[31m│�[0m
W0521 14:00:28.907222   92270 out.go:235] �[31m│�[0m                                                                                                                        �[31m│�[0m
W0521 14:00:28.907226   92270 out.go:235] �[31m│�[0m    Please attach the following file to the GitHub issue:                                                               �[31m│�[0m
W0521 14:00:28.908294   92270 out.go:235] �[31m│�[0m    - /var/folders/w0/c0n3b6s579359dp5r08szmhh0000gn/T/minikube_mount_8557536ad7d3441419475d1dd1c8407d158a5445_0.log    �[31m│�[0m
W0521 14:00:28.908304   92270 out.go:235] �[31m│�[0m                                                                                                                        �[31m│�[0m
W0521 14:00:28.908308   92270 out.go:235] �[31m╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯�[0m
W0521 14:00:28.908318   92270 out.go:235] 

I'm struggling with this on a fresh install of Minikube on OS X. It seems that the userspace file server fail to bind to the ip. I tried to set different IP but with no success.

@RA489
Copy link

RA489 commented May 24, 2021

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label May 24, 2021
@RA489 RA489 added os/macos packaging/brew macOS (brew) packaging issues labels May 24, 2021
@AlexandrePieroux
Copy link
Author

I managed to make it work by specifying the ip manually. I don't know why Minikube was failing to determine the ip range in my case. The range my cluster was operating in was 192.168.65.0/8 but the mount operation was trying to bind to 192.168.64.0/8 (as it can be seen in the logs I posted).

By specifying '--ip 192.168.65.1' at the end of the command, it successfully bind and mount the volume.

@oleg-andreyev
Copy link

For reference

#!/bin/bash

set -x

minikube --v=9 --logtostderr mount $(pwd):/mnt/foo --ip=$(ifconfig en0 | grep "inet\b" | awk '{ print $2 }')
$(ifconfig en0 | grep "inet\b" | awk '{ print $2 }'

will return current IP of MacOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. os/macos packaging/brew macOS (brew) packaging issues
Projects
None yet
Development

No branches or pull requests

4 participants