Hello, I am currently attempting to develop a jenkins pipeline that runs our Katalon test suites. I have hit a wall and cannot get past this after days of trial and nothing but error.
The error is:
/root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2@tmp/durable-8992c595/script.sh: ./katalonc: Exec format error
and it returns this at the bottom of the console:
ERROR: script returned exit code 126
Finished: FAILURE
Just before the erroring line I run:
sh "sudo chmod -R 777 '${WORKSPACE}'"
WORKSPACE being the path to the Jenkins workspace being used. From my understanding this should give permissions to everything inside so I do not understand the 126 error. I have also tried this with the KRE folder and my test suite folder individually to the same effect.
I have tried hundreds of combinations of double and single quotes as well as other arguments and it won’t give any different errors except “Permission Denied” when the above Sudo chmod command isn’t run.
Is Katalon_KRE directory is located inside the ${WORKSPACE} ?
Yes it is. The full path is: /root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2/Katalon_KRE/Katalon_Studio_Engine_Linux_64-8.5.5
WORKSPACE is: /root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2
It is worth mentioning that I have tried the cd with and without WORKSPACE prefixed and both result in the same error. I also do encounter a ‘No such file or directory’ error if I purposefully make the path wrong.
ls command of Katalon_Integration_Test-2 which is the base folder everything is cloned into:
+ ls
.git
.github
.gitignore
Dockerfile
Katalon_KRE
README.md
api-test-config
bhyve-ha-framework
bootstrap
custom
jenkins
jenkins-refactor
jira-key-test
katalon
kvm-cluster-framework
kvm-templates
release-automation
reports-automation
security
smb.conf
[Pipeline] sh
+ pwd
/root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2
[Pipeline] sh
+ cd katalon
+ ls
.git
.gitignore
.project
Data Files
Include
Keywords
Object Repository
Profiles
Scripts
Test Cases
Test Suites
console.properties
iXKatalon.prj
readme.md
settings
+ pwd
/root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2/katalon
Here is the same for the KRE:
[Pipeline] sh
+ cd /root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2/Katalon_KRE/Katalon_Studio_Engine_Linux_64-8.5.5
+ ls
artifacts.xml
configuration
features
icon.xpm
jre
katalonc
katalonc.ini
p2
plugins
+ pwd
/root/jenkins/workspace/SCALE/Bluefin/Katalon_Integration_Test-2/Katalon_KRE/Katalon_Studio_Engine_Linux_64-8.5.5
I have discovered it is likely because the system the pipeline is being run off of is running FreeBSD. We are in the process of getting one that runs Ubuntu. According to one of my friends who has done Jenkins work for years, this will probably fix it.
The server (node) that the job was executing on was a FreeBSD system. We got a new server that is running Debian 11 to host our VMs. We use a VM on said server running on Debian 11 as a Jenkins node that contains the KRE and executes the tests. I am not sure what the exact issue is but from one of my friends who has been using Jenkins and Unix OS’s for a long time, it is something to do with how FreeBSD handles bash.
personally i am using katalon studio (ui part) on fedora and it is working fine.
so, chances are, on certain Centos releases may work fine also.
Note that I am not using KRE as i don’t have a licence for it, but you cand consider it for your pipelines, depending on your company policies
so you have some room to play in the Linux family.
BSD is a different animal, starting from the kernel.
I don’t have anymore the patience to play with, could be fun but can lead to darksides. so i am avoiding it for now (i have played with such in the past but those days i don’t have a strong use case for it)