Plugin Not Building on Agent

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?

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.

/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

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.

1 Like

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

Please update the plugin to 1.0.11 and try again.

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

Hi @devalex88 ,

We are still running into the same issue with the latest plugin-1.0.11v
(Jenkins version used : [Jenkins ver. 2.176.3]
Master and slave are both windows machines.

Please see the error log below:

Using Katalon Studio at D:\Katalon_Studio_Windows_64_6.3.3
Making driver executables…
Drivers folder at: D:\Katalon_Studio_Windows_64_6.3.3\configuration\resources\drivers
java.nio.file.NoSuchFileException: D:\Katalon_Studio_Windows_64_6.3.3\configuration\resources\drivers
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
at java.nio.file.Files.readAttributes(Unknown Source)
at java.nio.file.FileTreeWalker.getAttributes(Unknown Source)
at java.nio.file.FileTreeWalker.visit(Unknown Source)
at java.nio.file.FileTreeWalker.walk(Unknown Source)
at java.nio.file.FileTreeIterator.(Unknown Source)
at java.nio.file.Files.walk(Unknown Source)
at java.nio.file.Files.walk(Unknown Source)
at com.katalon.utils.KatalonUtils.makeDriversExecutable(KatalonUtils.java:133)
at com.katalon.utils.KatalonUtils.executeKatalon(KatalonUtils.java:104)
at com.katalon.jenkins.plugin.ExecuteKatalonStudioUtils$1.call(ExecuteKatalonStudioUtils.java:52)
at com.katalon.jenkins.plugin.ExecuteKatalonStudioUtils$1.call(ExecuteKatalonStudioUtils.java:34)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:94)
at java.lang.Thread.run(Unknown Source)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from AMPTMPTTLMPT08.au.amp.local/10.161.173.115:49207
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:389)
at hudson.remoting.Channel.call(Channel.java:957)
at com.katalon.jenkins.plugin.ExecuteKatalonStudioUtils.executeKatalon(ExecuteKatalonStudioUtils.java:34)
at com.katalon.jenkins.plugin.ExecuteKatalonStudioTask.perform(ExecuteKatalonStudioTask.java:97)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
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:1818)
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

Build details:

1 Like

Am also facing the above issue, please let me know if this issue is already resolved to you.
Thanks

@basavajyothi.am

You need to allow Jenkins to access D:\Katalon_Studio_Engine_Windows_64-7.5.5 folder or move Katalon Runtime Engine folder to Jenkins workspace.