Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firefox cannot connect #2

Open
kullervo16 opened this issue Jan 27, 2017 · 3 comments
Open

firefox cannot connect #2

kullervo16 opened this issue Jan 27, 2017 · 3 comments

Comments

@kullervo16
Copy link

When I use your templates in OSE 3.1 and selenium 2.53.1 encounter some problems with the node-firefox image. It needs to have access to /opt/selenium, if I relax that condition it starts up fine, registers itself in the grid but I get this error:

07:33:07.092 INFO - Launching a Selenium Grid node
2	07:33:07.795 INFO - Java: Oracle Corporation 25.91-b14
3	07:33:07.796 INFO - OS: Linux 3.10.0-514.2.2.el7.x86_64 amd64
4	07:33:07.799 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
5	07:33:07.871 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
6	registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
7	07:33:07.871 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
8	registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
9	07:33:07.871 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10	07:33:07.871 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11	07:33:07.872 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
12	registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
13	07:33:07.872 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
14	07:33:07.873 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
15	07:33:07.948 INFO - Selenium Grid node is up and ready to register to the hub
16	07:33:07.993 INFO - Starting auto registration thread. Will try to register every 5000 ms.
17	07:33:07.993 INFO - Registering the node to the hub: http://172.30.218.173:4444/grid/register
18	07:33:08.011 INFO - The node is registered to the hub and ready to use
19	07:34:13.609 INFO - Executing: [new session: Capabilities [{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@2fad6c7, browserName=firefox, version=, platform=ANY}]])
20	07:34:13.628 INFO - Creating a new session for Capabilities [{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@2fad6c7, browserName=firefox, version=, platform=ANY}]
21	org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
22	
23		at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:112)
24		at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
25		at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
26		at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
27		at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
28		at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:129)
29		at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
30		at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
31		at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
32		at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
33		at org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:91)
34		at org.openqa.selenium.remote.server.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:68)
35		at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
36		at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
37		at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
38		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
39		at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
40		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
41		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
42		at java.lang.Thread.run(Thread.java:745)
43	07:34:59.078 WARN - Exception thrown
44	java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
45	Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
46	System info: host: 'selenium-node-firefox-hmxuq', ip: '10.127.26.113', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.2.2.el7.x86_64', java.version: '1.8.0_91'
47	Driver info: driver.version: unknown

I have the same error when I use a standalone image from either selenium, some other people or when I package my working VM config... Is there anything special on openshift? Does this container need to be priviledged?

Any suggestions are more than welcome... been fighting this thing for a week now, starts working on my system :-)

@ddavison
Copy link
Owner

ddavison commented Jan 27, 2017

hey @kullervo16 !

actually, i'm the maintainer of the selenium docker images and i can tell you, that we are way past 2.53.1. maybe give Selenium 3 a shot, and use the image version: 3 for node-firefox, and hub?

@kullervo16
Copy link
Author

thanks for the quick reply.

Got it working, however some observations that might be useful for other people:

  • templates worked fine out-of-the-box in my origin 3.3
  • on OSE 3.1, I did get issues starting the node images... a permission issue prevented the start. Relaxing that via
FROM selenium/node-chrome:3.0.1
USER root
RUN chmod -R 777 /opt/selenium
RUN echo "2a54b938e3f511e6bf01fe55135034f3" > /etc/machine-id

does the trick. The /etc/machine-id fixes a dbus warning

  • the grid comes up and the nodes register without any problem, however... I cannot get the firefox node to work... it always gives an InvocationTargetException without any further information (so registered ok at the hub, hub passes the data to the node... node goes through the protocol INFO messages and then nothing happens.
  • using the chrome image works fine though, both with a 3.0.1 as with our legacy 2.53.1 setup.

Conclusion : moved to chrome iso firefox, and our tests are running again :-)

@rakeshnambiar
Copy link

@ddavison ... Is there any option to run the selenium docker containers without root access? In my organization, the open-shift admin is not interested to give the root access to everyone. Pls advise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants