How to reset the 'default' RemoteClusterAccess object?

I have created a cluster object 'cluster' and job object 'j'. I accidentally selected the wrong key during my submission. Now when I try to resubmit an identical job, it remembers my past key. This happens when I have 1) created a new job, and 2) cleared the cluster object and created a new cluster object, and 3) restarted matlab, and 4) restated the client computer.
I finally moved the erroneously selected key to another location, only to get the following error when trying to submit the job:
>> submit(j)
Error using parallel.Job/submit (line 304)
Job submission failed because the user supplied IndependentSubmitFcn (independentSubmitFcn)
errored.
Caused by:
Error using parallel.cluster.RemoteClusterAccess.getConnectedAccessWithMirror (line 238)
The supplied identity file 'C:\this\is\a\fake\path\key.ppk' does
not exist.
How do I clear these credentials from being used by MATLAB (I'm using 2014a on Windows 8.1)?
I've also tried manually creating a new RemoteClusterAccess object and setting the job to use it (using the same procedure from this example), but the same problem happens.

5 件のコメント

Brandon Barker
Brandon Barker 2014 年 9 月 23 日
Other notes:
I've also tried a 'clear' and restart of MATLAB.
Nothing seems to be saved in my Documents/MATLAB folder.
Brandon Barker
Brandon Barker 2014 年 9 月 23 日
Does MATLAB use OpenSSH?
Raymond Norris
Raymond Norris 2014 年 9 月 23 日
The RemoteConnection object is stored with the Cluster object, which can be deleted. In doing so, you should be queried for your SSH credentials again. But, if you quit MATLAB, and certainly if you restart your client, you should be prompted for new credentials.
MATLAB uses SSH2 (JSch). Can you restart MATLAB and print a diary of the reproduction of the error?
Which scheduler (and OS) and integration scripts are you using?
Brandon Barker
Brandon Barker 2014 年 9 月 23 日
The client OS is Windows 8.1, the server OS (which I guess doesn't really matter here) is CentOS 6.x.
I'm using some SLURM integration scripts which, incidentally, I heard you probably wrote (at least some version of) :). The Mathworks copyright on these files are mostly up to 2011 or 2012. In the README for that integration directory, I did see the following:
"If you need to change your credentials, you can reset them using the following command in the MATLAB command window: cluster.UserData.RemoteConnection.disconnect
You will be prompted to provide your credentials again when you next submit a job."
Unfortunately, I always have the following:
>> cluster.UserData
ans =
[]
This is true when I create the 'cluster' object using either the parcluster() along with a custom SLURM profile, or the following method (as outlined in the same README):
>> addpath(genpath('C:\Program Files\MATLAB\R2014a\toolbox\distcomp\examples\integration\slurm'))
>> cluster = parallel.cluster.Generic( 'JobStorageLocation', 'C:\TMP_MDCS');
clusterHost = '128.84.9.154';
remoteJobStorageLocation = '/tmp';
set(cluster, 'IndependentSubmitFcn', {@independentSubmitFcn, clusterHost, remoteJobStorageLocation});
set(cluster, 'GetJobStateFcn', @getJobStateFcn);
set(cluster, 'DeleteJobFcn', @deleteJobFcn);
set(cluster, 'CommunicatingSubmitFcn', {@communicatingSubmitFcn, clusterHost, remoteJobStorageLocation});
set(cluster, 'HasSharedFilesystem', false);
set(cluster, 'ClusterMatlabRoot', '/opt/apps/MATLAB/R2014a');
set(cluster, 'OperatingSystem', 'unix');
j = createJob(cluster)
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
createTask(j, @rand, 1, {3,3});
j =
Job
Properties:
ID: 29
Type: independent
Username: brand_000
State: pending
SubmitTime:
StartTime:
Running Duration: 0 days 0h 0m 0s
AutoAttachFiles: true
Auto Attached Files: List files
AttachedFiles: {}
AdditionalPaths: {}
Associated Tasks:
Number Pending: 0
Number Running: 0
Number Finished: 0
Task ID of Errors: []
>> submit(j)
%
% At this point I get asked by a dialog titled "User Credentials":
% Does the identity file require a password?
%
% Typing in the password results in the following:
Error using parallel.Job/submit (line 304)
Job submission failed because the user supplied IndependentSubmitFcn (independentSubmitFcn) errored.
Caused by:
Error using parallel.cluster.RemoteClusterAccess.getConnectedAccessWithMirror (line 238)
Could not connect to remote host 128.84.9.154.
Error using parallel.cluster.RemoteClusterAccess/connect (line 351)
Could not connect session 128.84.9.154: .
Brandon Barker
Brandon Barker 2014 年 9 月 23 日
Another important point - the code I'm using seems to be heavily modified from SLURM integration scripts linked above. If you are interested, and let me know how I should distribute what I have, I'm happy to do so.

サインインしてコメントする。

 採用された回答

Raymond Norris
Raymond Norris 2014 年 9 月 24 日

0 投票

I thought that was where this might be going :) There should be a function, ClusterInfo. Call
>> ClusterInfo.state
Displayed, you should see PrivateKeyFile. To clear it, type
>> ClusterInfo.setPrivateKeyFile('')
The next time you submit a job, you'll be prompted for the new key file. Alternatively, you could just set it above to the new location and you won't be prompted.
The SLURM scripts are well outdated for R2012a+. I have the updated version in my sandbox, it's just making the time to publish them.

4 件のコメント

Brandon Barker
Brandon Barker 2014 年 9 月 24 日
Thanks!
Incidentally, is ClusterInfo.m intended to be used going forward?
Raymond Norris
Raymond Norris 2014 年 9 月 24 日
ClusterInfo is a MATLAB class I wrote which can be used when modyfing the shipping examples in use with the generic scheduler API, but it's not something we plan to use in the shipping code.
Tahariet Sharon
Tahariet Sharon 2023 年 6 月 16 日
Unrecognized function or variable 'ClusterInfo'. :((
Raymond Norris
Raymond Norris 2023 年 6 月 16 日
Hi @Tahariet Sharon ClusterInfo is outdated functionality. If you're getting started with submitting jobs to your HPC cluster, read more here

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeThird-Party Cluster Configuration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by