I am trying to launch my serenity-Cucumber tests on a Jenkins server. Actually I'm stuck with a simple error when it launch ChromeDriver :
"IPv4 port not available. Exiting..."
My failed tests are simple : goes to a special url and verify if the url is the one expected
I'm running on maven 1.9.9 - cucumber 1.9.5 - serenity 1.9.9 - chromedriver 2.40 - jenkins 2.19.1
I run my project with command "clean verify"
I tried to set a proxy but it didn t change anything - and I tried to change chromeDriver's port without results
Is there someone who has already face this problem ?
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 4013
Only local connections are allowed.
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 9015
Only local connections are allowed.
IPv4 port not available. Exiting...
Related
While running simple selenium test in google chrome, got below error. (Windows 10)
Starting ChromeDriver 75.0.3770.90 (a6dcaf7e3ec6f70a194cc25e8149475c6590####-refs/branch-heads/3770#{#XXXX}) on port XXXXX
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
I'm trying to setup selenium standalone chrome service to test my Codeception suit.
I run chrome standalone as a service:
services:
- mysql:latest
- selenium/standalone-chrome:latest
And then I setup the connections for my Codeception test uses WebDriver with an extension for WordPress:
WPWebDriver:
url: 'http://localhost'
host: 'selenium__standalone-chrome'
browser: chrome
port: 4444
restart: true
wait: 2
adminUsername: admin
adminPassword: 1234
adminUrl: /wp-admin
All other tests run well but when it comes to the suite where I use Selenium it refuses to connect:
Time: 7.55 seconds, Memory: 16.00MB
There was 1 failure:
---------
1) SampleTestCept: Test if wp is working in selenium
Test tests/php/acceptance/SampleTestCept.php
Step See "Just another WordPress site"
Fail Failed asserting that on page /
--> This site can’t be reached
localhost refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Reload
DETAILS
--> contains "this site can't be reached".
Scenario Steps:
2. $I->see("This site can't be reached") at tests/php/acceptance/SampleTestCept.php:6
1. $I->amOnPage("/") at tests/php/acceptance/SampleTestCept.php:4
Any ideas of what am I doing wrong?
Use environment variable HOSTNAME, to find gitlab runner actual hostname.
I worked around this by replacing 'localhost' in your webdriver config by the ip-address of the gitlab runner. You might want to check out my blog post about running codeception tests on gitlab-ci.
Probably the issue is that you are using http://localhost url and running selenium server on separate host.
Selenium tries to connect to port 80 of its own, not of the machine which is running tests.
While running my simple selenium automation script on chrome broswer, i am getting below mentioned error. The script runs fine on firefox browser. Mine is HTTPS website.
No connection could be made because the target machine actively
refused it. - connect(2) for "127.0.0.1" port 9515
(Errno::ECONNREFUSED)
IDE: Ruby Mine 7.1.4
Chrome Browser: 54.0.2840.71 m (64-bit)
Script:
require "selenium/webdriver"
driver = Selenium::WebDriver.for :chrome
driver.get('http://google.com')
I had same problem as yours after Windows Update last time.
I updated chromedriver.exe from v2.9 to v2.24 and put it on bin directory where ruby installed, then it's fixed.
I am trying to run to tomcat on linux where glassfish is already running on port 8080 ( you can check here - vhost2.cs.rit.edu:8080 . So i changed the tomcat port to 8181 by editing the server.xml file. NOw with the command startup.sh and i get the following output
Using CATALINA_BASE: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_HOME: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_TMPDIR: /home/krs8785/apache-tomcat-7.0.54/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/krs8785/apache-tomcat-7.0.54/bin/bootstrap.jar:/home/krs8785/apache-tomcat-7.0.54/bin/tomcat-juli.jar
Tomcat started.
I am assuming that tomcat is now working. Now when i test the server by - vhost3.cs.rit.edu:8181 I get
No data received on the browser.
What is the problem here and how do i solve it?
The problem may be unrelated to tomcat. I think your first step should be to exclude networking issues.
I have assumed you are accessing vhost3.cs.rit.edu:8181 from another machine. If that is the case, try to access localhost:8181 from vhost3.cs.rit.edu. If this is not possible in a conventional browser, perhaps because it is a headless server with X forwarding disabled then use a terminal based browser. Try typing the following in the terminal on vhost3.cs.rit.edu
lynx localhost:8181
If you are able to see a representation of a tomcat splash page then you can attribute it to networking issues. This could be firewall related (perhaps even an issue with iptables on linux).
I'm working on Selenium and I currently have a hub connected to two vms running linux with all the browsers.
I was able to launch browsers until suddenly it just stopped . Firefox or any of the other browsers don't launch. I get the following error.
Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.
I am running Selenium-server-standalone 2.26 with firefox 16.0.2 .
Please help.
Try running this before you start your Selenium server:
export DISPLAY=:0