[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Cluster/Job not setting up via SOAP calls

Hi All

I'm trying to use the Condor SOAP interface by enabling the SOAP parameters in condor_config (as per Section 4.5.1 of Condor manual). I've also followed the sequence of beginTransaction(), newCluster(), newJob() followed by createJobTemplate() and submit(). But the job doesn't seem to be submitted - I've checked it using commands from the command line. I am using Condor 7.8, Axis2 (which makes the code little bit different from what is available on the net on various blogs as they used Axis 1) and Java 1.7 on a Ubuntu 11.10 host. Here's the code snippet:

          String scheddLocation = "";
        String owner = "<my_user_id>";
        String jobFileLocation = "/home/<my user id>/work/dev/CondorWSClient/sample/example.sub";

        try {
            // Create the service stub
            CondorScheddStub stub = new CondorScheddStub(scheddLocation);

            // Begin a transaction, allow for 60 seconds between calls
            BeginTransaction bg = new BeginTransaction();
            BeginTransactionResponse bgr = stub.beginTransaction(bg);
            TransactionAndStatus status = bgr.getResponse();
            logger.info("status code: " + status.getStatus().getCode().getValue());
            Transaction trx = status.getTransaction();
            logger.info("Transaction: " + trx.getId());

            // Get a new cluster for the DAG job.
            NewCluster nc = new NewCluster();
            NewClusterResponse ncr = stub.newCluster(nc);
            int clusterId = ncr.getResponse().getInteger();
            logger.info("Cluster ID: " + clusterId);

            // Get a new Job ID (aka a ProcId) for the Condor Job
            NewJob nj = new NewJob();
            NewJobResponse njr = stub.newJob(nj);
            int jobId = njr.getResponse().getInteger();
            logger.info("Job ID: " + jobId);

            // Build the job's ClassAd.
            ClassAdStructAndStatus jobAd = buildJobAd(owner, jobFileLocation, stub, clusterId, jobId);
            // Now submit the JOB's ClassAd.
            Submit submit = new Submit();

            // Commit the transaction.
            CommitTransaction comm = new CommitTransaction();

            // Ask the Schedd to kick off the JOB immediately.
            RequestReschedule resched = new RequestReschedule();
        } catch (AxisFault ax) {
        } catch (RemoteException rx) {

The transaction ID returned by the beginTransaction() call is a negative value, and changes at every invocation. But the clusterID and jobID are always 0. There are no exceptions anywhere.

I've seen people in the mailing list mentioning Aviary - but unfortunately, we cannot use Aviary right now. In the short term, we need to set up this SOAP interface, and move to Aviary at a later date.

Can anyone please let me know what am I doing wrong?


Arijit Mukherjee
Senior Scientist R&D; Innovation Lab
Tata Consultancy Services
Ph:- 913366367137
Cell:- 9903705285
Mailto: mukherjee.arijit@xxxxxxx
Experience certainty.        IT Services
                       Business Solutions

Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you