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

[Condor-users] Re: Condor 6.7.7 Webservices: Method 'beginTransaction' not implemented



Hi

On Tuesday 31 May 2005 18:47, Matthew Farrellee wrote:
> You are talking to the Collector (on port 9618) not the Schedd. You
> can query the Collector for a Schedd by using the constraint
> "HasSOAPInterface=?=TRUE" and extracting the MyAddress attribute. Or,
> I believe you can force the Schedd to start on a specific port by
> adding "SCHEDD_ARGS=-p 1134" to your configuration file.

Doh! Thanks for the tip.

For the moment I am looking in the Schedd config file for the port, and using 
the same port number at the client.

Now a problem: The Requirements object returned to the client, is null. Why is 
this? Does this mean that the requirements had not been met? Seems strange 
because the only requirement specified is OpSys==\"LINUX\".

Environment: Condor 6.7.7 Personal condor install. Client and Server on same 
host. Web Services interface.

See below for code snippets and logs.

Please advise.

Thanks in advance
Garry

java -cp ../lib:.:$AXISCLASSPATH GarrySubmitJob
Garry: Entered submitJobHelper(11 params)
Garry: transaction is null, so we need to create our own transaction now
Garry: schedd.beginTransation set to 600 (was 60)
Garry: trans_s should now have been created
Garry: trans_s is not null
At this point we assume that the transaction has began, given that we have not 
recieved any errors
Garry: The old clusterId was: -1
Garry: The current clusterId is: 7
Garry: Call the submitJobHelper (4 params) method
Garry: Entered submitJobJHelper (4 params)
Garry: Submitted successfully
Garry: req_s is not null
Garry: reqs IS NULL
Garry: Check if the requirements have been met
Exception in thread "main" java.lang.NullPointerException
        at SOAPScheddApiHelper.submitJobHelper(SOAPScheddApiHelper.java:154)
        at SOAPScheddApiHelper.submitJobHelper(SOAPScheddApiHelper.java:346)
        at GarrySubmitJob.main(GarrySubmitJob.java:20)


GarrySubmitJob:
---------------------
import condor.*;

import java.io.*;
import java.net.URL;
import java.util.*;

public class GarrySubmitJob
   {

   public static void main(String[] args)
      throws Exception
      {
      URL scheddLocation = new URL("http://192.168.100.1:1225";);

      CondorScheddLocator scheddLocator = new CondorScheddLocator();
      CondorScheddPortType schedd = 
scheddLocator.getcondorSchedd(scheddLocation);

      String filesToSend[] = {"TestFile"};

      SOAPScheddApiHelper.submitJobHelper(schedd, null, -1, -1, "nobody", 
UniverseType.VANILLA, "/bin/cp","-f TestFile Testfile.worked", 
"OpSys==\"LINUX\"", null, filesToSend);
      }

   }


A snippet from SOAPScheddApiHelper.java (with System.out.println comments by 
me. No other changes have been made to the source):

        Requirements reqs = reqs_s.getRequirements();

        if(reqs!=null){
                System.out.println("Garry: reqs is not null");
        }else{
                System.out.println("Garry: reqs IS NULL");
        }

        System.out.println("Garry: Check if the requirements have been met");
        if(reqs.getItem() != null) {
            System.err.println("Requirements not met");
        // file transfer?
        }

        System.out.println("About to check the dontCommit variable");

        if(dontCommit){
                System.out.println("DontCommit is TRUE");
        }else{
                System.out.println("DontCommit is FALSE");
        }

        if(!dontCommit) {
            System.out.println("About to commitTransaction...");
            Status st = schedd.commitTransaction(transaction);
            if(st!=null){
                System.out.println("st is not null");
            }else{
                System.out.println("st IS NULL");
            }

            if(!(st.getCode()).equals(StatusCode.SUCCESS)) {
                System.err.println("Failed to commit");
                throw new JobSubmissionException("Failed to commit");
            }
        }

        System.out.println("Returning to caller");

    }

CollectorLog:
----------------
6/1 13:50:57 Found StartdIpAddr
6/1 13:50:57 Got IP = '<192.168.100.1:1082>'
6/1 13:52:07 Found ScheddIpAddr
6/1 13:52:07 Got IP = '<192.168.100.1:1225>'
6/1 13:52:17 Found ScheddIpAddr
6/1 13:52:17 Got IP = '<192.168.100.1:1278>'

MasterLog
-------------
6/1 13:52:07 The SCHEDD (pid 8912) died due to signal 6
6/1 13:52:07 Sending obituary for 
"/home/condor/bin/condor-6.7.7/sbin/condor_schedd"
6/1 13:52:07 restarting /home/condor/bin/condor-6.7.7/sbin/condor_schedd in 10 
seconds
6/1 13:52:17 Started DaemonCore process 
"/home/condor/bin/condor-6.7.7/sbin/condor_schedd", pid and pgroup = 9527

SchedLog:
-------------
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1269>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1270>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1271>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1272>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1273>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1274>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1275>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1276>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:51:06 Received HTTP POST connection from <192.168.100.1:1277>
6/1 13:51:06 About to serve HTTP request...
6/1 13:51:06 Completed servicing HTTP request
6/1 13:52:07 Job has no JobStatus attribute.  Ignoring...
6/1 13:52:07 Job has no JobStatus attribute.  Ignoring...
6/1 13:52:07 Job has no JobStatus attribute.  Ignoring...
6/1 13:52:17 ******************************************************
6/1 13:52:17 ** condor_schedd (CONDOR_SCHEDD) STARTING UP
6/1 13:52:17 ** /home/condor/bin/condor-6.7.7/sbin/condor_schedd
6/1 13:52:17 ** $CondorVersion: 6.7.7 Apr 27 2005 $
6/1 13:52:17 ** $CondorPlatform: I386-LINUX_RH9 $
6/1 13:52:17 ** PID = 9527
6/1 13:52:17 ******************************************************
6/1 13:52:17 Using config file: /home/condor/bin/condor/etc/condor_config
6/1 13:52:17 Using local config 
files: /home/condor/bin/condor-6.7.7/local.chewy/condor_config.local
6/1 13:52:17 DaemonCore: Command Socket at <192.168.100.1:1278>
6/1 13:52:17 Job 7.0 has no Owner attribute.  Removing....
6/1 13:52:17 Job 6.0 has no Owner attribute.  Removing....
6/1 13:52:17 Job 8.0 has no Owner attribute.  Removing....


> On May 31, 2005, at 12:21 PM, Garry Smith wrote:
> > Hi Matthew and the Condor team,
> >
> > Condor 6.7.7. Personal install on Linux.
> > Web Services interface. Trying to execute a query from a Java
> > client to Condor
> > WS (both on the same machine).
> >
> > Have generated the java stub/skeleton classes from the WSDL
> > provided with
> > condor using WSDL2JAVA from AXIS.
> >
> > Summary of error String:
> >
> > faultString: Method 'beginTransaction' not implemented: method name or
> > namespace not recognized.
> >
> > See below for details and logs.  Please advise..
> > Thanks in advance.
> >
> > regards
> > Garry
> >
> >
> > Condor_config has the following lines added:
> > -------------------------------------------------------------
> > # Web Services functionality added by Garry as per
> > # http://www.cs.wisc.edu/condor/birdbath
> > WEB_ROOT_DIR = /home/condor/bin/condor/web
> > ENABLE_SOAP= TRUE
> > ENABLE_WEB_SERVER = TRUE
> > ALLOW_SOAP= */192.168.100.1
> >
> > NOTE: 192.168.100.1 is the IP address of the machine (chewy)
> > running both the
> > Condor daemons and the client.
> >
> > I have created the condor-home/web directory and inserted
> > condorCollector.wsdl
> > condorSchedd.wsdl as stated in the birdbath Website. The wsdl was
> > copied from
> > condor_home/lib/webservice.
> >
> > Client Code (GarrySubmitJob.java) (same as your SubmitJob.java code):
> > ----------------------------------------------------------------------
> > -------
> > import condor.*;
> >
> > import java.io.*;
> > import java.net.URL;
> > import java.util.*;
> >
> > public class GarrySubmitJob
> >    {
> >
> >    public static void main(String[] args)
> >       throws Exception
> >       {
> >       URL scheddLocation = new URL("http://chewy:9618";);
> >
> >       CondorScheddLocator scheddLocator = new CondorScheddLocator();
> >       CondorScheddPortType schedd =
> > scheddLocator.getcondorSchedd(scheddLocation);
> >
> >       String filesToSend[] = {"TestFile"};
> >
> >       SOAPScheddApiHelper.submitJobHelper(schedd, null, -1, -1,
> > "nobody",
> > UniverseType.VANILLA, "/bin/cp","-f TestFile Testfile.worked",
> > "OpSys==\"LINUX\"", null, filesToSend);
> >       }
> >
> >    }
> >
> > SOAPScheddApiHelper.java
> > -------------------------------------
> > Sent to me by Matthew Farrellee on 2005-05-18.
> >
> >
> > Client Stack trace:
> > ------------------------
> > java -cp ../lib:.:$AXISCLASSPATH GarrySubmitJob
> > Exception in thread "main" AxisFault
> >  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
> >  faultSubcode:
> >  faultString: Method 'beginTransaction' not implemented: method
> > name or
> > namespace not recognized
> >  faultActor:
> >  faultNode:
> >  faultDetail:
> >         {http://xml.apache.org/axis/}stackTrace:Method
> > 'beginTransaction' not
> > implemented: method name or namespace not recognized
> >         at
> > org.apache.axis.message.SOAPFaultBuilder.createFault
> > (SOAPFaultBuilder.java:221)
> >         at
> > org.apache.axis.message.SOAPFaultBuilder.endElement
> > (SOAPFaultBuilder.java:128)
> >         at
> > org.apache.axis.encoding.DeserializationContext.endElement
> > (DeserializationContext.java:1087)
> >         at org.apache.xerces.parsers.AbstractSAXParser.endElement
> > (Unknown
> > Source)
> >         at
> > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
> > Source)
> >         at
> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > $FragmentContentDispatcher.dispatch(Unknown
> > Source)
> >         at
> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> > (Unknown
> > Source)
> >         at org.apache.xerces.parsers.XML11Configuration.parse
> > (Unknown Source)
> >         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > Source)
> >         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> >         at org.apache.xerces.parsers.AbstractSAXParser.parse
> > (Unknown Source)
> >         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> >         at
> > org.apache.axis.encoding.DeserializationContext.parse
> > (DeserializationContext.java:227)
> >         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:
> > 696)
> >         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
> >         at
> > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke
> > (MustUnderstandChecker.java:62)
> >         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:
> > 206)
> >         at org.apache.axis.client.Call.invokeEngine(Call.java:2754)
> >         at org.apache.axis.client.Call.invoke(Call.java:2737)
> >         at org.apache.axis.client.Call.invoke(Call.java:2413)
> >         at org.apache.axis.client.Call.invoke(Call.java:2336)
> >         at org.apache.axis.client.Call.invoke(Call.java:1793)
> >         at condor.CondorScheddStub.beginTransaction
> > (CondorScheddStub.java:641)
> >         at SOAPScheddApiHelper.submitJobHelper
> > (SOAPScheddApiHelper.java:220)
> >         at GarrySubmitJob.main(GarrySubmitJob.java:20)
> >
> >         {http://xml.apache.org/axis/}hostname:chewy
> >
> > Method 'beginTransaction' not implemented: method name or namespace
> > not
> > recognized
> >         at
> > org.apache.axis.message.SOAPFaultBuilder.createFault
> > (SOAPFaultBuilder.java:221)
> >         at
> > org.apache.axis.message.SOAPFaultBuilder.endElement
> > (SOAPFaultBuilder.java:128)
> >         at
> > org.apache.axis.encoding.DeserializationContext.endElement
> > (DeserializationContext.java:1087)
> >         at org.apache.xerces.parsers.AbstractSAXParser.endElement
> > (Unknown
> > Source)
> >         at
> > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
> > Source)
> >         at
> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > $FragmentContentDispatcher.dispatch(Unknown
> > Source)
> >         at
> > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> > (Unknown
> > Source)
> >         at org.apache.xerces.parsers.XML11Configuration.parse
> > (Unknown Source)
> >         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > Source)
> >         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> >         at org.apache.xerces.parsers.AbstractSAXParser.parse
> > (Unknown Source)
> >         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> >         at
> > org.apache.axis.encoding.DeserializationContext.parse
> > (DeserializationContext.java:227)
> >         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:
> > 696)
> >         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
> >         at
> > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke
> > (MustUnderstandChecker.java:62)
> >         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:
> > 206)
> >         at org.apache.axis.client.Call.invokeEngine(Call.java:2754)
> >         at org.apache.axis.client.Call.invoke(Call.java:2737)
> >         at org.apache.axis.client.Call.invoke(Call.java:2413)
> >         at org.apache.axis.client.Call.invoke(Call.java:2336)
> >         at org.apache.axis.client.Call.invoke(Call.java:1793)
> >         at condor.CondorScheddStub.beginTransaction
> > (CondorScheddStub.java:641)
> >         at SOAPScheddApiHelper.submitJobHelper
> > (SOAPScheddApiHelper.java:220)
> >         at GarrySubmitJob.main(GarrySubmitJob.java:20)
> >
> >
> > Only two condor logs have timestamps that are later than the client's
> > submission. Details below ...
> >
> > MasterLog (from the time that the query was submitted)
> > ----------------------------------------------------------------------
> > ----
> >
> > 5/31 17:48:50 Received HTTP POST connection from <192.168.100.1:1367>
> > 5/31 17:48:50 About to serve HTTP request...
> > 5/31 17:48:50 Completed servicing HTTP request
> > 5/31 17:49:12 Found ScheddIpAddr
> > 5/31 17:49:12 Got IP = '<192.168.100.1:1335>'
> > 5/31 17:49:12 NegotiatorAd  : Inserting ** "< chewy.lan >"
> > 5/31 17:49:12 (Sending 4 ads in response to query)
> > 5/31 17:49:12 Got QUERY_STARTD_PVT_ADS
> > 5/31 17:49:12 (Sending 1 ads in response to query)
> > 5/31 17:49:29 Found StartdIpAddr
> > 5/31 17:49:29 Got IP = '<192.168.100.1:1336>'
> >
> > NegotiatorLog (from the time of the client request)
> > ---------------------------------------------------------------------
> > 5/31 17:49:12 ---------- Started Negotiation Cycle ----------
> > 5/31 17:49:12 Phase 1:  Obtaining ads from collector ...
> > 5/31 17:49:12   Getting all public ads ...
> > 5/31 17:49:12   Sorting 4 ads ...
> > 5/31 17:49:12   Getting startd private ads ...
> > 5/31 17:49:12 Got ads: 4 public and 1 private
> > 5/31 17:49:12 Public ads include 0 submitter, 1 startd
> > 5/31 17:49:12 Phase 2:  Performing accounting ...
> > 5/31 17:49:12 Phase 3:  Sorting submitter ads by priority ...
> > 5/31 17:49:12 Phase 4.1:  Negotiating with schedds ...
> > 5/31 17:49:12 ---------- Finished Negotiation Cycle ----------
> > 5/31 17:54:12 ---------- Started Negotiation Cycle ----------
> > 5/31 17:54:12 Phase 1:  Obtaining ads from collector ...
> > 5/31 17:54:12   Getting all public ads ...
> > 5/31 17:54:12   Sorting 4 ads ...
> > 5/31 17:54:12   Getting startd private ads ...
> > 5/31 17:54:12 Got ads: 4 public and 1 private
> > 5/31 17:54:12 Public ads include 0 submitter, 1 startd
> > 5/31 17:54:12 Phase 2:  Performing accounting ...
> > 5/31 17:54:12 Phase 3:  Sorting submitter ads by priority ...
> > 5/31 17:54:12 Phase 4.1:  Negotiating with schedds ...
> > 5/31 17:54:12 ---------- Finished Negotiation Cycle ----------