nanobox
nanobox copied to clipboard
Nanobox-server fail to start on OSX when tap.kext not found
Tested OSX version: 10.12.6
Action
User tries to start nanobox with nanobox start command
Terminal output
$nanobox start Root privileges are required to start the server. Your system password may be requested... Password:
Error : nanobox-server service start was successful but the service is not running Context :
Error : exit status 1 Context :
/var/log/nanobox.log
$ more /var/log/nanobox.log 2017-12-07 02:08:58 INFO Starting nanobox server... 2017-12-07 02:08:58 INFO Updating nanobox-update
Affected code /nanobox/commands/server/server.go line 127
// the tap driver needs to be loaded anytime nanobox is running the vpn (always on osx) func startTAP() error { if runtime.GOOS == "darwin" { out, err := exec.Command("/sbin/kextload", "/Library/Extensions/tap.kext").CombinedOutput() if err != nil { return fmt.Errorf("Failed to load tap extensions - %s. Output - %s", err.Error(), out) } lumber.Info("Loaded tap extensions") } return nil }
Exception handling at this point is not effective and the start process fails silently.
Provisional solution
Install kernel extension manually: https://github.com/saittam/tuntaposx/tree/master/tuntap