Stuck on "Error forwarding the new session Error forwarding the request"

97 views
Skip to first unread message

William Hawkes

unread,
May 18, 2021, 5:44:36 AM5/18/21
to Selenium Users
I have been going round and round on this for days. Finding old listings, but not seeming to get quite the right combination. Would really appreciate help getting this last step working if anyone had suggestions please.

I can run selenium hub, nodes, malleus jitsificus, etc and hit the targeted jitsi server just fine from manual none dockerized script. It all breaks when I try to get it to be scalable test. I can test with this manuall approach for a few hundred users, but I am supposed to be simulating thousands of users, so need this scaled approach to work. It looks to be VERY close to working, but this last step just isn't working.

It appears the key error is "Error forwarding the new session Error forwarding the request"

Assuming I'm not looking in the wrong direction, web searches point to:

I have tried this on 2 completely different AWS accounts/setups, and from my own computer to the AWS containers, all three with the same final result. I have tried even just opening up all the AWS ports temporarily in case it was firewall like issue (with ufw off on the OS side), with no difference.
Really appreciate additional suggestions to track this down.
Thank you kindly!

Selenium version: 3.141.59
browserVersion 90.0.4430.85
"chromedriverVersion": "90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429})"
system running scripts java version:  openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-120.04, mixed mode, sharing)
Also getting same results on another system running:
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)


docker version
Client:
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.8
 Git commit:        20.10.2-0ubuntu1~20.04.2
 Built:             Tue Mar 30 21:24:57 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.8
  Git commit:       20.10.2-0ubuntu1~20.04.2
  Built:            Mon Mar 29 19:10:09 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.3.3-0ubuntu2.3
  GitCommit:
 runc:
  Version:          spec: 1.0.2-dev
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:


docker-compose  version
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.5
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
OS VERSION= Ubuntu "20.04.2 LTS (Focal Fossa)"


browserTimeout: 600

debug: false

jettyMaxThreads: -1

host: 172.31.16.39

port: 5555

role: node

timeout: 300

cleanUpCycle: 5000

maxSession: 1

capabilities: Capabilities {applicationName: , browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, seleniumProtocol: WebDriver, server:CONFIG_UUID: 6b2ef074-64c8-401b-9172-e18..., version: 90.0.4430.85}

downPollingLimit: 2

hub: http://hub-load-balancer-849589238.us-east-1.elb.amazonaws.com:4444/grid/register

id: http://null:5555

nodePolling: 5000

nodeStatusCheckTimeout: 5000

proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy

register: true

registerCycle: 5000

remoteHost: http://null:5555

unregisterIfStillDownAfter: 60000



http://3.83.80.24:5555/wd/hub/static/resource/hub.html
"a": { "acceptInsecureCerts": false, "browserName": "chrome", "browserVersion": "90.0.4430.85", "chrome": { "chromedriverVersion": "90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429})", "userDataDir": "/tmp/.com.google.Chrome.6Z3QyW" }, "goog:chromeOptions": { "debuggerAddress": "localhost:34193" }, "networkConnectionEnabled": false, "pageLoadStrategy": "normal", "platformName": "linux", "proxy": {}, "setWindowRect": true, "strictFileInteractability": false, "timeouts": { "implicit": 0, "pageLoad": 300000, "script": 30000 }, "unhandledPromptBehavior": "dismiss and notify", "webauthn:extension:largeBlob": true, "webauthn:virtualAuthenticators": true, "webdriver.remote.sessionid": "ba32d0466b009327077a64ca1acb8b50" } }



browserTimeout: 600

debug: false

jettyMaxThreads: -1

host: 172.31.16.39

port: 5555

role: node

timeout: 300

cleanUpCycle: 5000

maxSession: 1

capabilities: Capabilities {applicationName: , browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, seleniumProtocol: WebDriver, server:CONFIG_UUID: 6b2ef074-64c8-401b-9172-e18..., version: 90.0.4430.85}

downPollingLimit: 2

hub: http://hub-load-balancer-849589238.us-east-1.elb.amazonaws.com:4444/grid/register

id: http://null:5555

nodePolling: 5000

nodeStatusCheckTimeout: 5000

proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy

register: true

registerCycle: 5000

remoteHost: http://null:5555

unregisterIfStillDownAfter: 60000

Driver info: driver.version: unknown

        at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:118)

        at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:85)

        at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:69)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

        at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:865)

        at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)

        at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:146)

        at org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)

        at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)

        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)

        at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)

        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)

        at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)

        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)

        at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)

        at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)

        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)

        at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1242)

        at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:144)

        at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)

        at org.seleniumhq.jetty9.server.Server.handle(Server.java:503)

        at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:364)

        at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:260)

        at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)

        at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:103)

        at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)

        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)

        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)

        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)

        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)

        at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)

        at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)

        at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)

        at java.lang.Thread.run(Thread.java:748)

[15] End testMain.

[WARNING] Tests run: 294, Failures: 0, Errors: 0, Skipped: 293, Time elapsed: 53.413 s - in TestSuite

[INFO]

[INFO] Results:

[INFO]

[WARNING] Tests run: 294, Failures: 0, Errors: 0, Skipped: 293

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  55.105 s

[INFO] Finished at: 2021-05-16T16:46:11Z

[INFO] ------------------------------------------------------------------------







 cat docker-compose.yml
version: '3.7'

services:

  hub:
    # image: selenium/hub:3.141.59
    image: selenium/hub
    environment:
    - GRID_TIMEOUT=120
    - GRID_MAX_SESSION=200
    - GRID_NEW_SESSION_WAIT_TIMEOUT=-1
    - GRID_BROWSER_TIMEOUT=120
    ports:
      - 4444:4444
    expose:
      - 4444

  chrome:
    # image: selenium/node-chrome-debug:3.141.59
    image: selenium/node-chrome
    # image: selenium/node-chrome:3.141.59
    build:
        context: ./selenium-node
        dockerfile: Dockerfile
    ports:
    #  - 5900-6000:5900
      - 5555
    depends_on:
      - hub
    environment:
      - HUB_PORT_4444_TCP_ADDR=hub
      - HUB_PORT_4444_TCP_PORT=4444
    # timeouts manually added by Hawke here
      - GRID_BROWSER_TIMEOUT=100000
      - GRID_TIMEOUT=90000
      - NEW_SESSION_WAIT_TIMEOUT=1800000
      # - SE_OPTS=-browserTimeout 100 -timeout 100
      - HUB_HOST=hub
    # use if doing VNC debug.
    volumes:
      - /dev/shm:/dev/shm
    privileged: true
  malleus:
    build:
        context: ./malleus-node
        dockerfile: Dockerfile
    depends_on:
      - hub
    env_file:
        - settings.env
    environment:
      - HUB_HOST=hub


jitsi-loadtest/selenium-node# cat Dockerfile
#FROM selenium/node-chrome-debug:3.141.59
#FROM selenium/node-chrome:latest
#FROM selenium/node-chrome-debug
#FROM selenium/node-chrome:3.141.59
FROM selenium/node-chrome
RUN sudo apt-get update
RUN sudo apt-get install -y ffmpeg
ADD testvideo /testvideo
RUN sudo ffmpeg -i testvideo/live_class.mp4 -vf scale=800:-1 testvideo/live_class.y4m
RUN sudo ffmpeg -i testvideo/high_movement.mp4 testvideo/high_movement.y4m
RUN sudo ffmpeg -i testvideo/corgi.mp4 testvideo/corgi.y4m
EXPOSE 5900

jitsi-loadtest/malleus-node# cat Dockerfile
FROM maven

add jitsi-meet-torture /jitsi-meet-torture

WORKDIR /jitsi-meet-torture

# Cache the build.
RUN mvn -Djitsi-meet.tests.toRun=none test

ADD run.sh /
WORKDIR /
ENTRYPOINT ./run.



Any ideas?

Any other information I could post to help track this down? 
Thanks for any suggestions!












This mail is governed by the LearningMate Privacy Policy and Disclaimer at https://www.learningmate.com/privacy/

William Hawkes

unread,
May 18, 2021, 6:28:40 AM5/18/21
to seleniu...@googlegroups.com
Fortunately someone else was able to find the error (the person who originally wrote all the scripts last year). 
A section in the terraform.tf file included for the private IP addresses was hardcoded from the original AWS setup they ran it on last year rather than using a variable so that it would work in other environments. I was able to run a short initial 200 user test successfully. I updated the issue with the information and updated the script accordingly.
Here was the diff that fixed it:
- "command": [ "/bin/bash", "-c", "PRIVATE=$(curl -s http://169.254.170.2/v2/metadata | jq -r '.Containers[1].Networks[0].IPv4Addresses[0]') ; export REMOTE_HOST=\"http://$PRIVATE:5555\" ; /opt/bin/entry_point.sh" ], + "command": [ "/bin/bash", "-c", "PRIVATE=$(curl -s $${ECS_CONTAINER_METADATA_URI_V4}/task | jq -r '.Containers[0].Networks[0].IPv4Addresses[0]') ; export REMOTE_HOST=\"http://$PRIVATE:5555\" ; /opt/bin/entry_point.sh" ],

Regards.


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/edab0fc5-e735-4f81-8f96-bd308156a28fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages