[
https://issues.apache.org/jira/browse/RANGER-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17790402#comment-17790402
]
Pradeep Agrawal edited comment on RANGER-4562 at 11/28/23 7:29 AM:
-------------------------------------------------------------------
Without docker case :
1. I tried "mvn clean install" command on a fresh jdk11 cluster and i was able
to reproduce the issue with following error
{code:java}
[INFO] --- frontend-maven-plugin:1.12.1:npm (npm install for tests) @
security-admin-web ---
[INFO] Running 'npm install' in /root/ranger/security-admin/target/jstest
[INFO]
[INFO] > [email protected] install
/root/ranger/security-admin/target/jstest/node_modules/phantomjs-prebuilt
[INFO] > node install.js
[INFO]
[INFO] PhantomJS not found on PATH
[INFO] Download already available at
/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
[INFO] Verified checksum of previously downloaded file
[INFO] Extracting tar contents (via spawned process)
[INFO] Error extracting archive
[INFO] Phantom installation failed { Error: Command failed: tar jxf
/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
[INFO] tar (child): bzip2: Cannot exec: No such file or directory
[INFO] tar (child): Error is not recoverable: exiting now
[INFO] tar: Child returned status 2
[INFO] tar: Error is not recoverable: exiting now
[INFO]
[INFO] at ChildProcess.exithandler (child_process.js:276:12)
[INFO] at emitTwo (events.js:126:13)
[INFO] at ChildProcess.emit (events.js:214:7)
[INFO] at maybeClose (internal/child_process.js:915:16)
[INFO] at Socket.stream.socket.on (internal/child_process.js:336:11)
[INFO] at emitOne (events.js:116:13)
[INFO] at Socket.emit (events.js:211:7)
[INFO] at Pipe._handle.close [as _onclose] (net.js:561:12)
[INFO] killed: false,
[INFO] code: 2,
[INFO] signal: null,
[INFO] cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' }
Error: Command failed: tar jxf
/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
[INFO] tar (child): bzip2: Cannot exec: No such file or directory
[INFO] tar (child): Error is not recoverable: exiting now
[INFO] tar: Child returned status 2
[INFO] tar: Error is not recoverable: exiting now
[INFO]
[INFO] at ChildProcess.exithandler (child_process.js:276:12)
[INFO] at emitTwo (events.js:126:13)
[INFO] at ChildProcess.emit (events.js:214:7)
[INFO] at maybeClose (internal/child_process.js:915:16)
[INFO] at Socket.stream.socket.on (internal/child_process.js:336:11)
[INFO] at emitOne (events.js:116:13)
[INFO] at Socket.emit (events.js:211:7)
[INFO] at Pipe._handle.close [as _onclose] (net.js:561:12)
[INFO] npm WARN [email protected] No description
[INFO] npm WARN [email protected] No repository field.
[INFO] npm WARN [email protected] No license field.
[INFO] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
(node_modules/fsevents):
[INFO] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
[email protected]: wanted {"os":"darwin","arch":"any"} (current:
{"os":"linux","arch":"x64"})
[INFO]
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 1
[INFO] npm ERR! [email protected] install: `node install.js`
[INFO] npm ERR! Exit status 1
[INFO] npm ERR!
[INFO] npm ERR! Failed at the [email protected] install script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! /root/.npm/_logs/2023-11-28T07_05_28_779Z-debug.log {code}
2. After understanding above error i installed bzip2 by executing the
[command|https://github.com/apache/ranger/blob/master/build_ranger_using_docker.sh#L69]
3. Executed "mvn clean install" again and it succeeded.
{code:java}
[INFO] --- maven-site-plugin:3.7.1:attach-descriptor (attach-descriptor) @
security-admin-web ---
[INFO] Skipping because packaging 'war' is not pom.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.7:report (jacoco-site) @ security-admin-web
---
[INFO] Loading execution data file
/root/ranger/security-admin/target/jacoco.exec
[INFO] Analyzed bundle 'Security Admin Web Application' with 671 classes
[INFO]
[INFO] --- frontend-maven-plugin:1.12.1:karma (karma prd) @ security-admin-web
---
[INFO] Running 'karma start ../../src/test/javascript/karma-prd.conf.js' in
/root/ranger/security-admin/target/jstest
[INFO] 28 11 2023 06:32:51.840:INFO [karma-server]: Karma v3.1.4 server started
at http://0.0.0.0:9877/
[INFO] 28 11 2023 06:32:51.842:INFO [launcher]: Launching browsers PhantomJS
with concurrency unlimited
[INFO] 28 11 2023 06:32:51.863:INFO [launcher]: Starting browser PhantomJS
[INFO] 28 11 2023 06:32:51.951:ERROR [phantomjs.launcher]: Fontconfig warning:
ignoring UTF-8: not a valid region tag
[INFO]
[INFO] 28 11 2023 06:32:52.079:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected
on socket MuRdJUviuc4-IMkXAAAA with id 77739149
LOG: 'just before loading Main'
[INFO] PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 secs)
[INFO] 28 11 2023 06:32:52.293:WARN [web-server]: 404: /service/plugins/csrfconf
[INFO] 28 11 2023 06:32:52.301:WARN [web-server]: 404:
/service/users/profile?_=1701153172189
[INFO] 28 11 2023 06:32:52.327:WARN [web-server]: 404: /images/avatar.png
[INFO] 28 11 2023 06:32:52.329:WARN [web-server]: 404: /service/plugins/checksso
LOG: 'initialize a Communicator'
LOG: 'Initialize a Region Manager'
LOG: 'initialize a Controller Controller'
LOG: 'initialized a TopNav ItemView'
LOG: 'initialized a ProfileBar ItemView'
LOG: 'initialized a Footer ItemView'
LOG: 'Error in service/plugins/checksso REST call404'
LOG: 'initialized a ErrorView ItemView'
LOG: 'mainModule.success=false'
PhantomJS 2.1.1 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.14 secs /
0.133 secs)
[INFO] TOTAL: 1 SUCCESS
[INFO]
[INFO] >>> maven-pmd-plugin:3.14.0:check (default) > :pmd @ security-admin-web
>>> {code}
Note:
it seems PhantomJS install failed in your env. probably due to linux/arm64
while i am having linux/x64.
I found below text [in Phantomjs github
page|https://github.com/Medium/phantomjs#im-using-an-unsupported-version-of-linux-or-an-arm-processor-i-get-errors-about-unexpected-platform-or-architecture-what-do-i-do]
{code:java}
I'm using an unsupported version of Linux or an ARM processor. I get errors
about "Unexpected platform or architecture". What do I do?
We only have binaries available for common OS / processor configurations.
Sorry.You may be able to get a PhantomJS binary from your operating system's
package manager. Or you can build your own from source. If you put that binary
on PATH, this installer will use it (see "Deciding Where to Get PhantomJS"
above). {code}
was (Author: pradeep.agrawal):
Without docker case :
1. I tried "mvn clean install" command on a fresh jdk11 cluster and i was able
to reproduce the issue with following error
{code:java}
[INFO] --- frontend-maven-plugin:1.12.1:npm (npm install for tests) @
security-admin-web ---
[INFO] Running 'npm install' in /root/ranger/security-admin/target/jstest
[INFO]
[INFO] > [email protected] install
/root/ranger/security-admin/target/jstest/node_modules/phantomjs-prebuilt
[INFO] > node install.js
[INFO]
[INFO] PhantomJS not found on PATH
[INFO] Download already available at
/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
[INFO] Verified checksum of previously downloaded file
[INFO] Extracting tar contents (via spawned process)
[INFO] Error extracting archive
[INFO] Phantom installation failed { Error: Command failed: tar jxf
/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
[INFO] tar (child): bzip2: Cannot exec: No such file or directory
[INFO] tar (child): Error is not recoverable: exiting now
[INFO] tar: Child returned status 2
[INFO] tar: Error is not recoverable: exiting now
[INFO]
[INFO] at ChildProcess.exithandler (child_process.js:276:12)
[INFO] at emitTwo (events.js:126:13)
[INFO] at ChildProcess.emit (events.js:214:7)
[INFO] at maybeClose (internal/child_process.js:915:16)
[INFO] at Socket.stream.socket.on (internal/child_process.js:336:11)
[INFO] at emitOne (events.js:116:13)
[INFO] at Socket.emit (events.js:211:7)
[INFO] at Pipe._handle.close [as _onclose] (net.js:561:12)
[INFO] killed: false,
[INFO] code: 2,
[INFO] signal: null,
[INFO] cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' }
Error: Command failed: tar jxf
/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
[INFO] tar (child): bzip2: Cannot exec: No such file or directory
[INFO] tar (child): Error is not recoverable: exiting now
[INFO] tar: Child returned status 2
[INFO] tar: Error is not recoverable: exiting now
[INFO]
[INFO] at ChildProcess.exithandler (child_process.js:276:12)
[INFO] at emitTwo (events.js:126:13)
[INFO] at ChildProcess.emit (events.js:214:7)
[INFO] at maybeClose (internal/child_process.js:915:16)
[INFO] at Socket.stream.socket.on (internal/child_process.js:336:11)
[INFO] at emitOne (events.js:116:13)
[INFO] at Socket.emit (events.js:211:7)
[INFO] at Pipe._handle.close [as _onclose] (net.js:561:12)
[INFO] npm WARN [email protected] No description
[INFO] npm WARN [email protected] No repository field.
[INFO] npm WARN [email protected] No license field.
[INFO] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
(node_modules/fsevents):
[INFO] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
[email protected]: wanted {"os":"darwin","arch":"any"} (current:
{"os":"linux","arch":"x64"})
[INFO]
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 1
[INFO] npm ERR! [email protected] install: `node install.js`
[INFO] npm ERR! Exit status 1
[INFO] npm ERR!
[INFO] npm ERR! Failed at the [email protected] install script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! /root/.npm/_logs/2023-11-28T07_05_28_779Z-debug.log {code}
2. After understanding above error i installed bzip2 by executing the
[command|https://github.com/apache/ranger/blob/master/build_ranger_using_docker.sh#L69]
3. Executed "mvn clean install" again and it succeeded.
{code:java}
[INFO] --- maven-site-plugin:3.7.1:attach-descriptor (attach-descriptor) @
security-admin-web ---
[INFO] Skipping because packaging 'war' is not pom.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.7:report (jacoco-site) @ security-admin-web
---
[INFO] Loading execution data file
/root/ranger/security-admin/target/jacoco.exec
[INFO] Analyzed bundle 'Security Admin Web Application' with 671 classes
[INFO]
[INFO] --- frontend-maven-plugin:1.12.1:karma (karma prd) @ security-admin-web
---
[INFO] Running 'karma start ../../src/test/javascript/karma-prd.conf.js' in
/root/ranger/security-admin/target/jstest
[INFO] 28 11 2023 06:32:51.840:INFO [karma-server]: Karma v3.1.4 server started
at http://0.0.0.0:9877/
[INFO] 28 11 2023 06:32:51.842:INFO [launcher]: Launching browsers PhantomJS
with concurrency unlimited
[INFO] 28 11 2023 06:32:51.863:INFO [launcher]: Starting browser PhantomJS
[INFO] 28 11 2023 06:32:51.951:ERROR [phantomjs.launcher]: Fontconfig warning:
ignoring UTF-8: not a valid region tag
[INFO]
[INFO] 28 11 2023 06:32:52.079:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected
on socket MuRdJUviuc4-IMkXAAAA with id 77739149
LOG: 'just before loading Main'
[INFO] PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 secs)
[INFO] 28 11 2023 06:32:52.293:WARN [web-server]: 404: /service/plugins/csrfconf
[INFO] 28 11 2023 06:32:52.301:WARN [web-server]: 404:
/service/users/profile?_=1701153172189
[INFO] 28 11 2023 06:32:52.327:WARN [web-server]: 404: /images/avatar.png
[INFO] 28 11 2023 06:32:52.329:WARN [web-server]: 404: /service/plugins/checksso
LOG: 'initialize a Communicator'
LOG: 'Initialize a Region Manager'
LOG: 'initialize a Controller Controller'
LOG: 'initialized a TopNav ItemView'
LOG: 'initialized a ProfileBar ItemView'
LOG: 'initialized a Footer ItemView'
LOG: 'Error in service/plugins/checksso REST call404'
LOG: 'initialized a ErrorView ItemView'
LOG: 'mainModule.success=false'
PhantomJS 2.1.1 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.14 secs /
0.133 secs)
[INFO] TOTAL: 1 SUCCESS
[INFO]
[INFO] >>> maven-pmd-plugin:3.14.0:check (default) > :pmd @ security-admin-web
>>> {code}
it seems PhantomJS install failed in your env. probably due to linux/arm64
while i am having linux/x64.
I found below text [in Phantomjs github
page|https://github.com/Medium/phantomjs#im-using-an-unsupported-version-of-linux-or-an-arm-processor-i-get-errors-about-unexpected-platform-or-architecture-what-do-i-do]
{code:java}
I'm using an unsupported version of Linux or an ARM processor. I get errors
about "Unexpected platform or architecture". What do I do?
We only have binaries available for common OS / processor configurations.
Sorry.You may be able to get a PhantomJS binary from your operating system's
package manager. Or you can build your own from source. If you put that binary
on PATH, this installer will use it (see "Deciding Where to Get PhantomJS"
above). {code}
> Build fails in security-admin test while installing npm
> -------------------------------------------------------
>
> Key: RANGER-4562
> URL: https://issues.apache.org/jira/browse/RANGER-4562
> Project: Ranger
> Issue Type: Bug
> Components: admin
> Reporter: Madhan Neethiraj
> Assignee: Pradeep Agrawal
> Priority: Major
>
> Build using {{mvn -Pranger-jdk11 -DskipTests=false clean compile package}}
> fails in security-admin module while installing npm:
>
> {noformat}
> ranger-build | [INFO]
> ranger-build | [INFO] --- frontend-maven-plugin:1.12.1:npm (npm install
> for tests) @ security-admin-web ---
> ranger-build | [INFO] Running 'npm install' in
> /home/ranger/src/security-admin/target/jstest
> ranger-build | [INFO]
> ranger-build | [INFO] > [email protected] install
> /home/ranger/src/security-admin/target/jstest/node_modules/phantomjs-prebuilt
> ranger-build | [INFO] > node install.js
> ranger-build | [INFO]
> ranger-build | [INFO] PhantomJS not found on PATH
> ranger-build | [INFO] Downloading
> https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
> ranger-build | [INFO] Saving to
> /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
> ranger-build | [INFO] Receiving...
> ranger-build | [INFO]
> ranger-build | [INFO] Error making request.
> ranger-build | [INFO] Error: connect ETIMEDOUT 185.199.108.133:443
> ranger-build | [INFO] at TCPConnectWrap.afterConnect [as oncomplete]
> (net.js:1191:14)
> ranger-build | [INFO]
> ranger-build | [INFO] Please report this full log at
> https://github.com/Medium/phantomjs
> ranger-build | [INFO] npm WARN [email protected] No description
> ranger-build | [INFO] npm WARN [email protected] No repository field.
> ranger-build | [INFO] npm WARN [email protected] No license field.
> ranger-build | [INFO] npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
> [email protected] (node_modules/fsevents):
> ranger-build | [INFO] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
> Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"}
> (current: {"os":"linux","arch":"x64"})
> ranger-build | [INFO]
> ranger-build | [INFO] npm ERR! code ELIFECYCLE
> ranger-build | [INFO] npm ERR! errno 1
> ranger-build | [INFO] npm ERR! [email protected] install: `node
> install.js`
> ranger-build | [INFO] npm ERR! Exit status 1
> ranger-build | [INFO] npm ERR!
> ranger-build | [INFO] npm ERR! Failed at the [email protected]
> install script.
> ranger-build | [INFO] npm ERR! This is probably not a problem with npm.
> There is likely additional logging output above.
> ranger-build | [INFO]
> ranger-build | [INFO] npm ERR! A complete log of this run can be found in:
> ranger-build | [INFO] npm ERR!
> /home/ranger/.npm/_logs/2023-11-25T19_25_13_719Z-debug.log
> ranger-build | [INFO]
> ------------------------------------------------------------------------
> {noformat}
> [~mugdha.varadkar], [~ankita], [~pradeep], [~mehul] - can you please help
> resolve this issue?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)