Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [geclipse-dev] Problem creating a Proxy

No Jie, that is not a problem since geclipsetutor is not the name of the referenced VO (ie a String) but a referenced object!

Pod, Could you please tell us in which line of your code the problem occurs?! This can not be seen from the exceptions since your code does not contain line numbers. Since there are several occassions in your code where the exception could be triggered it would be necessary to exactly know which statement in your code causes the error.

In general I see several possibilities how the described exception can come up:

1) Your VO definition is wrong. You have to be sure that the host and the host DN are really the right values for the "gilda" VO.
2) The gilda CA certificate gets imported to late. Make sure it is already present before you activate your token.
3) Your credentials are not valid for the "gilda" VO.
4) External reasons like the VO server is down or you are behind a proxy/firewall.

You can verify your VO settings by using the graphical g-Eclipse client.

Cheers, Mathias


-----Ursprüngliche Nachricht-----
Von: geclipse-dev-bounces@xxxxxxxxxxx im Auftrag von Tao, Jie
Gesendet: Di 17.02.2009 15:43
An: Developer mailing list
Betreff: 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
_______________________________________________
geclipse-dev mailing list
geclipse-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/geclipse-dev



Back to the top