Docker: Selenium Grid : timeout: PS gets killed as soon as started

110 views
Skip to first unread message

Prasad S

unread,
Sep 23, 2017, 10:33:48 PM9/23/17
to Selenium Users


Hi

I'm running the latest docker images to setup a Selenium Grid /Node test bed.

I'm not able to start docker with timeout or browserTimeout options.
I mean it starts & gets killed in the next second.

Is there something wrong I'm doing?

Please help


My commands:

[root@scspr0299221001 ~]# docker run -d -P -p 4444:4444 -e HUB_PORT_4444_TCP_ADDR=10.235.225.74 -e HUB_PORT_4444_TCP_PORT=4444 -e SE_OPTS="-timeout=0 -browserTimeout=0" selenium/hub
de4a18598c0b281f504fa97d6faa051af8e9677dc1551112f67ebeb173e2f6ca
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
[root@scspr0299221001 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND                CREATED                  STATUS                  PORTS                    NAMES
de4a18598c0b        selenium/hub        "/opt/bin/entry_poin   Less than a second ago   Up Less than a second   0.0.0.0:4444->4444/tcp   backstabbing_shockley
[root@scspr0299221001 ~]#
[root@scspr0299221001 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@scspr0299221001 ~]# date ; docker run -d -P -p 4444:4444 -e HUB_PORT_4444_TCP_ADDR=10.235.225.74 -e HUB_PORT_4444_TCP_PORT=4444 -e SE_OPTS="-timeout=0 -browserTimeout=0" selenium/hub
Sat Sep 23 22:29:51 EDT 2017
f09eafd5795be4154b69fa1e55dea7ef131e46bdd29a151db4875f64195c3666
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
[root@scspr0299221001 ~]# date ; docker ps
Sat Sep 23 22:29:58 EDT 2017
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@scspr0299221001 ~]#

Prasad S

unread,
Sep 23, 2017, 10:51:12 PM9/23/17
to Selenium Users


[root@scspr0299237001 ~]# docker logs 6782af4cf444
appending selenium options: -timeout=0 -browserTimeout=0
Waiting xvfb...
24/09/2017 02:46:24 passing arg to libvncserver: -rfbport
24/09/2017 02:46:24 passing arg to libvncserver: 5900
24/09/2017 02:46:24 -usepw: found /home/seluser/.vnc/passwd
24/09/2017 02:46:24 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 35
24/09/2017 02:46:24 Using X display :99.0
24/09/2017 02:46:24 rootwin: 0x25c reswin: 0x200001 dpy: 0x17fb9f0
24/09/2017 02:46:24
24/09/2017 02:46:24 ------------------ USEFUL INFORMATION ------------------
24/09/2017 02:46:24 X DAMAGE available on display, using it for polling hints.
24/09/2017 02:46:24   To disable this behavior use: '-noxdamage'
24/09/2017 02:46:24
24/09/2017 02:46:24   Most compositing window managers like 'compiz' or 'beryl'
24/09/2017 02:46:24   cause X DAMAGE to fail, and so you may not see any screen
24/09/2017 02:46:24   updates via VNC.  Either disable 'compiz' (recommended) or
24/09/2017 02:46:24   supply the x11vnc '-noxdamage' command line option.
24/09/2017 02:46:24
24/09/2017 02:46:24 Wireframing: -wireframe mode is in effect for window moves.
24/09/2017 02:46:24   If this yields undesired behavior (poor response, painting
24/09/2017 02:46:24   errors, etc) it may be disabled:
24/09/2017 02:46:24    - use '-nowf' to disable wireframing completely.
24/09/2017 02:46:24    - use '-nowcr' to disable the Copy Rectangle after the
24/09/2017 02:46:24      moved window is released in the new position.
24/09/2017 02:46:24   Also see the -help entry for tuning parameters.
24/09/2017 02:46:24   You can press 3 Alt_L's (Left "Alt" key) in a row to
24/09/2017 02:46:24   repaint the screen, also see the -fixscreen option for
24/09/2017 02:46:24   periodic repaints.
24/09/2017 02:46:24
24/09/2017 02:46:24 XFIXES available on display, resetting cursor mode
24/09/2017 02:46:24   to: '-cursor most'.
24/09/2017 02:46:24   to disable this behavior use: '-cursor arrow'
24/09/2017 02:46:24   or '-noxfixes'.
24/09/2017 02:46:24 using XFIXES for cursor drawing.
24/09/2017 02:46:24 GrabServer control via XTEST.
24/09/2017 02:46:24
24/09/2017 02:46:24 Scroll Detection: -scrollcopyrect mode is in effect to
24/09/2017 02:46:24   use RECORD extension to try to detect scrolling windows
24/09/2017 02:46:24   (induced by either user keystroke or mouse input).
24/09/2017 02:46:24   If this yields undesired behavior (poor response, painting
24/09/2017 02:46:24   errors, etc) it may be disabled via: '-noscr'
24/09/2017 02:46:24   Also see the -help entry for tuning parameters.
24/09/2017 02:46:24   You can press 3 Alt_L's (Left "Alt" key) in a row to
24/09/2017 02:46:24   repaint the screen, also see the -fixscreen option for
24/09/2017 02:46:24   periodic repaints.
24/09/2017 02:46:24
24/09/2017 02:46:24 XKEYBOARD: number of keysyms per keycode 7 is greater
24/09/2017 02:46:24   than 4 and 51 keysyms are mapped above 4.
24/09/2017 02:46:24   Automatically switching to -xkb mode.
24/09/2017 02:46:24   If this makes the key mapping worse you can
24/09/2017 02:46:24   disable it with the "-noxkb" option.
24/09/2017 02:46:24   Also, remember "-remap DEAD" for accenting characters.
24/09/2017 02:46:24
24/09/2017 02:46:24 X FBPM extension not supported.
24/09/2017 02:46:24 X display is not capable of DPMS.
24/09/2017 02:46:24 --------------------------------------------------------
24/09/2017 02:46:24
24/09/2017 02:46:24 Default visual ID: 0x21
24/09/2017 02:46:24 Read initial data from X display into framebuffer.
24/09/2017 02:46:24 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5440
24/09/2017 02:46:24
24/09/2017 02:46:24 X display :99.0 is 32bpp depth=24 true color
24/09/2017 02:46:24
24/09/2017 02:46:24 Listening for VNC connections on TCP port 5900
24/09/2017 02:46:24 Listening for VNC connections on TCP6 port 5900
24/09/2017 02:46:24 listen6: bind: Address already in use
24/09/2017 02:46:24 Not listening on IPv6 interface.
24/09/2017 02:46:24
24/09/2017 02:46:24 Xinerama is present and active (e.g. multi-head).
24/09/2017 02:46:24 Xinerama: number of sub-screens: 1
24/09/2017 02:46:24 Xinerama: no blackouts needed (only one sub-screen)
24/09/2017 02:46:24
PORT=5900
24/09/2017 02:46:24 fb read rate: 1138 MB/sec
24/09/2017 02:46:24 fast read: reset -wait  ms to: 10
24/09/2017 02:46:24 fast read: reset -defer ms to: 10
24/09/2017 02:46:24 The X server says there are 10 mouse buttons.
24/09/2017 02:46:24 screen setup finished.
24/09/2017 02:46:24

The VNC desktop is:      6782af4cf444:0

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.

Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -timeout=0
        at com.beust.jcommander.JCommander.parseValues(JCommander.java:742)
        at com.beust.jcommander.JCommander.parse(JCommander.java:282)
        at com.beust.jcommander.JCommander.parse(JCommander.java:265)
        at com.beust.jcommander.JCommander.<init>(JCommander.java:210)
        at org.openqa.grid.selenium.GridLauncherV3$3.setConfiguration(GridLauncherV3.java:267)
        at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155)
        at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)
[root@scspr0299237001 ~]#

⇜Krishnan Mahadevan⇝

unread,
Sep 23, 2017, 10:59:36 PM9/23/17
to seleniu...@googlegroups.com

The problem is here :

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -timeout=0

        at com.beust.jcommander.JCommander.parseValues(JCommander.java:742)

        at com.beust.jcommander.JCommander.parse(JCommander.java:282)

        at com.beust.jcommander.JCommander.parse(JCommander.java:265)

        at com.beust.jcommander.JCommander.<init>(JCommander.java:210)

        at org.openqa.grid.selenium.GridLauncherV3$3.setConfiguration(GridLauncherV3.java:267)

        at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155)

        at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)

[root@scspr0299237001 ~]#

The SE_OPTS you are passing is incorrect

[root@scspr0299221001 ~]# docker run -d -P -p 4444:4444 -e HUB_PORT_4444_TCP_ADDR=10.235.225.74 -e HUB_PORT_4444_TCP_PORT=4444 -e SE_OPTS="-timeout=0 -browserTimeout=0" selenium/hub

Can you try once again without the "=" sign between the parameter values for SE_OPTS ? These are not JVM args but are program args.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ebf01c3b-d70f-4d84-a5d5-a9eff6d79566%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Prasad S

unread,
Sep 23, 2017, 11:10:47 PM9/23/17
to Selenium Users
>Can you try once again without the "=" sign between the parameter values for SE_OPTS ? These are not JVM args but are program args. 

Cool. Thanks, this works now.
I removed the "=" sign

BTW, I assume below will set to unlimited timeout, as some of my tests goes off browser to check something in CLI & then comes back to Browser.
-e SE_OPTS="-timeout -1 -browserTimeout -1"

Krishnan Mahadevan

unread,
Sep 24, 2017, 4:09:43 AM9/24/17
to seleniu...@googlegroups.com

>>> BTW, I assume below will set to unlimited timeout, as some of my tests goes off browser to check something in CLI & then comes back to Browser.

-e SE_OPTS="-timeout -1 -browserTimeout -1"

 

Yes that is correct. But I would recommend that you don’t do this. Instead of changing the timeouts to be infinite (and thus preventing the grid from cleaning up genuine stale sessions), I would suggest that you do spin off a new thread within which you basically poll the browser for some static value such as driver.getTitle() periodically. That way your session would be kept active because you are still trying to get the title of the page every “n” units of time (grid doesn’t really care as to what is being polled, all it worries about is, is the session active or did it go stale).

 

Once your tests are done with its non ui operations, you basically just interrupt the poller and then resume. That IMO would be a better approach.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

Reply all
Reply to author
Forward
0 new messages