[jira] [Comment Edited] (RANGER-4562) Build fails in security-admin test while installing npm

2023-11-27 Thread Pradeep Agrawal (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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] > phantomjs-prebuilt@2.1.16 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 security-admin@2.0.0 No description
[INFO] npm WARN security-admin@2.0.0 No repository field.
[INFO] npm WARN security-admin@2.0.0 No license field.
[INFO] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 
(node_modules/fsevents):
[INFO] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"linux","arch":"x64"})
[INFO] 
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 1
[INFO] npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
[INFO] npm ERR! Exit status 1
[INFO] npm ERR! 
[INFO] npm ERR! Failed at the phantomjs-prebuilt@2.1.16 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 

[jira] [Comment Edited] (RANGER-4562) Build fails in security-admin test while installing npm

2023-11-27 Thread Pradeep Agrawal (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17790183#comment-17790183
 ] 

Pradeep Agrawal edited comment on RANGER-4562 at 11/27/23 5:14 PM:
---

[~madhan] 

Can you try with version 
[1.11.3|https://mvnrepository.com/artifact/com.github.eirslett/frontend-maven-plugin/1.11.3]
 here in security-admin/pom.xml file

[https://github.com/apache/ranger/blob/master/security-admin/pom.xml#L1043]

 


was (Author: pradeep.agrawal):
[~madhan] 

Can you try with version 1.11.3 here in security-admin/pom.xml file

[https://github.com/apache/ranger/blob/master/security-admin/pom.xml#L1043]

 

> 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] > phantomjs-prebuilt@2.1.16 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 security-admin@2.0.0 No description
> ranger-build| [INFO] npm WARN security-admin@2.0.0 No repository field.
> ranger-build| [INFO] npm WARN security-admin@2.0.0 No license field.
> ranger-build| [INFO] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 
> fsevents@1.2.4 (node_modules/fsevents):
> ranger-build| [INFO] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: 
> Unsupported platform for fsevents@1.2.4: 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! phantomjs-prebuilt@2.1.16 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 phantomjs-prebuilt@2.1.16 
> 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)