You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Jenkins and nodes are setup in AWS as EC2 instances. Jenkins host lives in the same VPC as the nodes although they live in separate subnets. The way the security groups are configured is that nodes connect to a load balancer listening on http://custom.url:4444 which then forwards traffic to the Jenkins host. The Jenkins host is allowed to do health checks on the node using their internal IP on port 4444. Additionally, an entry to /etc/hosts file had to be added on Jenkins master so that nodes are able to register to this custom URL.
0.0.0.0 custom.url
Using this configuration, I'm able to successfully register nodes as reported both on UI and from logs. However, when I try to submit a selenium job to the grid, I get the above errors. Happens on both Chrome and Firefox browsers.
I point the tests to the custom URL in my Jenkinsfile as pybot --variable LOCALHOST:http://custom.url:4444/wd/hub src/.
Relevant logs from log.html:
FAIL No browser is open
DEBUG Traceback (most recent call last):
File "<decorator-gen-147>", line 2, in capture_page_screenshot
File "/usr/local/lib/python2.7/site-packages/Selenium2Library/keywords/keywordgroup.py", line 15, in _run_on_failure_decorator
return method(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/Selenium2Library/keywords/_screenshot.py", line 90, in capture_page_screenshot
if hasattr(self._current_browser(), 'get_screenshot_as_file'):
File "/usr/local/lib/python2.7/site-packages/Selenium2Library/keywords/_browsermanagement.py", line 516, in _current_browser
raise RuntimeError('No browser is open')
INFO Opening browser 'firefox' to base url 'https://<redacted>' through remote server at 'http://custom.url:4444/wd/hub'
INFO Could not connect to port 4444 on host custom.url
INFO Could not get IP address for host: custom.url
Environment:
hub: Ubuntu
nodes: Windows
packages installed on the nodes:
it looks like the following issue SeleniumHQ/selenium#2913
where like an assumption:
"Most likely you have changed your /etc/hosts file to a domain or something else from the default 'localhost'."
I've made some changes in the infrastructure by bypassing traffic to the load balancer all together. Now, the nodes are able to connect with the hub and vice-versa on port 4444. To test if that works, I ran curl from one of the nodes which is successful.
+ curl -I http://<redacted>:4444
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
HTTP/1.1 200 OK
Date: Tue, 02 Oct 2018 10:45:35 GMT
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Server: Jetty(9.4.7.v20170914)
Now to make the setup cleaner, I made a DNS record to point custom.url directly to the hub's private IP. Re-checked with curl.
+ curl -I http://custom.url:4444
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
HTTP/1.1 200 OK
Date: Tue, 02 Oct 2018 10:45:35 GMT
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Server: Jetty(9.4.7.v20170914)
I then updated the Selenium Plugin settings to accept node registration from custom.url and my job to point LOCALHOST to http://custom.url:4444 which again regenerated the issue.
My Jenkins and nodes are setup in AWS as EC2 instances. Jenkins host lives in the same VPC as the nodes although they live in separate subnets. The way the security groups are configured is that nodes connect to a load balancer listening on
http://custom.url:4444
which then forwards traffic to the Jenkins host. The Jenkins host is allowed to do health checks on the node using their internal IP on port 4444. Additionally, an entry to/etc/hosts
file had to be added on Jenkins master so that nodes are able to register to this custom URL.0.0.0.0 custom.url
Using this configuration, I'm able to successfully register nodes as reported both on UI and from logs. However, when I try to submit a selenium job to the grid, I get the above errors. Happens on both Chrome and Firefox browsers.
I point the tests to the custom URL in my Jenkinsfile as
pybot --variable LOCALHOST:http://custom.url:4444/wd/hub src/
.Relevant logs from
log.html
:Environment:
hub: Ubuntu
nodes: Windows
packages installed on the nodes:
The text was updated successfully, but these errors were encountered: