My team just set up a new jenkins server on an aws box we have. I'm setting up automation using zalenium. Everything was going well until this week when i started to receive a couple errors. Zalenium is set up on the same box jenkins is on. When jenkins tries to connects it can open a browser but doesnt load the page. When i try to run it from my laptop it gives me this error: too many redirects (Selenium::WebDriver::Error::WebDriverError). If i run zalenium on my laptop instead then i can run everything fine. I've tried pulling a fresh image of zalenium but it still doesnt work.
Here's the ruby code for calling the browser
options = {}
options[:options]={}
# This is for local changes
# options[:url] = 'http://localhost:4444/wd/hub'
options[:url] = HUB_URL
options[:options][:args] = %w[--test-type]
options[:switches] = ["disable-infobars", "no-sandbox"]
browser = Watir::Browser.new :chrome, options
Here's my docker commands
docker pull dosel/zalenium
docker run -d --rm --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start --desiredContainers 4
I've also tried changing the desiredContainers to 1. This was working last week but i can't figure out why it is failing now.