Error opening matlabpool

4 visualizzazioni (ultimi 30 giorni)
Mark
Mark il 7 Nov 2011
Risposto: Gerald il 26 Nov 2014
I'm receiving the following error when attempting to issue a matlabpool open command:
Error using matlabpool (line 126) Java exception occurred: java.net.UnknownHostException: bob: bob at java.net.InetAddress.getLocalHost(Unknown Source)
Let's assume for the moment that the name of the Linux box running Matlab is bob. It's running Fedora with a current Java install (1.6.0_22) and the most recent version of the Parallel Computing Toolbox.
I get a similar error when attempting to query the current computer name using java.net.InetAddress.getLocalHost.getHostName. Fiddling with the hostname in dctconfig or pctconfig does not produce any useful results.
I'm sure this is just a newb java-matlab communication problem. Any tips out there?
  2 Commenti
Thomas
Thomas il 25 Nov 2011
Are you running matlabpool on a local configuration (local machine) or do you have a parallel configuration for a cluster?
Mark
Mark il 29 Nov 2011
Local.

Accedi per commentare.

Risposta accettata

Titus Edelhofer
Titus Edelhofer il 29 Nov 2011
Could you try to add localhost with 127.0.0.1 to your /etc/hosts file?
Titus
  7 Commenti
Titus Edelhofer
Titus Edelhofer il 29 Nov 2011
Hi Mark,
I'm glad to hear it's running!
Titus
Clayton
Clayton il 6 Ago 2014
I also had this problem (running linux RHEL 6 and Matlab R2014a).
>> parpool('local')
Error using parpool (line 99)
Java exception occurred:
java.net.UnknownHostException: EMS-GJDZW12: EMS-GJDZW12: Name or service not
known
at java.net.InetAddress.getLocalHost(Unknown Source)
Caused by: java.net.UnknownHostException: EMS-GJDZW12: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
... 1 more
I tested by pinging my hostname and localhost. Only the latter worked.
[clayton@myMachine ~]$ ping myMachine
ping: unknown host myMachine
[clayton@myMachine ~]$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.029 ms
Then added third line to my /etc/hosts file so it looks like:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 myMachine.localdomain myMachine
And then I could ping my hostname and start parpool with no problems.
[clayton@myMachine ~]$ ping myMachine
PING myMachine.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.037 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.036 ms

Accedi per commentare.

Più risposte (5)

Michal Kvasnicka
Michal Kvasnicka il 24 Nov 2011
Same error on openSUSE 12.1 with Matlab R2011b.
Any hints???

Daniel Shub
Daniel Shub il 29 Nov 2011
Works fine for me on r2011a and Arch:
>> matlabpool open
Starting matlabpool using the 'local' configuration ... connected to 8 labs.
MATLAB Version 7.12.0.635 (R2011a) Operating System: Linux 3.1.0-4-ARCH #1 SMP PREEMPT Mon Nov 7 22:47:18 CET 2011 x86_64 Java VM Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot™ 64-Bit Server VM mixed mode
I also get a meaningful result with:
java.net.InetAddress.getLocalHost.getHostName
I do have 127.0.0.1 in my /etc/hosts file.

Thomas
Thomas il 29 Nov 2011
Can you try validating your local parallel configuration.
Parallel > Manage Configuration> select 'local'> Start Validation.
What results do you get?
Your output should be;
Validation Details
Configuration: "local"
Type: local
--------------------------------------
Stage: Find Resource
Status: Passed
Description: Validation passed
Command Line Output: (none)
--------------------------------------
--------------------------------------
Stage: Distributed Job
Status: Passed
Description: Validation passed
Command Line Output: (none)
--------------------------------------
--------------------------------------
Stage: Parallel Job
Status: Passed
Description: Validation passed
Command Line Output: (none)
--------------------------------------
--------------------------------------
Stage: Matlabpool
Status: Passed
Description: Validation passed
Command Line Output:
Starting matlabpool using the 'local' configuration ... Checking parallel job status.
Checking parallel job status.
Checking parallel job status.
Received a socket connection.
Received a socket connection.
Received a socket connection.
Received a socket connection.
Received a socket connection.
Received a socket connection.
Received a socket connection.
Received a socket connection.
connected to 8 labs.Sending a stop signal to all the labs ... stopped.
Did not find any pre-existing parallel jobs created by matlabpool.
  4 Commenti
Titus Edelhofer
Titus Edelhofer il 29 Nov 2011
Hi Thomas,
seems either not on the path or not installed, see Marks comment to my answer above ...
Mark
Mark il 29 Nov 2011
Actually hostname by itself was working fine, but without the additional line in /etc/hosts hostname -a was failing. In any case adding the line in etc/hosts has solved this problem for me -- hopefully it will do the same for others. Thanks to both of you for the help.

Accedi per commentare.


Josh
Josh il 23 Apr 2013
For me, running openSUSE, I fixed the issue in Yast->Network Settings->Hostname/DNS. Make sure the "Assign Hostname to Loopback IP" is checked. That did it for me.

Gerald
Gerald il 26 Nov 2014
I'm receiving the following error when attempting to issue a parpool open command in Matlab 2014b based on Debian system
Error using parpool (line 99) Java exception occurred: java.net.UnknownHostException: (none): (none): Name or service not known at java.net.InetAddress.getLocalHost(Unknown Source) at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method) at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266) at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120) at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1690) 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:475) Caused by: java.net.UnknownHostException: (none): Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source) at java.net.InetAddress.getAddressesFromNameService(Unknown Source) ... 9 more
Error in parallel.internal.ui.PoolHelper.startPool (line 11) parpool();
I already changed the hosts files as described above and can ping localhost and myMachine. However, parpool still does not work.
Any tips out there?

Categorie

Scopri di più su Java Package Integration in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by