[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
AW: [geclipse-dev] Problem creating a Proxy
|
Hi,
I see one problem in your code. You created a VO "gilda" but use the name "geclipsetutor" when you create a proxy description:
crea.setVoName("gilda");
.......
VomsProxyDescription desc = new VomsProxyDescription(
new IVirtualOrganization[] { geclipsetutor }, new File(
"/home/pod/.globus/usercert.pem"), new File(
The other parts seem OK.
Jie
-----Ursprüngliche Nachricht-----
Von: geclipse-dev-bounces@xxxxxxxxxxx [mailto:geclipse-dev-bounces@xxxxxxxxxxx] Im Auftrag von POD69@xxxxxxx
Gesendet: Dienstag, 17. Februar 2009 15:21
An: geclipse-dev@xxxxxxxxxxx
Betreff: [geclipse-dev] Problem creating a Proxy
Hi
I use the below code to create a proxy.
VomsVoCreator crea = new VomsVoCreator(); crea.setVoHost("voms.ct.infn.it");
crea.setVoPort(15001);
crea.setVoHostDN("/C=IT/O=INFN/OU=Host/L=Catania/CN=voms.ct.infn.it");
crea.setVoInfoService(URI.create("ldap://glite-rb.ct.infn.it:2170"));
crea.setVoName("gilda");
VomsVirtualOrganization geclipsetutor = new VomsVirtualOrganization();
crea.apply(geclipsetutor);
IGridJobService[] jss = geclipsetutor
.getJobSubmissionServices(null);
ExtensionManager manager = new ExtensionManager(); List<IConfigurationElement> elements = manager
.getConfigurationElements(Extensions.CA_CERT_LOADER_POINT,
Extensions.CA_CERT_LOADER_ELEMENT);
ICaCertificateLoader loader = null;
for (IConfigurationElement elt : elements) {
String name = elt
.getAttribute(Extensions.CA_CERT_LOADER_NAME_ATTRIBUTE);
if (EUGRIDPMA_NAME.equals(name)) {
loader = (ICaCertificateLoader) elt
.createExecutableExtension(Extensions.CA_CERT_LOADER_CLASS_ATTRIBUTE);
break;
}
}
ICaCertificate[] certs = null;
if (loader != null) {
URI[] uris = loader.getPredefinedRemoteLocations();
if ((uris != null) && (uris.length > 0)) {
String[] certnames = loader.getCertificateList(uris[0],
null);
if (certnames != null) {
certs = new ICaCertificate[certnames.length];
for (int i = 0; i < certnames.length; i++) {
certs[i] = loader.getCertificate(uris[0],
certnames[i], null);
}
}
}
}
CaCertManager.getManager().addCertificates(certs);
IPath path = new Path("/home/pod/.globus/gildavo.pem");
PEMCertificateLoader b = new PEMCertificateLoader(); ICaCertificate cert = b.getCertificate(path); CaCertManager.getManager().addCertificate(cert);
VomsProxyDescription desc = new VomsProxyDescription(
new IVirtualOrganization[] { geclipsetutor }, new File(
"/home/pod/.globus/usercert.pem"), new File(
"/home/pod/.globus/userkey.pem")
);
PasswordManager.registerPassword(
"/home/pod/.globus/userkey.pem", "secret");
desc.setLifetime(86400); // In second, so one day here
VomsProxy proxy = (VomsProxy) AuthenticationTokenManager
.getManager().createToken(desc);
if (!proxy.isValid()) {
proxy.validate(new NullProgressMonitor()); } if (!proxy.isActive()) {
proxy.setActive(true, null);
System.out.println("Proxy has been activated!");
}
AuthenticationTokenManager.getManager().setDefaultToken(proxy);
AuthTokenRequest req = new AuthTokenRequest(desc, "", ""); IAuthenticationToken tok = CoreAuthTokenProvider
.staticRequestToken(req);
Unfortunately I suddenly get exceptions. Any idea why do I have to update some libs?
best regards pod
eu.geclipse.core.auth.AuthenticationException: Unable to activate token
at eu.geclipse.voms.auth.VomsProxy.setActive(VomsProxy.java:197)
at glitejobsubmission.Application.start(Application.java:175)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
eu.geclipse.core.auth.AuthenticationException[44743313]: eu.geclipse.core.reporting.ProblemException: Error while trying to query VOMS server
at eu.geclipse.voms.server.VomsServer.query(VomsServer.java:181)
at eu.geclipse.voms.auth.VomsProxy.setActive(VomsProxy.java:171)
at glitejobsubmission.Application.start(Application.java:175)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
eu.geclipse.core.reporting.ProblemException[1438306901]: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at org.globus.gsi.gssapi.SSLUtil.read(SSLUtil.java:42)
at org.globus.gsi.gssapi.net.impl.GSIGssInputStream.readToken(GSIGssInputStream.java:103)
at org.globus.gsi.gssapi.net.impl.GSIGssInputStream.readHandshakeToken(GSIGssInputStream.java:59)
at org.globus.gsi.gssapi.net.impl.GSIGssSocket.readToken(GSIGssSocket.java:65)
at org.globus.gsi.gssapi.net.GssSocket.authenticateClient(GssSocket.java:115)
at org.globus.gsi.gssapi.net.GssSocket.startHandshake(GssSocket.java:145)
at org.globus.gsi.gssapi.net.GssSocket.getOutputStream(GssSocket.java:166)
at eu.geclipse.voms.server.VomsServer.getOutputStream(VomsServer.java:164)
at eu.geclipse.voms.server.VomsServer.query(VomsServer.java:174)
at eu.geclipse.voms.auth.VomsProxy.setActive(VomsProxy.java:171)
at glitejobsubmission.Application.start(Application.java:175)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
--
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
_______________________________________________
geclipse-dev mailing list
geclipse-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/geclipse-dev