I have a local selenium grid setup that works fine on my mac and windows connected to the same network.
When i try to use an ec2 instance in this setup, then the grid isnt able to create the driver.
I am using a single ec2 instance, i.e. running the Hub and Node on it and using jenkins on that instance, i am running my test.
Now when i dont use a grid and run the test locally on ec2 instance, it works fine (i.e. use firefox driver instead of remotewebdriver)
Here is my code for driver creation
DesiredCapabilities capabilities = new DesiredCapabilities();
System.setProperty("webdriver.gecko.driver", "/usr/local/bin/geckodriver-linux");
String url = "http://15.206.186.53:5555/wd/hub";
FirefoxOptions options = new FirefoxOptions();
options.setHeadless(true);
capabilities.setCapability("browserName", "firefox");
capabilities.setCapability("marionette", true);
capabilities.setVersion("81");
capabilities.setCapability("firefoxdriverExecutable", "/usr/local/bin/geckodriver-linux");
options.merge(capabilities);
System.out.println(options.toJson());
driver = new RemoteWebDriver(new URL(url),options);
I am creating the server on ec2 using the command
java -jar selenium-server.jar -role hub&
My Ec2 instance is an ubuntu 18.0.4 t2.micro. I installed nginx server also and redirected the port to use the public ip
server {
listen 5554;
location / {
proxy_pass http://15.206.186.53:5554;
}
}
The error i get is
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'ip-172-31-15-4', ip: '172.31.15.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.3.0-1034-aws', java.version: '11.0.8'
Driver info: driver.version: unknown
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'ip-172-31-15-4', ip: '172.31.15.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.3.0-1034-aws', java.version: '11.0.8'
Driver info: driver.version: unknown```
Am i missing anything ?