Need help with job submission

5 views
Skip to first unread message

125secs

unread,
Nov 10, 2009, 2:46:15 PM11/10/09
to jlite
Hi,
I need help with the job submission part... here's my code:

------------------------------------------
Main Method
-------------------------------------------
jobManager = new JobManager(userVO, jobName);
jobManager.reInit(wms);
jobManager.delegateWMS(wms);
JobAd jobAd = jobManager.getJobAd(pathToFile);
String jobID = jobManager.submit(jobAd, computeElement,
dirStr, wms,jobManager);


------------------------------------------
Configuration initialization
-------------------------------------------
public void reInit(String url) throws GridAPIException {
gridInit(getGridConfig(url));
hasInit = true;
}

private GridSessionConfig getGridConfig(String url) {
try{

GridSessionConfig config = new GridSessionConfig();
config.setDelegationId(this.delegateID);
config = setProxyPath(config);
config.setUserKeyPass(conf.getUserPassword());
config.addWMProxy(VO, url);

wmProxyURL = url;
// logger.info("Using proxy: " + wmProxyURL);
return config;
} catch(Exception e){
e.printStackTrace();
}
return null;
}

public static GridSessionConfig setProxyPath(GridSessionConfig config)
{
String x509UserProxy = System.getenv("X509_USER_PROXY");
if (x509UserProxy != null) {
config.setProxyPath(x509UserProxy);
} else {
logger.warn("No proxy found");
System.exit(1);
}
return config;
}

private void gridInit(GridSessionConfig config) throws
GridAPIException {
session = GridSessionFactory.create(config);
GlobusCredential proxy = session.getProxy();
boolean createProxy = false, autoRenew = false;

try {
autoRenew = Boolean.parseBoolean(conf.getProperty
("AutoRenewProxy"));
} catch (MissingPropertyException ex) {
logger.error(ex.toString());
}
if (proxy != null) {
logger.info("Proxy life: " + (proxy.getTimeLeft() / 60 /
60));
if (proxy.getTimeLeft() == 0) {
logger.info("Proxy Expired");
createProxy = true;
if (!autoRenew) {
throw new GridAPIException("Proxy Expired");
}
//less than 6 hour left
} else if (proxy.getTimeLeft() < (6 * 60 * 60)) {
logger.info("Proxy Expiring");
// createProxy = true;
}
} else {
logger.info("Proxy does not exist");
createProxy = true;
if (!autoRenew) {
throw new GridAPIException("Proxy does not exist");
}
}

if (createProxy && autoRenew) {
logger.debug("Creating New Proxy");
proxy = session.createProxy(VO, (24 * 60 * 60));
//delegation proxy
logger.debug("Delegating Proxy");
session.delegateProxy(wmProxyURL, delegateID);
}
if (job == null) {
job = new JobWrapper(session);
} else {
job.setGridSession(session);
}

logger.info("Proxy Inited");
}

-------------------------------
The submission method
----------------------------------
public synchronized String submit(JobAd jad, String CE, String
input, String wms,JobManager jobManager) {
String jobID = null;
JobAd newAd = JobWrapper.jadAddCE(jad, CE);
String jdl = newAd.toString();
logger.info(jdl);
try {
String jobId = jobManager.session.submitJob(wms, jdl,
input);
return jobId;
} catch (GridAPIException ex) {
logger.error(ex.toString());
return null;
}
}

My problem is no output or feedback is given when executed... that's
the most frustrating part... there's no error message for me to
debug...

Can some expert please help me with this problem? Thanks in advance!!!

Oleg Sukhoroslov

unread,
Nov 12, 2009, 9:30:39 AM11/12/09
to jl...@googlegroups.com
Hi,

Did you try to debug jLite as described on the last page of jLite manual?
Any chance you are using GILDA VO?

Regards,
Oleg
Reply all
Reply to author
Forward
0 new messages