Skip to content

HADOOP-19994. Start PhantomJS with OPENSSL_CONF=/dev/null for catalog webapp Jasmine tests - #8757

Merged
slfan1989 merged 1 commit into
apache:trunkfrom
joseluisll:HADOOP-19994-phantomjs-openssl3
Oct 6, 2026
Merged

slfan1989 merged 1 commit into
apache:trunkfrom
joseluisll:HADOOP-19994-phantomjs-openssl3

Conversation

@joseluisll

@joseluisll joseluisll commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Required by (waits for this one to be merged):

Description of PR

JIRA: HADOOP-19994. Start PhantomJS with OPENSSL_CONF=/dev/null for catalog webapp Jasmine tests

PhantomJS 2.1.1 (downloaded by phantomjs-maven-plugin for the hadoop-yarn-applications-catalog-webapp Jasmine specs) bundles OpenSSL 1.x. On OpenSSL 3 systems, such as the ubuntu-noble precommit image, /etc/ssl/openssl.cnf declares providers = provider_sect. OpenSSL 1.x fails to load libproviders.so, prints "Auto configuration failed" and exits before opening its WebDriver port. jasmine-maven-plugin then fails with UnreachableBrowserException, the reactor stops, and the unit vote is -1 on every PR.

Fix: a Unix-only profile (phantomjs-openssl-conf) in the catalog-webapp pom starts PhantomJS through /bin/sh -c 'OPENSSL_CONF=/dev/null exec "$0" "$@"' <phantomjs> ..., using the phantomjs.binary.path and phantomjs.cli.args capabilities.

  • Same approach as RANGER-4791 (apache/ranger@de2fa77): OPENSSL_CONF is set only for the process that starts PhantomJS. Ranger used frontend-maven-plugin's environmentVariables. jasmine-maven-plugin / PhantomJSDriverService cannot set the browser's environment (it logs environment: {}), hence the sh -c wrapper.
  • Fixes developers' local builds on any OpenSSL 3 distro, not only CI. No image-wide OPENSSL_CONF change, which would affect every tool in the container.
  • The specs still run; nothing is skipped. Windows keeps launching PhantomJS directly.
  • /dev/null is an empty, valid config on every system.
  • Durable follow-up: replace PhantomJS (unmaintained) with headless Chromium.

How was this patch tested?

Ubuntu 24.04, OpenSSL 3.0.13 (same openssl.cnf as the precommit image):
mvn test -pl hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp

Before:
Auto configuration failed
...filename(libproviders.so): libproviders.so: cannot open shared object file
...MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, path=providers
[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:2.1:test ... UnreachableBrowserException
BUILD FAILURE

After:
INFO: executable: /bin/sh
Results: 15 specs, 0 failures, 0 pending
BUILD SUCCESS

Checked with help:effective-pom that with the profile deactivated (as on Windows), the jasmine configuration is unchanged.

For code changes:

  • Does the title of this PR start with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: Have the integration tests been executed and the endpoint declared according to the connector-specific documentation? (N/A)
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0? (N/A, no new dependencies)
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files? (N/A)

AI Tooling

Contains content generated by Claude Code.

@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 24s #8757 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8757/1/console
versions git=2.34.1
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

… webapp Jasmine tests

PhantomJS 2.1.1, downloaded by phantomjs-maven-plugin for the
hadoop-yarn-applications-catalog-webapp Jasmine specs, bundles OpenSSL
1.x. On OpenSSL 3 systems (e.g. the Ubuntu noble precommit image)
/etc/ssl/openssl.cnf declares "providers = provider_sect"; OpenSSL 1.x
tries to dlopen libproviders.so, fails with "Auto configuration failed"
and exits before opening its WebDriver port, so jasmine-maven-plugin
times out with UnreachableBrowserException and the reactor stops.

jasmine-maven-plugin and PhantomJSDriverService offer no way to set the
browser's environment, so on Unix start PhantomJS through
/bin/sh -c 'OPENSSL_CONF=/dev/null exec "$0" "$@"', using the
phantomjs.binary.path and phantomjs.cli.args capabilities. This scopes
the workaround to the PhantomJS process, the same approach as
RANGER-4791, and fixes local builds on any OpenSSL 3 distro as well as
CI. Windows keeps launching PhantomJS directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joseluisll
joseluisll force-pushed the HADOOP-19994-phantomjs-openssl3 branch from b2a3cb5 to 65b59cf Compare September 27, 2026 17:40
@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 19m 15s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 43m 10s trunk passed
+1 💚 compile 1m 7s trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 compile 1m 7s trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 mvnsite 1m 12s trunk passed
+1 💚 javadoc 0m 57s trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 javadoc 0m 52s trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 shadedclient 77m 47s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 78m 18s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 40s the patch passed
+1 💚 compile 0m 37s the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 javac 0m 37s the patch passed
+1 💚 compile 0m 36s the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 javac 0m 36s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 39s the patch passed
+1 💚 javadoc 0m 23s the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 javadoc 0m 22s the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 shadedclient 29m 41s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 57s hadoop-yarn-applications-catalog-webapp in the patch passed.
+1 💚 asflicense 0m 37s The patch does not generate ASF License warnings.
132m 8s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8757/2/artifact/out/Dockerfile
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 167c54d43608 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8545d5e
Default Java Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8757/2/testReport/
Max. process+thread count 768 (vs. ulimit of 10000)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8757/2/console
versions git=2.43.0 maven=3.9.15
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@slfan1989 slfan1989 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1.

This fixes the PhantomJS startup failure observed in precommit.

The existing Java and Jasmine tests pass with the patch.

Since this only changes the test launcher configuration, the existing Jasmine suite provides appropriate validation; additional unit tests are not necessary.

@joseluisll

Copy link
Copy Markdown
Contributor Author

@slfan1989 thanks for the review! Would you be able to merge this when you have a moment?

@slfan1989
slfan1989 merged commit c9c53f2 into apache:trunk Oct 6, 2026
3 of 5 checks passed
@slfan1989

Copy link
Copy Markdown
Contributor

@slfan1989 thanks for the review! Would you be able to merge this when you have a moment?

@joseluisll Thanks for the contribution! Merged into trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants