You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Syed Shameerur Rahman (Jira)" <ji...@apache.org> on 2020/02/04 12:18:00 UTC

[jira] [Updated] (TEZ-2229) bower ESUDO Cannot be run with sudo -- during build

     [ https://issues.apache.org/jira/browse/TEZ-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Syed Shameerur Rahman updated TEZ-2229:
---------------------------------------
    Attachment: TEZ-2229.01.patch

> bower ESUDO Cannot be run with sudo -- during build
> ---------------------------------------------------
>
>                 Key: TEZ-2229
>                 URL: https://issues.apache.org/jira/browse/TEZ-2229
>             Project: Apache Tez
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>         Environment: Linux x86_64 
>            Reporter: Fengdong Yu
>            Assignee: Sreenath Somarajapuram
>            Priority: Critical
>         Attachments: TEZ-2229.01.patch, TEZ-2229.1.patch, TEZ-2229.1.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I build Tez using root, I never install node/npm locally before my build.
> then there are exception messages during build tez-ui module. Maven debug logs:
> {code}
> [DEBUG] env: SSH_TTY=/dev/pts/0
> [DEBUG] env: TERM=xterm
> [DEBUG] env: USER=root
> [DEBUG] env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
> [DEBUG] Toolchains are ignored, 'executable' parameter is set to /root/temp/apache-tez-0.6.0-src/tez-ui/src/main/webapp/node/node
> [DEBUG] Executing command line: [/root/temp/apache-tez-0.6.0-src/tez-ui/src/main/webapp/node/node, node_modules/bower/bin/bower, install, --remove-unnecessary-resolutions=false]
> bower ESUDO         Cannot be run with sudo
> Additional error details:
> Since bower is a user command, there is no need to execute it with superuser permissions.
> If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
> http://www.joyent.com/blog/installing-node-and-npm
> https://gist.github.com/isaacs/579814
> You can however run a command with sudo using --allow-root option
> {code}
> {code}
> [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (Bower install) on project tez-ui: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [
> Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (Bower install) on project tez-ui: Command execution failed.
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
> 	at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:303)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> 	... 19 more
> Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
> 	at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:402)
> 	at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:164)
> 	at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:746)
> 	at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:292)
> 	... 21 more
> [ERROR] 
> [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/MojoExecutionException
> [ERROR] 
> [ERROR] After correcting the problems, you can resume the build with the command
> [ERROR]   mvn <goals> -rf :tez-ui
> {code}
> then I changed tez-ui/pom.xml, add  '--allow-root' argument:
>             <configuration>
>               <workingDirectory>${webappDir}</workingDirectory>
>               <executable>${node.executable}</executable>
>               <arguments>
>                 <argument>node_modules/bower/bin/bower</argument>
>                 <argument>install</argument>
>                 <argument>--remove-unnecessary-resolutions=false</argument>
>                 {color:red}<argument>--allow-root</argument>{color}
>               </arguments>
>             </configuration>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)