DX Application Performance Management

Expand all | Collapse all

Can CEM export tool work with secured CEM?

Jump to Best Answer
  • 1.  Can CEM export tool work with secured CEM?

    Posted 09-30-2015 11:32 AM

    We used https protocol to access CEM. It seems the CEM export tool doesn't work with https. Is it anyway to make it work with https? Thanks,

     

    https://apmhost:8081

     

    java -jar CEMExportTool.jar -host apmhost t-username admin -password password -port 8081 -command 17 -output "mydata.csv" -interval 2 -start "2015-09-28 00:00:00" -end "2015-09-28 23:59:59" -appname "myapp"

    CEM Host: apmhost

    CEM webservice login username: admin

    CEM webservice login password: *******

    CEM webservice listen port: 8081

    command number: 17

    Export file : mydata.csv

    Aggregation Type: 2

    Query start time : 2015-09-28 00:00:00

    Query end time : 2015-09-28 23:59:59

    application : myapp

    !!!!!Failed to execute command 17 due to:

    The server apmhost failed to respond with a valid HTTP response

    Here is the stack trace:

    org.apache.commons.httpclient.ProtocolException: The server apmhost failed

    to respond with a valid HTTP response

            at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMetho

    dBase.java:1846)

            at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodB

    ase.java:1590)

            at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.j

    ava:995)

            at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt

    pMethodDirector.java:397)

            at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe

    thodDirector.java:170)

            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav

    a:396)

            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav

    a:324)

            at com.export.CEMExportTool.setupWebServices(CEMExportTool.java:708)

            at com.export.CEMExportTool.main(CEMExportTool.java:77)



  • 2.  Re: Can CEM export tool work with secured CEM?

    Broadcom Employee
    Posted 09-30-2015 11:51 AM

    Hi,

    This is just a long shot but did you use a fully qualified name for the EM host, I vaguely remember it misbehaving if you supplied anything different.

    The other thing is, have you reconfigured everything so your HTTPS port is 8081 because that is the default HTTP port, default HTTPS port is 8444 as I read through my em-jetty-config.xml..

    I assume you must have the right port if you are already using the CEM UI..

     

    Thanks,

    David



  • 3.  Re: Can CEM export tool work with secured CEM?

    Posted 09-30-2015 12:32 PM

    Hi David,

    I always got the similar result whether I tried FQDN or IP. I can login CEM UI with https port 8081. My em-jetty file shows we have non-secured port 9090 configured, but the

    port 9090 is not up and listening.  are there any special steps to bring up CEM service on 2 second port? Thanks,

     

      <Call name="addConnector">

        <Arg>

          <New class="com.wily.webserver.TrustingSslSocketConnector">

            <Set name="validateCertificates">true</Set>

            <Set name="HeaderBufferSize">8192</Set>

            <Set name="RequestBufferSize">16384</Set>

            <Set name="verifyHostnames">true</Set>

            <Set name="port">8081</Set>

            <Set name="keystore"><SystemProperty name="introscope.config" default="./config" />/internal/server/apmcentralqa.jks</Set>

            <Set name="password">xxxxxxxx</Set>

            ....

      <Call name="addConnector">

       <Arg>

          <New class="com.wily.webserver.NoNPESocketConnector">

            <Set name="port">9090</Set>

            <Set name="HeaderBufferSize">8192</Set>

            <Set name="RequestBufferSize">16384</Set>

            <Set name="ThreadPool">

              <New class="org.mortbay.thread.BoundedThreadPool">

                <Set name="minThreads">10</Set>

                <Set name="maxThreads">100</Set>

                <Set name="maxIdleTimeMs">60000</Set>

              </New>

            </Set>

          </New>

        </Arg>

    ....



  • 4.  Re: Can CEM export tool work with secured CEM?
    Best Answer

    Posted 09-30-2015 07:18 PM

    Hi Xin,

    CEMExportTool can only connect over HTTP port not HTTPS, so that answers your original question.

    Any reason why you are using Command line tool vs. GUI interface ?

    Since 9.1, same functionality is available via "Export Data" tab in the CEM UI while also allowing you to save as well as Schedule reports.

    It's much more easier and flexible to use vs. CEMExportTool which is command line based.

     

    With regards to your question about enabling non-secure port what you have shown above should work, assuming that the part enabling 9090 port is not commented out in xml, I would check the EM logs to see why 9090 is not listening, perhaps there is some error. In any case if you need further help with troubleshooting that please open a support issue.

     

    Regards,

    Kulbir.



  • 5.  Re: Can CEM export tool work with secured CEM?

    Posted 10-01-2015 07:52 AM

    HI Kulbir,

    You're right that 9090 port setting was commented out. we plan to use command line/scripts to do some admin work, e.g., close incidents and customize reports etc. Thanks for your help.