Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Running into 'Session was terminated due to ORPHAN' error when running on saucelabs #1218

Open
abhiagarwal41 opened this issue Feb 8, 2021 · 1 comment

Comments

@abhiagarwal41
Copy link

abhiagarwal41 commented Feb 8, 2021

Zalenium Image Version(s): 3.141.59t
OS: Ubuntu Linux
Docker Command to start Zalenium: /usr/bin/docker run --name zalenium -p 4444:4444 -e ZALENIUM_SELENIUM_CONTAINER_MEMORY_LIMIT=1573741824 -e SAUCE_USERNAME=**** -e SAUCE_ACCESS_KEY=**** -e SAUCE_LABS_URL=**** -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos -v /dev/shm:/dev/shm --privileged dosel/zalenium:3.141.59t start --sauceLabsEnabled true --startTunnel true --maxDockerSeleniumContainers 20

Context: We have integrated saucelabs with zalenium and set idleTimeout=5400 in capabilities. So all tests with platform as LINUX run on zalenium containers and WINDOWS ones are forwarded to saucelabs.

Bug: Get 'Session was terminated due to ORPHAN' error on saucelabs when browser is idle for more than 90 sec. When same test is run on zalenium containers, it proceeds fine even if browser is idle for more than 90 sec.

As per saucelabs, idleTimeout capability is valid for its own containers too: https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options

Msg on saucelabs test console:
There is a problem with your test.
User Abandoned Test -- User terminated

Stacktrace:

selenium.common.exceptions.WebDriverException: Message: Session [2edf61ab1fbe465d8910e756a69ed2f4] was terminated due to ORPHAN 19:56:39 Stacktrace: 19:56:39 at org.openqa.grid.internal.ActiveTestSessions.getExistingSession (ActiveTestSessions.java:115) 19:56:39 at de.zalando.ep.zalenium.registry.ZaleniumRegistry.getExistingSession (ZaleniumRegistry.java:440) 19:56:39 at org.openqa.grid.web.servlet.handler.RequestHandler.getSession (RequestHandler.java:241) 19:56:39 at org.openqa.grid.web.servlet.handler.RequestHandler.process (RequestHandler.java:123) 19:56:39 at org.openqa.grid.web.servlet.DriverServlet.process (DriverServlet.java:85) 19:56:39 at org.openqa.grid.web.servlet.DriverServlet.doPost (DriverServlet.java:69) 19:56:39 at javax.servlet.http.HttpServlet.service (HttpServlet.java:707) 19:56:39 at javax.servlet.http.HttpServlet.service (HttpServlet.java:790) 19:56:39 at org.seleniumhq.jetty9.servlet.ServletHolder.handle (ServletHolder.java:865) 19:56:39 at org.seleniumhq.jetty9.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1655) 19:56:39 at io.prometheus.client.filter.MetricsFilter.doFilter (MetricsFilter.java:170) 19:56:39 at org.seleniumhq.jetty9.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1642) 19:56:39 at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle (ServletHandler.java:533) 19:56:39 at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle (ScopedHandler.java:146) 19:56:39 at org.seleniumhq.jetty9.security.SecurityHandler.handle (SecurityHandler.java:548) 19:56:39 at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132) 19:56:39 at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:257) 19:56:39 at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle (SessionHandler.java:1595) 19:56:39 at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:255) 19:56:39 at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle (ContextHandler.java:1340) 19:56:39 at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope (ScopedHandler.java:203) 19:56:39 at org.seleniumhq.jetty9.servlet.ServletHandler.doScope (ServletHandler.java:473) 19:56:39 at org.seleniumhq.jetty9.server.session.SessionHandler.doScope (SessionHandler.java:1564) 19:56:39 at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope (ScopedHandler.java:201) 19:56:39 at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope (ContextHandler.java:1242) 19:56:39 at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle (ScopedHandler.java:144) 19:56:39 at org.seleniumhq.jetty9.server.handler.StatisticsHandler.handle (StatisticsHandler.java:174) 19:56:39 at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132) 19:56:39 at org.seleniumhq.jetty9.server.Server.handle (Server.java:503) 19:56:39 at org.seleniumhq.jetty9.server.HttpChannel.handle (HttpChannel.java:364) 19:56:39 at org.seleniumhq.jetty9.server.HttpConnection.onFillable (HttpConnection.java:260) 19:56:39 at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded (AbstractConnection.java:305) 19:56:39 at org.seleniumhq.jetty9.io.FillInterest.fillable (FillInterest.java:103) 19:56:39 at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run (ChannelEndPoint.java:118) 19:56:39 at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.runTask (EatWhatYouKill.java:333) 19:56:39 at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce (EatWhatYouKill.java:310) 19:56:39 at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.tryProduce (EatWhatYouKill.java:168) 19:56:39 at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run (EatWhatYouKill.java:126) 19:56:39 at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run (ReservedThreadExecutor.java:366) 19:56:39 at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:765) 19:56:39 at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run (QueuedThreadPool.java:683) 19:56:39 at java.lang.Thread.run (Thread.java:748)

saucelabs

@arpitshahi227
Copy link

I am also getting this same issue from a long time specifically for the sauce labs. I tried various methods such as increasing idle time out but nothing worked out for me.

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

No branches or pull requests

2 participants