Error opening matlabpool

조회 수: 3 (최근 30일)
Mark
Mark 2011년 11월 7일
답변: Gerald 2014년 11월 26일
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
Thomas
Thomas 2011년 11월 25일
Are you running matlabpool on a local configuration (local machine) or do you have a parallel configuration for a cluster?
Mark
Mark 2011년 11월 29일
Local.

댓글을 달려면 로그인하십시오.

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 11월 29일
Could you try to add localhost with 127.0.0.1 to your /etc/hosts file?
Titus
  댓글 수: 7
Titus Edelhofer
Titus Edelhofer 2011년 11월 29일
Hi Mark,
I'm glad to hear it's running!
Titus
Clayton
Clayton 2014년 8월 6일
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

댓글을 달려면 로그인하십시오.

추가 답변 (5개)

Michal Kvasnicka
Michal Kvasnicka 2011년 11월 24일
Same error on openSUSE 12.1 with Matlab R2011b.
Any hints???

Daniel Shub
Daniel Shub 2011년 11월 29일
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 2011년 11월 29일
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
Titus Edelhofer
Titus Edelhofer 2011년 11월 29일
Hi Thomas,
seems either not on the path or not installed, see Marks comment to my answer above ...
Mark
Mark 2011년 11월 29일
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.

댓글을 달려면 로그인하십시오.


Josh
Josh 2013년 4월 23일
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 2014년 11월 26일
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?

카테고리

Help CenterFile Exchange에서 Java Package Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by