tabjy / container-jfr-builder

0 stars 0 forks source link

Failed to build the JMC on Openshift #1

Closed tabjy closed 5 years ago

tabjy commented 5 years ago

Steps to reproduce:

oc new-project "container-jfr-builder"
oc new-build https://github.com/tabjy/container-jfr-builder.git
oc new-app container-jfr-builder/container-jfr-builder:latest~https://github.com/rh-jmc-team/container-jfr.git

Error log:

Downloading from central: https://repo.maven.apache.org/maven2/org/eclipse/tycho/org.eclipse.tycho.p2.resolver.impl/1.0.0/org.eclipse.tycho.p2.resolver.impl-1.0.0.jar
--
  | Progress (1): 4.1/217 kBProgress (1): 7.7/217 kBProgress (1): 12/217 kB Progress (1): 16/217 kBProgress (1): 20/217 kBProgress (1): 24/217 kBProgress (1): 28/217 kBProgress (1): 32/217 kBProgress (1): 36/217 kBProgress (1): 40/217 kBProgress (1): 45/217 kBProgress (1): 49/217 kBProgress (1): 53/217 kBProgress (1): 57/217 kBProgress (1): 61/217 kBProgress (1): 65/217 kBProgress (1): 69/217 kBProgress (1): 73/217 kBProgress (1): 77/217 kBProgress (1): 81/217 kBProgress (1): 85/217 kBProgress (1): 90/217 kBProgress (1): 94/217 kBProgress (1): 98/217 kBProgress (1): 102/217 kBProgress (1): 106/217 kBProgress (1): 110/217 kBProgress (1): 114/217 kBProgress (1): 118/217 kBProgress (1): 122/217 kBProgress (1): 126/217 kBProgress (1): 131/217 kBProgress (1): 135/217 kBProgress (1): 139/217 kBProgress (1): 143/217 kBProgress (1): 147/217 kBProgress (1): 151/217 kBProgress (1): 155/217 kBProgress (1): 159/217 kBProgress (1): 163/217 kBProgress (1): 167/217 kBProgress (1): 171/217 kBProgress (1): 176/217 kBProgress (1): 180/217 kBProgress (1): 184/217 kBProgress (1): 188/217 kBProgress (1): 192/217 kBProgress (1): 196/217 kBProgress (1): 200/217 kBProgress (1): 204/217 kBProgress (1): 208/217 kBProgress (1): 212/217 kBProgress (1): 217/217 kBProgress (1): 217 kB                        Downloaded from central: https://repo.maven.apache.org/maven2/org/eclipse/tycho/org.eclipse.tycho.p2.resolver.impl/1.0.0/org.eclipse.tycho.p2.resolver.impl-1.0.0.jar  (217 kB at 1.8 MB/s)
  | Downloading from central: https://repo.maven.apache.org/maven2/org/eclipse/tycho/org.eclipse.tycho.p2.maven.repository/1.0.0/org.eclipse.tycho.p2.maven.repository-1.0.0.jar
  | Progress (1): 4.1/149 kBProgress (1): 7.7/149 kBProgress (1): 12/149 kB Progress (1): 16/149 kBProgress (1): 20/149 kBProgress (1): 24/149 kBProgress (1): 28/149 kBProgress (1): 32/149 kBProgress (1): 36/149 kBProgress (1): 40/149 kBProgress (1): 45/149 kBProgress (1): 49/149 kBProgress (1): 53/149 kBProgress (1): 57/149 kBProgress (1): 61/149 kBProgress (1): 65/149 kBProgress (1): 69/149 kBProgress (1): 73/149 kBProgress (1): 77/149 kBProgress (1): 81/149 kBProgress (1): 85/149 kBProgress (1): 90/149 kBProgress (1): 94/149 kBProgress (1): 98/149 kBProgress (1): 102/149 kBProgress (1): 106/149 kBProgress (1): 110/149 kBProgress (1): 114/149 kBProgress (1): 118/149 kBProgress (1): 122/149 kBProgress (1): 126/149 kBProgress (1): 131/149 kBProgress (1): 135/149 kBProgress (1): 139/149 kBProgress (1): 143/149 kBProgress (1): 147/149 kBProgress (1): 149 kB                        Downloaded from central: https://repo.maven.apache.org/maven2/org/eclipse/tycho/org.eclipse.tycho.p2.maven.repository/1.0.0/org.eclipse.tycho.p2.maven.repository-1.0.0.jar  (149 kB at 1.5 MB/s)
  | Downloading from central: https://repo.maven.apache.org/maven2/org/eclipse/tycho/org.eclipse.tycho.p2.tools.impl/1.0.0/org.eclipse.tycho.p2.tools.impl-1.0.0.jar
  | Progress (1): 4.1/48 kBProgress (1): 7.7/48 kBProgress (1): 12/48 kB Progress (1): 16/48 kBProgress (1): 20/48 kBProgress (1): 24/48 kBProgress (1): 28/48 kBProgress (1): 32/48 kBProgress (1): 36/48 kBProgress (1): 40/48 kBProgress (1): 45/48 kBProgress (1): 48 kB                      Downloaded from central: https://repo.maven.apache.org/maven2/org/eclipse/tycho/org.eclipse.tycho.p2.tools.impl/1.0.0/org.eclipse.tycho.p2.tools.impl-1.0.0.jar  (48 kB at 638 kB/s)
  | [INFO] Command line:
  | [/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el8_0.x86_64/jre/bin/java, -jar, /tmp/jmc/releng/third-party/?/.m2/repository/org/eclipse/tycho/tycho-bundles-external/1.0.0/eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar, -configuration, /tmp/tycho-p2-runtime7054934267879047760.tmp/configuration, -nosplash, -application, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, -artifactRepository, file:/tmp/jmc/releng/third-party/target/repository, -metadataRepository, file:/tmp/jmc/releng/third-party/target/repository, -publishArtifacts, -compress, -nouses, -source, /tmp/jmc/releng/third-party/target/source]
  | An error has occurred. See the log file
  | /tmp/tycho-p2-runtime7054934267879047760.tmp/configuration/1569594516952.log.
  | [INFO] ------------------------------------------------------------------------
  | [INFO] BUILD FAILURE
  | [INFO] ------------------------------------------------------------------------
  | [INFO] Total time: 01:59 min
  | [INFO] Finished at: 2019-09-27T14:28:37Z
  | [INFO] ------------------------------------------------------------------------
  | [ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.3.0:site (default-cli) on project external-dependencies: Execution default-cli of goal org.reficio:p2-maven-plugin:1.3.0:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: P2 publisher return code was 13 -> [Help 1]
  | [ERROR]
  | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  | [ERROR]
  | [ERROR] For more information about the errors and possible solutions, please read the following articles:
  | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
  | error: build error: non-zero (13) exit code from 172.30.1.1:5000/container-jfr-buildr/container-jfr-builder@sha256:f062e25de553565c1fce7a2c4d4f8556049a7091e160a6c89c82471106807e42

The command that was executing appears to be mvn p2:site.

Works with local s2i command, but not Openshift.

tabjy commented 5 years ago

This issue is reproducible locally when running with docker run --user 1001 ...

tabjy commented 5 years ago

Found a way to pause Openshift's building process. SSHed and tapped into the building container with docker exec -it <container-id> bash.

Executing

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el8_0.x86_64/jre/bin/java \
    -jar /opt/app-root/jmc/releng/third-party/?/.m2/repository/org/eclipse/tycho/tycho-bundles-external/1.0.0/eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar \
    -configuration /tmp/tycho-p2-runtime4079038968581853796.tmp/configuration \
    -nosplash \
    -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \
    -artifactRepository file:/opt/app-root/jmc/releng/third-party/target/repository \
    -metadataRepository file:/opt/app-root/jmc/releng/third-party/target/repository \
    -publishArtifacts -compress -nouses \
    -source /opt/app-root/jmc/releng/third-party/target/source

yeilds:

An error has occurred. See the log file
/tmp/tycho-p2-runtime4079038968581853796.tmp/configuration/1569614200090.log.

cat /tmp/tycho-p2-runtime4079038968581853796.tmp/configuration/1569614200090.log
!SESSION 2019-09-27 19:56:42.847 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_222
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -artifactRepository file:/opt/app-root/jmc/releng/third-party/target/repository -metadataRepository file:/opt/app-root/jmc/releng/third-party/target/repository -publishArtifacts -compress -nouses -source /opt/app-root/jmc/releng/third-party/target/source
Command-line arguments:  -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -artifactRepository file:/opt/app-root/jmc/releng/third-party/target/repository -metadataRepository file:/opt/app-root/jmc/releng/third-party/target/repository -publishArtifacts -compress -nouses -source /opt/app-root/jmc/releng/third-party/target/source

!ENTRY org.eclipse.osgi 4 0 2019-09-27 19:56:43.133
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
bash-4.4$ 
tabjy commented 5 years ago

running mvn -e p2:site

[INFO] Command line:
    [/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el8_0.x86_64/jre/bin/java, -jar, /opt/app-root/jmc/releng/third-party/?/.m2/repository/org/eclipse/tycho/tycho-bundles-external/1.0.0/eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar, -configuration, /tmp/tycho-p2-runtime5361235948099741954.tmp/configuration, -nosplash, -application, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, -artifactRepository, file:/opt/app-root/jmc/releng/third-party/target/repository, -metadataRepository, file:/opt/app-root/jmc/releng/third-party/target/repository, -publishArtifacts, -compress, -nouses, -source, /opt/app-root/jmc/releng/third-party/target/source]
An error has occurred. See the log file
/tmp/tycho-p2-runtime5361235948099741954.tmp/configuration/1569613952403.log.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:34 min
[INFO] Finished at: 2019-09-27T19:52:32Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.3.0:site (default-cli) on project external-dependencies: Execution default-cli of goal org.reficio:p2-maven-plugin:1.3.0:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: P2 publisher return code was 13 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException