Jenkins Build Is Hanging Jenkins Build Is Hanging jenkins jenkins

Jenkins Build Is Hanging


In my case, I found that the batch script I was kicking off from Jenkins was the problem.

I'm using Katalon Studio to run a suite of test cases and found that the '-consoleLog' flag was causing the job to hang. Once I'd removed the flag I could see the test case was able to print to the Jenkins console output.

Example with:

katalon -noSplash -runMode=console -consoleLog-projectPath="%USERPROFILE%\repository\katalon-testing\test-project\test-project-one.prj" -retry=0 -testSuitePath="Test Suites/test-project/test-project-one" -executionProfile="uat" -browserType="Chrome"

Example without:

katalon -noSplash -runMode=console -projectPath="%USERPROFILE%\repository\katalon-testing\test-project\test-project-one.prj" -retry=0 -testSuitePath="Test Suites/test-project/test-project-one" -executionProfile="uat" -browserType="Chrome"

Before solving the issue, I was confused as my tests were passing on the server it was just that Jenkins wasn't able to see them passing so it would hang.

I assume that when Jenkins sees the output in the console it is able to stop the job as intended.


From my experience one of the reasons why Jenkins build got stuck, is that you call from your job to another one and don't provide it with all of it's parameters, or one of you steps make it stuck.

My advice it go with the elimination strategy. Try to execute a simple test job, if it passed good we know that the problem is with your job. If not we probebly dealing with some infrastructure issue. If you got into conclusion that your problem is with your job try to run each step apart and try to figure what which one get you stuck. Then add some logging to it so you can point more accurately on the problem. When you get more details let me know, and I will try to assist as much as I can.