Expand my Community achievements bar.

SOLVED

Issue with 'rm' goal in content-package-maven-plugin

Avatar

Level 1

Hi,

I am using content-package-maven-plugin with uninstall,rm and install goals. The plugin behaves strangely for the fact that sometimes it fails with error for the 'rm' goal:

DEBUG] Configuring mojo 'com.day.jcr.vault:content-package-maven-plugin:0.0.20:rm' with basic configurator -->
[DEBUG] (f) failOnError = true
[DEBUG] (f) name = <package_name>
[DEBUG] (f) password = ********
[DEBUG] (f) serviceURL = http://localhost:4502/crx/packmgr/service/.json
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@5f65d905
[DEBUG] (f) targetURL = <some_url>/crx/packmgr/service.jsp
[DEBUG] (f) timeout = 5
[DEBUG] (f) useProxy = true
[DEBUG] (f) userId = ********
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[DEBUG] Proxying disabled (useProxy=true) or no proxies configured
[ERROR] Request to <some_url>/crx/packmgr/service.jsp failed, response=Created
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

I am really not able to figure out, what the issue can be. I tried defining the 'timeOut' value explicitly to 10 but to no avail. Can you please help?
Other goals like uninstall and install work just fine. Facing issue with the rm goal. I am using version 0.0.20

Also, attached a file with somewhat a detailed log:)

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

As you can see from your log file the rm goal dislikes receiving the html response instead of xml respone. Could you check whether your service.jsp is being restarted/down/unavailable during the rm command ?

Explains the Package manager workflow  http://dev.day.com/docs/en/crx/current/how_to/package_manager.html

View solution in original post

7 Replies

Avatar

Employee

Hi Sanjeev,

I tried to reproduce this and couldn't. What version of CQ are you using?

Regards,

Justin

Avatar

Community Advisor

Hi Sanjeev,

Try to make the output verbose and see what output you get, can you give us the exact error message you get from the curl command.

Could you try to execute curl command manually in a shell and see what output you get from curl will it work that way?

Thanks,

Peter

Avatar

Level 1

hi PuzhanovsP,

I tried with verbose=true but there wasn't any more information that was displayed.

Now it threw a new error message saying "missing response status". So sometimes, it succeeds and sometimes fails.

I also tried with setting timeout=10 and even increasing to 15 but to no avail.

A detailed error is something like:

[ERROR] Missing response status information in response: <?xml version="1.0" encoding="UTF-8"?>
<html>
  <head>
    <title>Content modified /crx/packmgr/service.jsp</title>
  </head>
  <body>
    <h1>Content modified /crx/packmgr/service.jsp</h1>
    <table>
      <tbody>
        <tr>
          <td>Status</td>
          <td>
            <div id="Status">200</div>
          </td>
        </tr>
        <tr>
          <td>Message</td>
          <td>
            <div id="Message">OK</div>
          </td>
        </tr>
        <tr>
          <td>Location</td>
          <td>
            <a id="Location" href="https://forums.adobe.com/crx/packmgr/service.jsp">/crx/packmgr/service.jsp</a>
          </td>
        </tr>
        <tr>
          <td>Parent Location</td>
          <td>
            <a id="ParentLocation" href="https://forums.adobe.com/crx/packmgr">/crx/packmgr</a>
          </td>
        </tr>
        <tr>
          <td>Path</td>
          <td>
            <div id="Path">/crx/packmgr/service.jsp</div>
          </td>
        </tr>
        <tr>
          <td>Referer</td>
          <td>
            <a id="Referer" href="about:blank">about:blank</a>
          </td>
        </tr>
        <tr>
          <td>ChangeLog</td>
          <td>
            <div id="ChangeLog">&lt;pre&gt;modified(&quot;/crx/packmgr/service.jsp/name&quot;);&lt;br/&gt;modified(&quot;/crx/packmgr/service.jsp/cmd&quot;);&lt;br/&gt;&lt;/pre&gt;</div>
          </td>
        </tr>
      </tbody>
    </table>
    <p>
      <a href="about:blank">Go Back</a>
    </p>
    <p>
      <a href="https://forums.adobe.com/crx/packmgr/service.jsp">Modified Resource</a>
    </p>
    <p>
      <a href="https://forums.adobe.com/crx/packmgr">Parent of Modified Resource</a>
    </p>
  </body>
</html>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.589s
[INFO] Finished at: Tue Sep 17 23:36:43 PDT 2013
[INFO] Final Memory: 8M/196M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:rm (default-cli) on project tmobile-cq-pkgs-remove: Error while removing package. Check log for details. -> [Help 1]

***********************************************

Also, Can you please throw some more light on what you meant by using curl command? I mean, what to use it for...please  excuse but just a bit confused:)

Avatar

Level 1

Hi Justin,

 

We are currently using CQ 5.6. But we faced this issue while using CQ 5.5 as well. This issue is intermittent in nature, so bit difficult to reproduce.

Avatar

Correct answer by
Community Advisor

As you can see from your log file the rm goal dislikes receiving the html response instead of xml respone. Could you check whether your service.jsp is being restarted/down/unavailable during the rm command ?

Explains the Package manager workflow  http://dev.day.com/docs/en/crx/current/how_to/package_manager.html

Avatar

Level 1

Hi PuzanovsP,

 

curl solved the issue for now. But it required fully qualified package name to operate upon, so used a bit of shell script to fetch the version of older artifact to be removed. But still, it was helpful.

 

Thanks a lot:)

Avatar

Level 1

Hi,

I'll try the curl commands as per the link provided by you and update the results.

But, just out of curiousity, if it doesn't likes the html response then shouldn't it fail every-time rather than sometimes?