[MGNLCE-39] Fix 500 error when running the crawler locally on OS X Created: 04/May/16  Updated: 07/Jun/18  Resolved: 07/Jun/18

Status: Closed
Project: Community Edition
Component/s: None
Affects Version/s: 5.4.7, 5.5
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Maxime Michel Assignee: Robert Šiška
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

500 error happens the first time this URL is reached, and then works fine. That makes the build fail on OS X, though.

[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (web-crawler) on project magnolia-integration-tests: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8399/magnoliaTest/.magnolia/jcrprop/?path=/modules/site/config/site/extends&value=/modules/travel-demo/config/travel -> [Help 1]

After some investigation, Robert, Espen and I arrived to the following conclusions:

  • with OS X, the "-XX:-MaxFDLimit" flag is needed, both in cargo.jvmargs (magnolia-integration-tests/tests/pom.xml), as well as in the user's setup.
  • a QA commit should do that on CE (EE?)
  • it would be nice that the crawler would check if the necessary flags are set, and tell it to the user if that's not the case, as we can't directly add those flags in gmaven-plugin.

The way to add it to one's setup is to:

  • pass -Darguments=-XX:-MaxFDLimit to mvn (the -D flag allows it to be forwarded to subprocesses)
  • add -XX:-MaxFDLimit as a Java flag. (Don't add it to $JAVA_OPTS, unless you do alias java='java $JAVA_OPTS', because that one is only read by Tomcat by default.)


 Comments   
Comment by Federico Grilli [ 01/Jun/16 ]

I don't know if this would solve the issue in question but could be worth switching to https://groovy.github.io/gmaven/groovy-maven-plugin/ (even though it seems no longer actively developed since 2013) or https://github.com/groovy/GMavenPlus (more actively developed but may have some limitation). The gmaven-plugin we're using is no longer in development and its last version (1.5) dates back to 2012.

Generated at Mon Feb 12 00:05:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.