VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 68 of file VBoxManageHostonly.cpp
I could get this resolved by following action.
I have set up Vagrant cluster and there was one VM that is not running on Vagrant opened and running in VirtualBox. Issue might be due to that as well.
After configuring some network settings as given below, I got the following error. I have mentioned how I resolved it here.
master.vm.network :private_network, ip: "33.33.33.10"
Vagrant up or Vagrant reload command
Error:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 68 of file VBoxManageHostonly.cpp
Solution:
First power off all the VMs running in virtual box
This is new addition in java 1.7, so if by default JDK is set as older version, this exception will be given. However, when I check java -version and it says java version "1.7.0_45".
If you have java version specific code in your maven application add the following section in your pom.xml
Still it will give the following error:
[ERROR] Failed to execute goal X.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project X: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: invalid target release: 1.7
[ERROR] Usage: javac [ERROR] use -help for a list of possible options
To solve this issue, set the JAVA_HOME variable to the following using any of the following methods:
// Set JAVA_HOME for one session
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
OR
// Set JAVA_HOME for permanently
vim ~/.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
source .bash_profile
echo $JAVA_HOME
Now compile the application
For those who are curious...
When deciding which JVM to consider for compiling, path specified in JAVA_HOME is used. Here's how to check that.
echo $JAVA_HOME
If it is not specified in JAVA_HOME, using the following command, you can see where JDK is located in your machine:
which java
It will give something like this: /usr/bin/java
Try this to find where this command is heading to.
ls -l /usr/bin/java
This is a symbolic link to the path /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands
Now try the following command:
cd /System/Library/Frameworks/JavaVM.framework/Versions
ls
Check where "CurrentJDK" version is linked to. (Right click > Get info) Mine it was /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents.
Version specified as the "currentJDK" will determine which JVM should be used from the available JVMs.
So, this is why I got the "package java.nio.file does not exist" at the first place, as the default referenced JDK is older than 1.7.
How to point Current JDK to correct version?
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm CurrentJDK
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/ CurrentJDK
Additional info...
Also, use the following command to verify from where the Java -version is read. (for fun!.. :))
sudo dtrace -n 'syscall::posix_spawn:entry { trace(copyinstr(arg1)); }' -c "/usr/bin/java -version"
It will output something like this:
dtrace: description 'syscall::posix_spawn:entry ' matched 1 probe
dtrace: pid 7584 has exited
CPU ID FUNCTION:NAME
2 629 posix_spawn:entry /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java
Use the following guide, if you are having problems using Huawei HSDPA dongle in OSX 10.9 Mavericks.
Download Mobile Partner for Mac OSX using the link below: (File name: MOBILE_CONNECT.ISO)
http://huaweifirmwares.com/download/mobile-partner-for-mac-os-x/
Double click on the MOBILE_CONNECT.ISO, and installation process will start. (P.S. Mac OS X supports ISO files natively without the need for any third-party software.)
Complete the installation process. A detailed step by step guide can be found here:
http://www.modemunlock.com/huawei-mobile-partner-for-mac-download.html
Now if you plug in the USB modem and try to connect using Mobile Partner, you will get the following error and program will crash:
Connection Terminated!
To resolve that, follow the steps given below:
Open the terminal
Type the following command:
cd /etc/ppp
Point-to-Point Protocol (PPP) is a method of connecting a computer to the Internet. Working in the data link layer of the OSI model, PPP sends the computer's TCP/IP packets to a server that puts them onto the Internet.
(Ref: http://www.webopedia.com/TERM/P/PPP.html)
you are inside the ppp folder now. type ls -l command. you should see the file named "options". Make sure the user has the required rights to edit the file. If not, use the following command to grant rights. (you need to provide admin credentials)
sudo chown options
Then edit the file using the following command:
vi options
go to 'insert' mode and type the following in that file:
+pap -chap
+pap = Force PAP authentication (This immediately
connects an incoming call to pppd, and then uses PAP (Password
Authentication Protocol) to authenticate the client.)