[JIRA] (JENKINS-58765) why jenkins launch the build/scriptShell always with root permission?

3 views
Skip to first unread message

remi_charles_lageix_arena@outlook.com (JIRA)

unread,
Aug 1, 2019, 10:24:02 AM8/1/19
to jenkinsc...@googlegroups.com
RemiCharles LageixArena created an issue
 
Jenkins / Bug JENKINS-58765
why jenkins launch the build/scriptShell always with root permission?
Issue Type: Bug Bug
Assignee: Unassigned
Components: _unsorted
Created: 2019-08-01 14:23
Environment: ubuntu 18.04
Jenkins 2.176.2
robotframework 3.0.2
robotframework-appiumlibrary 1.5.0.4
robotframework-jenkins 1.0.2
robotframework-ride 1.7.4b1.dev1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 3.3.1
Labels: jenkins
Priority: Critical Critical
Reporter: RemiCharles LageixArena

why jenkins launch the build/scriptShell always with root permission?

whit the following errors

WebDriverException: Message: invalid argument: can't kill an exited process

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)....

you can see the complet log at the end of this page

anyone know a fix?

thanks in advance

 

************************************************************

into Configure/build/scriptShell

#!/bin/bash
/usr/local/bin/robot /home/ar/eclipse-workspace/ProjectRobot1/test/TestSuite1.robot

but Jenkins run always this  script shell  with root permission.
and  the result is FAIL.

 

when I launch the same command  on CLI with my user permission the result is PASS
/usr/local/bin/robot /home/ar/eclipse-workspace/ProjectRobot1/test/TestSuite1.robot 

==============================================================================
TestSuite1
==============================================================================
MyFirstTest | PASS |
------------------------------------------------------------------------------
FirstSeleniumTest | PASS |
------------------------------------------------------------------------------
test1 ...Completed Successfuly with fireFox
...Completed Successfuly with Google/Chrome
test1 | PASS |
------------------------------------------------------------------------------
SampleLoginTest :: This is a sample login test | PASS |
------------------------------------------------------------------------------
The user can search for flights | PASS |
------------------------------------------------------------------------------
TestSuite1 | PASS |
5 critical tests, 5 passed, 0 failed
5 tests total, 5 passed, 0 failed
==============================================================================
Output: /home/ar/output.xml
Log: /home/ar/log.html
Report: /home/ar/report.html

************************************************************

this is the log when I launch the script by jenkins

 Démarré par l'utilisateur unknown or anonymous
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/Job_Launching_Robot_FrameWork_Tests
[Job_Launching_Robot_FrameWork_Tests] $ /bin/bash /tmp/jenkins5348072280975223222.sh
---------------------------------------------
HELLO WORLD
==============================================WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)================================

TestSuite1
==============================================================================
MyFirstTest | PASS |
------------------------------------------------------------------------------
FirstSeleniumTest [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:
AppiumLibrary.Capture Page Screenshot
SeleniumLibrary.Capture Page Screenshot
| FAIL |
WebDriverException: Message: invalid argument: can't kill an exited process
------------------------------------------------------------------------------
test1 [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:
AppiumLibrary.Capture Page Screenshot
SeleniumLibrary.Capture Page Screenshot
| FAIL |
WebDriverException: Message: invalid argument: can't kill an exited process
------------------------------------------------------------------------------
SampleLoginTest :: This is a sample login test [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:
AppiumLibrary.Capture Page Screenshot
SeleniumLibrary.Capture Page Screenshot
| FAIL |
WebDriverException: Message: unknown error: Chrome failWebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)ed to start: exited abnormally

(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
------------------------------------------------------------------------------
The user can search for flights [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:
AppiumLibrary.Capture Page Screenshot
SeleniumLibrary.Capture Page Screenshot
| FAIL |
WebDriverException: Message: invalid argument: can't kill an exited process
------------------------------------------------------------------------------
TestSuite1 | FAIL |
5 critical tests, 1 passed, 4 failed
5 tests total, 1 passed, 4 failed
==============================================================================
Output: /home/ar/eclipse-workspace/ProjectRobot1/test/output.xml
Log: /home/ar/eclipse-workspace/ProjectRobot1/test/log.html
Report: /home/ar/eclipse-workspace/ProjectRobot1/test/report.html
Build step 'Exécuter un script shell' marked build as failure
Robot results publisher started...
-Parsing output xml:
Done!
-Copying log files to build dir:
Done!
-Assigning results to build:
Done!
-Checking thresholds:
Done!
Done publishing Robot results.
Finished: FAILURE

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

remi_charles_lageix_arena@outlook.com (JIRA)

unread,
Aug 3, 2019, 4:55:03 AM8/3/19
to jenkinsc...@googlegroups.com
RemiCharles LageixArena updated an issue
Change By: RemiCharles LageixArena
why jenkins When I launch the build/scriptShell always robotframework-seleniumwebdriver all test are PASS.

idem when I launched
with root permission? CLI commande, tests are PAST.

But When I launched  same tests by Jenkins all tests that want to openbrowser (ff or chrome) arBut When I launched  same tests by Jenkins all tests that want to openbrowser (ff or chrome) are FAILe FAIL

whit the following errors

{color:#c1c7d0}WebDriverException: Message: invalid argument: can't kill an exited process{color}

{color:#c1c7d0}WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally

(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)....{color}

{color:#172b4d}you can see the complet log at the end of this page{color}


anyone know a fix?

thanks in advance

 

************************************************************

into Configure/build/scriptShell

{color:#c1c7d0}_#!/bin/bash_{color}
{color:#c1c7d0}_/usr/local/bin/robot /home/ar/eclipse-workspace/ProjectRobot1/test/TestSuite1.robot_{color}


but Jenkins run always this  script shell  with root permission.
and  the result is FAIL.

 

when I launch the same command  on CLI {color:#172b4d}with my user permission the result is PASS{color}
{color:#c1c7d0}_/usr/local/bin/robot /home/ar/eclipse-workspace/ProjectRobot1/test/TestSuite1.robot_  {color}

{color:#c1c7d0}==============================================================================

TestSuite1
==============================================================================
MyFirstTest | PASS |
------------------------------------------------------------------------------
FirstSeleniumTest | PASS |
------------------------------------------------------------------------------
test1 ...Completed Successfuly with fireFox
...Completed Successfuly with Google/Chrome
test1 | PASS |
------------------------------------------------------------------------------
SampleLoginTest :: This is a sample login test | PASS |
------------------------------------------------------------------------------
The user can search for flights | PASS |
------------------------------------------------------------------------------
TestSuite1 | PASS |
5 critical tests, 5 passed, 0 failed
5 tests total, 5 passed, 0 failed
==============================================================================
Output: /home/ar/output.xml
Log: /home/ar/log.html
Report: /home/ar/report.html{color}


************************************************************

this is the log when I launch the script by jenkins

{color:#c1c7d0} Démarré par l'utilisateur unknown or anonymous{color}
{color:#c1c7d0}Running as SYSTEM{color}
{color:#c1c7d0}Building in workspace /var/lib/jenkins/workspace/Job_Launching_Robot_FrameWork_Tests{color}
{color:#c1c7d0}[Job_Launching_Robot_FrameWork_Tests] $ /bin/bash /tmp/jenkins5348072280975223222.sh{color}
{color:#c1c7d0}---------------------------------------------{color}
{color:#c1c7d0}HELLO WORLD{color}
{color:#c1c7d0}==============================================WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally

(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)================================{color}
{color:#c1c7d0}TestSuite1 {color}
{color:#c1c7d0}=============================================================================={color}
{color:#c1c7d0}MyFirstTest | PASS |{color}
{color:#c1c7d0}------------------------------------------------------------------------------{color}
{color:#c1c7d0}FirstSeleniumTest [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:{color}
{color:#c1c7d0} AppiumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0} SeleniumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0}| FAIL |{color}
{color:#c1c7d0}WebDriverException: Message: invalid argument: can't kill an exited process{color}
{color:#c1c7d0}------------------------------------------------------------------------------{color}
{color:#c1c7d0}test1 [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:{color}
{color:#c1c7d0} AppiumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0} SeleniumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0}| FAIL |{color}
{color:#c1c7d0}WebDriverException: Message: invalid argument: can't kill an exited process{color}
{color:#c1c7d0}------------------------------------------------------------------------------{color}
{color:#c1c7d0}SampleLoginTest :: This is a sample login test [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:{color}
{color:#c1c7d0} AppiumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0} SeleniumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0}| FAIL |{color}
{color:#c1c7d0}WebDriverException: Message: unknown error: Chrome failWebDriverException: Message: unknown error: Chrome failed to start: exited abnormally

(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)ed to start: exited abnormally{color}
{color:#c1c7d0} (unknown error: DevToolsActivePort file doesn't exist){color}
{color:#c1c7d0} (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.){color}
{color:#c1c7d0}------------------------------------------------------------------------------{color}
{color:#c1c7d0}The user can search for flights [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: Multiple keywords with name 'Capture Page Screenshot' found. Give the full name of the keyword you want to use:{color}
{color:#c1c7d0} AppiumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0} SeleniumLibrary.Capture Page Screenshot{color}
{color:#c1c7d0}| FAIL |{color}
{color:#c1c7d0}WebDriverException: Message: invalid argument: can't kill an exited process{color}
{color:#c1c7d0}------------------------------------------------------------------------------{color}
{color:#c1c7d0}TestSuite1 | FAIL |{color}
{color:#c1c7d0}5 critical tests, 1 passed, 4 failed{color}
{color:#c1c7d0}5 tests total, 1 passed, 4 failed{color}
{color:#c1c7d0}=============================================================================={color}
{color:#c1c7d0}Output: /home/ar/eclipse-workspace/ProjectRobot1/test/output.xml{color}
{color:#c1c7d0}Log: /home/ar/eclipse-workspace/ProjectRobot1/test/log.html{color}
{color:#c1c7d0}Report: /home/ar/eclipse-workspace/ProjectRobot1/test/report.html{color}
{color:#c1c7d0}Build step 'Exécuter un script shell' marked build as failure{color}
{color:#c1c7d0}Robot results publisher started...{color}
{color:#c1c7d0}-Parsing output xml:{color}
{color:#c1c7d0}Done!{color}
{color:#c1c7d0}-Copying log files to build dir:{color}
{color:#c1c7d0}Done!{color}
{color:#c1c7d0}-Assigning results to build:{color}
{color:#c1c7d0}Done!{color}
{color:#c1c7d0}-Checking thresholds:{color}
{color:#c1c7d0}Done!{color}
{color:#c1c7d0}Done publishing Robot results.{color}
{color:#c1c7d0}Finished: FAILURE{color}

 
Reply all
Reply to author
Forward
0 new messages