Plugin Not Building on Agent


#1

Hello,

I am trying to use the katalon plugin in jenkins. But every time I run a build I get errors. These error seem like katalon is trying to build itself on the master server, not on the designated build agent.

Started by user Jason Grammenos
Building remotely on node-Swarm-10.4.10.142 (all agent swarm linux) in workspace
/etc/jenkins/swarmclient/workspace/TestingJob
[WS-CLEANUP] Deleting project workspace…
[WS-CLEANUP] Deferred wipeout is used…
[WS-CLEANUP] Done
using credential 28be2fda-e5c8-447a-9bcf-e769ec98b993
Cloning the remote Git repository
Cloning repository https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git
git init /etc/jenkins/swarmclient/workspace/TestingJob # timeout=10
Fetching upstream changes from https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git
git --version # timeout=10
using GIT_SSH to set credentials Gitremotepush key
git fetch --tags --progress https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git +refs/heads/:refs/remotes/origin/
git config remote.origin.url https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git # timeout=10
git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
git config remote.origin.url https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git # timeout=10
Fetching upstream changes from https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git
using GIT_SSH to set credentials Gitremotepush key
git fetch --tags --progress https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests.git +refs/heads/:refs/remotes/origin/
git rev-parse refs/remotes/origin/master^{commit} # timeout=10
git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision d41e3f6b9422b480e8c622af98b8d8b27ccb0a4d (refs/remotes/origin/master)
git config core.sparsecheckout # timeout=10
git checkout -f d41e3f6b9422b480e8c622af98b8d8b27ccb0a4d
Commit message: “Add BDD test”
git rev-list --no-walk d41e3f6b9422b480e8c622af98b8d8b27ccb0a4d # timeout=10
Using Katalon Studio at /etc/katalon/Katalon_Studio_Linux_64-5.10.1/
Making driver executables…
Drivers folder at: /etc/katalon/Katalon_Studio_Linux_64-5.10.1/configuration/resources/drivers
java.nio.file.NoSuchFileException: /etc/katalon/Katalon_Studio_Linux_64-5.10.1/configuration/resources/drivers
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.nio.file.FileTreeIterator.(FileTreeIterator.java:72)
at java.nio.file.Files.walk(Files.java:3574)
at java.nio.file.Files.walk(Files.java:3625)
at com.katalon.utils.KatalonUtils.makeDriversExecutable(KatalonUtils.java:129)
at com.katalon.utils.KatalonUtils.executeKatalon(KatalonUtils.java:100)
at com.katalon.jenkins.plugin.ExecuteKatalonStudioTask.perform(ExecuteKatalonStudioTask.java:108)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1816)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step ‘Execute Katalon Studio Tests’ marked build as failure
Finished: FAILURE

The file is there on the agent but it seems to be trying find it on master, not on the build agent.

root@ca04vljenkinsslave02:/etc/katalon/Katalon_Studio_Linux_64->5.10.1/configuration/resources/drivers/chromedriver_linux64# ll
total 8376
drwxr-xr-x 2 root root 4096 Jan 1 21:54 ./
drwxr-xr-x 4 root root 4096 Jan 1 21:54 …/
->rwxrwxrwx 1 root root 8565384 Jan 1 21:54 chromedriver*

Does anyone have any advice or potential fixes?


#2

Could you please share the configuration? Did Jenkins have permissions to open /etc/katalon/Katalon_Studio_Linux_64-5.10.1/configuration/resources/drivers? This part is always executed by Katalon Studio, therefore Katalon Studio should be available on your nodes already.


#3

/etc/katalon/Katalon_Studio_Linux_64-5.10.1/configuration/resources/drivers is owned by root which on the slave/agent nodes is the user that is running the agent. Katalon was manually downloaded and extracted on the two slaves. and I can run it manually via ssh. Also if i add a Execute Shell step and paste in the katalon command

cd /tmp
xvfb-run -a -n 0 -s "-screen 0 1024x768x24" /etc/katalon/Katalon_Studio_Linux_64-5.10.1/katalon -noSplash  -runMode=console  -projectPath="/etc/jenkins/swarmclient/workspace/TestingJob" -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/Regression Tests/Regression Tests"

This also runs fine.
So it only fails when using the plugin, Which cannot find the path to the drivers, even though they exist on the build agents.

Further test show that if i create the path
/etc/katalon/Katalon_Studio_Linux_64-5.10.1/configuration/resources/drivers

on the Jenkins master node, and place a dummy empty file named chromedriver with execute permissionsm the build will continue passed this error.
So the plugin is clearly trying to find the drives on the jenkins master node not on the slave where it should be building.

Attaching the Katalon plugin configuration


#4

I hope i have provided enough detail in my reply for you to investigate further. If not please let me know what other details you need.


#5

Thank you for the very detailed description. We’ve fixed this issue and will release a new version next week.


#6

Please update the plugin to 1.0.11 and try again.


#7

Thank you for the swift response. The new version of the plugin has resolved the issue