Why do I get "java.net.​UnknownHos​tException​" error while trying to open "parpool" in MATLAB R2014a?

79 views (last 30 days)
When I start MATLAB R2014a and execute parpool I get the following error:
 
Error using parpool (line 99)
Java exception occurred:
java.net.UnknownHostException: lumi_lt_37: lumi_lt_37: nodename nor servname provided, or not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:265)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1687)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:195)
at com.mathworks.toolbox.distcomp.ui.desk.ParallelStatusIndicator$ParallelStatusIndicatorUI$9$1.runOnMatlabThread(ParallelStatusIndicator.java:772)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:440)
Caused by: java.net.UnknownHostException: lumi_lt_37: nodename nor servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
... 8 more
Error in parallel.internal.ui.PoolHelper.startPool (line 11)
parpool();

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Jun 2015
This is caused when the machine name or hostname ("lumi_It_37" in this case) is not recognized as a valid hostname/nodename while initializing the parallel pool. This is likely due to a corrupted hosts file. Execute the following instruction on the MATLAB command line:
hostname = char(getHostName(java.net.InetAddress.getLocalHost))
If the java.net.InetAddress.getLocalHost.getHostName method encounter the same unknown host exception issue, the behavior appears to be related to a corrupted hosts file.
To resolve this issue follow these steps:
1) Change the hosts file. On terminal, edit the file under the directory:
/etc/hosts
You can use the following command at the terminal to access the "hosts" file:
sudo nano /private/etc/hosts
Please make sure to map the valid hostnames to valid IP addresses. Please ping the machine name to test. If the issue still persists, contact your IT administrator. The output should look similar to this:
The second line in this hosts file should correlate to your full qualified domain name (FQDN) and the short hostname. The IP address, FQDN, and short hostname all need to be resolvable via ping on the problem computer.
The hostname of the computer can also be found by running the command hostname from terminal. The IP address and the username for the local host can be searched using the following instructions:
ip = char( getHostAddress(java.net.InetAddress.getLocalHost))
user = getenv('UserName')
2) After modifying and saving the hosts file, restart networking on your server or client system to make sure the changes were implemented correctly. In most cases, restarting the computer may be the best way to do this. Once networking or the machine is restarted, check the hosts file again to make sure the changes stayed.
3) Retry parpool or validation to verify that the issue is resolved.

More Answers (0)

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Products


Release

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!