LogCollection AXL

Version 1
    This document was generated from CDN thread

    Created by: Arda Savran on 02-03-2009 09:40:14 PM
    I have been working on this for a while now. I am trying to have CUCM6 push its trace files to an external SFTP server. I tried to mirror everying from RTMT but I still can not get a response to my SOAP requests. The following is my SOAP request:
     
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
       <soapenv:Header/>
       <soapenv:Body>
          <soap:SelectLogFiles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <FileSelectionCriteria xsi:type="log:SchemaFileSelectionCriteria" xmlns:log="http://cisco.com/ccm/serviceability/soap/LogCollection/">
                <ServiceLogs xsi:type="log:ArrayOfString">
                   <!--Zero or more repetitions:-->
                   <item xsi:type="xsd:string">Cisco CallManager</item>
                </ServiceLogs>
                <SystemLogs xsi:type="log:ArrayOfString">
                   <!--Zero or more repetitions:-->
                   <item xsi:type="xsd:string">Cisco CDP</item>
                </SystemLogs>
                <SearchStr xsi:type="xsd:string">?</SearchStr>
                <Frequency xsi:type="log:Frequency">OnDemand</Frequency>
                <JobType xsi:type="log:JobType">PushtoSFTPServer</JobType>
                <ToDate xsi:type="xsd:string">?</ToDate>
                <FromDate xsi:type="xsd:string">?</FromDate>
                <TimeZone xsi:type="xsd:string">Client: (GMT-6:0)Central Standard Time</TimeZone>
                <RelText xsi:type="log:RelText">Hours</RelText>
                <RelTime xsi:type="xsd:byte">10</RelTime>
                22
                <IPAddress xsi:type="xsd:string">172.29.212.20</IPAddress>
                <UserName xsi:type="xsd:string">drop</UserName>
                test
                <ZipInfo xsi:type="xsd:boolean">false</ZipInfo>
                <RemoteFolder xsi:type="xsd:string">/pub</RemoteFolder>
             </FileSelectionCriteria>
          </soap:SelectLogFiles>
       </soapenv:Body>
    </soapenv:Envelope>


    And this is what I am getting for response:


    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
          <soapenv:Fault>
             <faultcode>soapenv:Server.userException</faultcode>
             <faultstring>java.rmi.RemoteException: Error encountredjava.rmi.ServerException: LogCollectionUtils:getOnDemandList::Job not found</faultstring>
             <detail>
                <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">CUCM6</ns1:hostname>
             </detail>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>
    <font face="Times New Roman" size="3">
     
    </font>
     

     
    Any idea is greatly appreciated

    Thanks in advance,

     
     
     

    Subject: RE: LogCollection AXL
    Replied by: Arda Savran on 03-03-2009 04:52:11 PM
    Can somebody please let me know how to use SOAP to have a CUCM 6 push a trace log to an external SFTP server?
     
    I have been trying to use the request above but I didnt have any luck with it yet. It keeps giving me the "Job Not Found" error. I running the request against log collection AXL and trying to collect the traces for Cisco CallManager Service.
     
    Thanks in advance again,

    Subject: RE: LogCollection AXL
    Replied by: David Staudt on 04-03-2009 05:03:02 AM
    I just got this to work using the query as below.  I believe 'SFTP' here means SSH File Transfer Protocol, not FTPS (i.e. TLS.)  I used openssh-server on Ubuntu 8.10 as the target (regular ole SSH,) and it worked without a hitch.  I did try proftpd with TLS configured, but either LogCollectionPort isn't setup to use that or I didn't get the proftpd config right.
     
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
       <soapenv:Header/>
       <soapenv:Body>
          <soap:SelectLogFiles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <FileSelectionCriteria xsi:type="log:SchemaFileSelectionCriteria" xmlns:log="http://cisco.com/ccm/serviceability/soap/LogCollection/">
                <ServiceLogs xsi:type="log:ArrayOfString[1]">
                   <item xsi:type="xsd:string">Cisco AXL Web Service</item>
                </ServiceLogs>
                <SystemLogs xsi:type="log:ArrayOfString"/>
                <SearchStr xsi:type="xsd:string"/>
                <Frequency xsi:type="log:Frequency">OnDemand</Frequency>
                <JobType xsi:type="log:JobType">PushtoSFTPServer</JobType>
                <ToDate xsi:type="xsd:string"/>
                <FromDate xsi:type="xsd:string"/>
                <TimeZone xsi:type="xsd:string"/>
                22
                <IPAddress xsi:type="xsd:string">10.0.0.1</IPAddress>
                <UserName xsi:type="xsd:string">dstaudt</UserName>
                password
                <ZipInfo xsi:type="xsd:boolean">f</ZipInfo>
                <RemoteFolder xsi:type="xsd:string">/home/dstaudt/Desktop/</RemoteFolder>
             </FileSelectionCriteria>
          </soap:SelectLogFiles>
       </soapenv:Body>
    </soapenv:Envelope>
     
    (Note, the Port and Password tags are getting mangled by the forum software, I think)

    Subject: RE: LogCollection AXL
    Replied by: Arda Savran on 04-03-2009 01:14:29 AM
    I think managed to take a step forward with this issue. I had to include the "toDate" and "fromDate" parameters in the request. However this time the request returned this error.
     
    java.rmi.RemoteException: Error encountredjava.rmi.ServerException: Error connecting SFTP server: &lt;Status>Error connecting to 192.168.1.3 Please check the connectivity with FTP server&lt;/Status
     
    I am using an SFTP server. It works with "RTMT trace collection". Unfortunately, the same server and the same parameter, when I put them in the SOAP request return the response above.
     
    Does anyone have any ideas? I am using CoreFTP server as my SFTP server. Is there something you can recommend me?
     
    thanks

    Subject: RE: LogCollection AXL
    Replied by: Arda Savran on 04-03-2009 06:20:17 PM
    Thanks for the help.....
     
    I literally copied and pasted what you put in here but still getting the same SFTP error.
     
    I found some instructions on how to set up an SFTP server on Ubuntu 8.1. (I got the instructions from http://blog.markvdb.be/2009/01/sftp-on-ubuntu-and-debian-in-9-easy.html) Used it and I think it works coz I am able to connect to it through winscp. But I am still getting the same FTP error message to my SOAP request.
     
    Based on the error message, is there definitely something wrong with my SFTP or could there be somethingelse even if I am getting the error I mentioned above..Any idea?
     
    Weird thing is SFTP server works when I send the same query via Cisco RTMT to make CUCM upload its log files to the same SFTP server. However it doesnt work when I send it via SOAPUI.
     
    Thanks

    Subject: RE: LogCollection AXL
    Replied by: arda savran on 30-03-2009 03:40:34 PM
    David,
     
    I am still trying to figure out this problem with the SFTP server. SFTP server works with the RTMT and other applications but as soon as I run my SOAP/HTTPS query for the log collection I am getting the same error message over and over again. The error message is:
     
    java.rmi.RemoteException: Error encountredjava.rmi.ServerException: Error connecting SFTP server: &lt;Status>Error connecting to 172.29.212.20 Please check the connectivity with FTP server&lt;/Status
     
    My exact SOAP request is:
     
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
       <soapenv:Header/>
       <soapenv:Body>
          <soap:SelectLogFiles soapenv:encodingStyle="
    http://schemas.xmlsoap.org/soap/encoding/">
             <FileSelectionCriteria xsi:type="log:SchemaFileSelectionCriteria" xmlns:log="
    http://cisco.com/ccm/serviceability/soap/LogCollection/">
                <ServiceLogs xsi:type="log:ArrayOfString">
                   <!--Zero or more repetitions:-->
                   <item xsi:type="xsd:string">Cisco AXL Web Service</item>
                </ServiceLogs>
                <SystemLogs xsi:type="log:ArrayOfString"/>
                <SearchStr xsi:type="xsd:string"/>
                <Frequency xsi:type="log:Frequency">OnDemand</Frequency>
                <JobType xsi:type="log:JobType">PushtoSFTPServer</JobType>
                <ToDate xsi:type="xsd:string"/>
                <FromDate xsi:type="xsd:string"/>
                <TimeZone xsi:type="xsd:string">Client: (GMT-8:0)Pacific Standard Time</TimeZone>
                <RelText xsi:type="log:RelText">Hours</RelText>
                <RelTime xsi:type="xsd:byte">1</RelTime>
                22
                <IPAddress xsi:type="xsd:string">172.29.212.20</IPAddress>
                <UserName xsi:type="xsd:string">XXXXXX</UserName>
                XXXXXX
                <ZipInfo xsi:type="xsd:boolean">false</ZipInfo>
                <RemoteFolder xsi:type="xsd:string">/</RemoteFolder>
             </FileSelectionCriteria>
          </soap:SelectLogFiles>
       </soapenv:Body>
    </soapenv:Envelope>

     
    Can you please help me to find what to trace on CUCM to figure out the problem or can you let me know how I can set up an SFTP server on ubuntu?
     
    Thanks for the help,

    Subject: RE: LogCollection AXL
    Replied by: David Staudt on 30-03-2009 07:40:42 PM
    The XML request itself looks ok.  For SFTP, I would suggest following the how-to here: https://help.ubuntu.com/community/SSHHowto.  Your application server is the SSH server in this setup.
     
    The 'Transferring Files Remotely with SSH' section refers to the mechanism UCM seems to be using.

    Subject: RE: LogCollection AXL
    Replied by: Arda Savran on 03-04-2009 07:37:42 PM
    I managed to make it work with Ubuntu's SFTP server; thanks to you..
     
    Now I need to figure out why it doesnt work with other SFTP servers.
     
    Thanks again