Connection Emulator terminates Jenkins agent process
2 posts · Closed
Hi,
I'm having an issue while using Connection Emulator where it just terminates the Jenkins agent process as explained below:
Scenario 1: I have a Jenkins agent set up on a Windows 2012 machine where Connection Emulator is installed. I run a Python script through a Jenkins pipeline to set the latency and open Connection Emulator using subprocess.Popen(["schtasks","/Run","/TN","StartNetworkEmulator"]), which opens the emulator from Windows Task Scheduler as a last step.
Once Connection Emulator is opened, it interferes with the Jenkins agent process / port and terminates the Jenkins agent and master communication. I have to close the emulator and restart the Jenkins agent Windows service to make the agent communicate with the Jenkins master.
Scenario 2: There are no Jenkins jobs or pipelines running. The Jenkins agent is active and connected to the Master.
When I open and run Connection Emulator manually by going to C:\Program Files, the Jenkins agent and master communication is broken.
This is blocking the automation work for me in the new Jenkins setup. Can you please guide me on a possible fix?
Thanks,
Chethan
I am not familiar with Jenkins, but it sounds like some of the parameters you set also affect Jenkins' own connection. Let's say if you have enabled packet loss and high latency, it will apply to every connection from and to the machine where the emulator is installed.
Perhaps try setting up a filter in the emulator, so that it only affects the tested application(s) rather than every connection?