Hi,

I am unable to reference your old email in the gt-user archives, but I am
curious that your proxy credential affected access of GRAM job with a
resource key missing exception. So if you comment out the following code
from your snippet, you see a resource key not found exception?

>          //(processing through the extendedgssmanager)
>          ExtendedGSSManager manager = (ExtendedGSSManager)
> ExtendedGSSManager.getInstance();
>          credential = manager.createCredential
> (GSSCredential.INITIATE_AND_ACCEPT);
>          globusCredential = ((GlobusGSSCredentialImpl)
> credential).getGlobusCredential();

In the security framework, when we load credential from a file, we use only
the GlobusGSSCredentialImpl constructor for creating the relevant credential
and we don't create a user credential using the ExtendedGSSManager. So I am
surprised about this fix.

Also, just to confirm, in both cases were you using the following utility or
equivalent to create the EPR to the GRAM factory service?

EndpointReferenceType factoryEndpoint
    = ManagedJobFactoryClientHelper.getFactoryEndpoint(factoryUrl,
factoryType);
ManagedJobFactoryPortType factoryPort
    = ManagedJobFactoryClientHelper.getPort(factoryEndpoint);

In your SOAP message header, did you see the resource key was missing in the
previous case?

Thanks,
Rachana

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Nick Takayama
> Sent: Thursday, November 15, 2007 11:11 PM
> To: [email protected]
> Subject: [gt-user] (solved) Resource key is missing. Custom
> proxy/credentials involved.
> 
> I had trouble finding information when I was struggling with a
> 'Resource key is missing' error this week. Since I have found the
> solution I thought I would post it to this mailing list for others to
> find.
> 
> Essentially, when I was submitting a GT4 GRAM job I was encountering
> the following error:
> 
> org.apache.axis.axisfault : java.rmi.remoteexception: job creation
> failed.; nested exception is:
> org.globus.wsrf.invalidresourcekeyexception: resource key is missing
> 
> Most of my code followed the sample code, except that I was loading
> my proxy credentials manually from a proxy file in a non-standard
> location.
> I eventually came to the realization that not all GSSCredential
> objects are the same. Even though I had loaded my GSSCredential, it
> needed to be processed by the ExtendedGSSManager in order to contain
> the correct resource key for job submission.
> 
> The working code ended up being:
> 
>          //credentials
>          GSSCredential credential;
>          GlobusCredential globusCredential;
> 
>          globusCredential = new GlobusCredential
> ( this.proxyCertLocation );
>          credential = new GlobusGSSCredentialImpl( globusCredential,
> GSSCredential.INITIATE_AND_ACCEPT );
>          //set default credential to prevent accidental loading of
> default globus proxy files
>          GlobusCredential.setDefaultCredential(globusCredential);
> 
>          //(processing through the extendedgssmanager)
>          ExtendedGSSManager manager = (ExtendedGSSManager)
> ExtendedGSSManager.getInstance();
>          credential = manager.createCredential
> (GSSCredential.INITIATE_AND_ACCEPT);
>          globusCredential = ((GlobusGSSCredentialImpl)
> credential).getGlobusCredential();
> 
>          //set security
>          HostAuthorization iA = new HostAuthorization();
>          ClientSecurityDescriptor secDesc = new
> ClientSecurityDescriptor();
>          secDesc.setGSITransport(GSIConstants.ENCRYPTION);
>          secDesc.setAuthz(iA);
>          secDesc.setGSSCredential(credential);
>          secDesc.setProxyFilename(this.proxyCertLocation);
>          ((Stub) factoryPort)._setProperty
> (Constants.CLIENT_DESCRIPTOR, secDesc);
> 
>          Calendar cal = Calendar.getInstance();
>          cal.add(java.util.Calendar.HOUR,50);
> 
>          //generate unique ID for referencing job later
>          String uuid = UUIDGenFactory.getUUIDGen().nextUUID();
> 
>          CreateManagedJobInputType jobInput = new
> CreateManagedJobInputType();
>          jobInput.setJobID(new AttributedURI("uuid:" + uuid));
>          jobInput.setInitialTerminationTime(cal);
>          jobInput.setJob(jobDescription);
> 
>          CreateManagedJobOutputType createResponse =
> factoryPort.createManagedJob(jobInput);
>          EndpointReferenceType jobEndpoint =
> createResponse.getManagedJobEndpoint();
> 
> I hope this information might come in useful for somebody else.
> Although I understand it is not common to load proxy credentials from
> a non-standard location.
> 
> --
> Nick Takayama
> Centre for Comparative Genomics
> Murdoch University              Ph: +61-8-9360-2961
> Murdoch, WA
> Australia  6150                 Fx: +61-8-9360-7238

Reply via email to