Nexus 2 : Task execution failure; Error rendering template /repositoryContentHtml.vm - Sonatype Nexus Repository - Sonatype Community
Nexus 2 : Task execution failure; Error rendering template /repositoryContentHtml.vm
Post by ian.williams1 on Aug 6, 2022
Environment: Nexus Repository Manager OSS 2.15.1-02 on Linux VM
We have observed the following pair of errors listed at bottom, titled : Task execution failure.
Following response on prior (old) support ( #36990)
To fix this, shut down Nexus, and rename “sonatype-work/nexus/indexer” to
“sonatype-work/nexus/indexer.old”.
Then restart, and go to “administration/scheduled tasks” and create and run a repair indexes task against all repositories.
Upon reindexing completion, observed the following (sanitized) logs:
WARN [qtp1658920240-34] anonymous org.sonatype.nexus.content.internal.ContentServlet - java.io.IOException: Template processing error: org.apache.velocity.exception.VelocityException: IO Error rendering template '/org/sonatype/nexus/content/internal/repositoryContentHtml.vm', caused by: org.apache.velocity.exception.VelocityException: IO Error rendering template '/org/sonatype/nexus/content/internal/repositoryContentHtml.vm', caused by: org.eclipse.jetty.io.EofException, caused by: java.io.IOException: Broken pipe [client=,ua=Wget/1.14 (linux-gnu),req=GET http://mavenrepository.corp/nexus/content/repositories/deployables-thirdparty/corp/custom/path/to//groupID/]
ERROR [qtp1658920240-34] org.sonatype.nexus.web.internal.ErrorPageFilter - Internal error: Template processing error: org.apache.velocity.exception.VelocityException: IO Error rendering template '/org/sonatype/nexus/content/internal/repositoryContentHtml.vm'
WARN [qtp1658920240-302] anonymous org.sonatype.nexus.content.internal.ContentServlet - org.eclipse.jetty.io.EofException, caused by: java.io.IOException: Broken pipe [client=,ua=m2e/3.16.0.v20200828-0759/1.16.2.20200910-0936/14.0.2,req=GET http://mavenrepository.corp/nexus/content/groups/authorized/.index/nexus-maven-repository-index.gz]
2022-08-06 17:49:45,097+0000 ERROR [qtp1658920240-302] org.sonatype.nexus.web.internal.ErrorPageFilter - Internal error: null
INFO [SessionValidationThread-1] org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Validating all active sessions...
INFO [SessionValidationThread-1] org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Finished session validation. No sessions were stopped.
I can confirm /deployables-thirdparty/corp/custom/path/to/groupID/ (single slash to/groupID) exists and has 3422 elements / versions inside. Not clear why the logs show “//`” or if that’s related to the error.
Please advise if there is in fact an error, and if it is user resolvable..
Update: Further examination of the logs shows the error ( repositoryContentHtml.vm ) predates the reported Task Execution failures (Download Central Index and Download Central Index).
The repositoryContentHtml.vm** occurs up to 15x / day for 62 of the 90 days (some days skipped) of prior logs; the reindexing only drew our attention to its existence.
Originating Task Execution Failures:
Task ID: 13
Task Name: Download Central Index
Stack trace:
java.io.IOException: Cannot fetch remote index for repository "Central" [id=central], error occurred.
at org.sonatype.nexus.index.DefaultIndexerManager.updateRemoteIndex(DefaultIndexerManager.java:1344)
...
Caused by: java.lang.IndexOutOfBoundsException: Index: 7650, Size: 35
and
Task ID: 97
Task Name: PublishIndexAuthorized
Stack trace:
java.lang.IndexOutOfBoundsException: Index: 7650, Size: 35
at java.util.ArrayList.rangeCheck(ArrayList.java:659)
...