gitlab-runner, stuck jobs in creating mode (500 internal server error) - gitlab-ci

I have a problem that I can not solve alone.
I spent the day on it and I tried to find a solution by myself before creating this ticket.
Context:
I use the latest version of Gitlab proposed: sameersbn / gitlab: 11.5.1
I have a runner launched into a docker container: gitlab / gitlab-runner: alpine
I use Traefik
Everything is started thanks to docker-compose.
Steps:
I launch all of my containers
I record a runner (command visible below)
I notice in the admin that my runners are well recorded in the gitlab: / admin / runners
I run a pipeline, and the job is blocked: /
I have tried everything:
  - update the gitlab
  - update the runner and use a previous version
  - remove the runner from the gitlab network
  - ...
Details:
My Traefik docker-compose.yml:
version: '2'
services:
proxy:
image: traefik:alpine
container_name: traefik
networks:
- traefik
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- /data/traefik/traefik.toml:/etc/traefik/traefik.toml
- /data/traefik/acme:/etc/traefik/acme
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
labels:
- "traefik.frontend.rule=Host:traefik.mydomain.com"
- "traefik.port=8080"
- "traefik.backend=traefik"
- "traefik.frontend.entryPoints=http,https"
portainer:
image: portainer/portainer
container_name: portainer
networks:
- traefik
labels:
- "traefik.frontend.rule=Host:portainer.mydomain.com"
- "traefik.port=9000"
- "traefik.backend=portainer"
- "traefik.frontend.entryPoints=http,https"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
networks:
traefik:
external:
name: traefik
My Gitlab docker-compose.yml:
version: '2'
services:
redis:
restart: always
image: sameersbn/redis:4.0.9-1
container_name: gitlab-redis
command:
- --loglevel warning
networks:
- gitlab
volumes:
- /data/gitlab/redis:/var/lib/redis:Z
labels:
- "traefik.enable=false"
postgresql:
restart: always
image: sameersbn/postgresql:10
container_name: gitlab-postgresql
networks:
- gitlab
volumes:
- /data/gitlab/postgresql:/var/lib/postgresql:Z
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- DB_EXTENSION=pg_trgm
labels:
- "traefik.enable=false"
registry:
image: registry:2
container_name: gitlab-registry
restart: always
expose:
- "5000"
ports:
- "5000:5000"
networks:
- gitlab
- traefik
volumes:
- /data/gitlab/registry:/registry
- /data/gitlab/certs:/certs
labels:
- traefik.port=5000
- traefik.frontend.rule=Host:registry.mydomain.com
- traefik.frontend.auth.basic=mydomain:fd9ef338f7de0f196c5409a668102b9a
environment:
- REGISTRY_LOG_LEVEL=error
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/registry
- REGISTRY_AUTH_TOKEN_REALM=https://gitlab.mydomain.com/jwt/auth
- REGISTRY_AUTH_TOKEN_SERVICE=container_registry
- REGISTRY_AUTH_TOKEN_ISSUER=gitlab-issuer
- REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/certs/registry.crt
- REGISTRY_STORAGE_DELETE_ENABLED=true
gitlab-runner:
image: gitlab/gitlab-runner:alpine
container_name: gitlab-runner
restart: always
depends_on:
- gitlab
networks:
- gitlab
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /data/gitlab-runner:/etc/gitlab-runner:Z
environment:
- CI_SERVER_URL=https://gitlab.mydomain.com/
- REGISTRATION_TOKEN=FzZtgyN1cAMzoYne89ts
labels:
- "traefik.enable=false"
gitlab:
restart: always
image: sameersbn/gitlab:11.5.1
container_name: gitlab-ce
depends_on:
- redis
- postgresql
- registry
ports:
- "10080:80"
- "10022:22"
networks:
- gitlab
- traefik
volumes:
- /data/gitlab/gitlab:/home/git/data:Z
- /data/gitlab/certs:/certs
environment:
- DEBUG=false
- DB_ADAPTER=postgresql
- DB_HOST=postgresql
- DB_PORT=5432
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- REDIS_HOST=redis
- REDIS_PORT=6379
- TZ=Europe/Paris
- GITLAB_TIMEZONE=Paris
- GITLAB_HTTPS=true
- SSL_SELF_SIGNED=false
- GITLAB_HOST=gitlab.mydomain.com
- GITLAB_PORT=
- GITLAB_SSH_PORT=10022
- GITLAB_RELATIVE_URL_ROOT=
- GITLAB_SECRETS_DB_KEY_BASE=w58HODDUerP7YOuAbt9heD9j6s80P5A8POUdsd4wHeh7tLU8wdSG0noq2LsRnvqsff9btHJDovejeTMWflg78tvKqT7y9omqVTvh
- GITLAB_SECRETS_SECRET_KEY_BASE=w58HODDUerP7YOuAbt9heD9j6s80P5A8POUdsd4wHeh7tLU8wdSG0noq2LsRnvqsff9btHJDovejeTMWflg78tvKqT7y9omqVTvh
- GITLAB_SECRETS_OTP_KEY_BASE=w58HODDUerP7YOuAbt9heD9j6s80P5A8POUdsd4wHeh7tLU8wdSG0noq2LsRnvqsff9btHJDovejeTMWflg78tvKqT7y9omqVTvh
- GITLAB_ROOT_PASSWORD=
- GITLAB_ROOT_EMAIL=
- GITLAB_NOTIFY_ON_BROKEN_BUILDS=true
- GITLAB_NOTIFY_PUSHER=false
- GITLAB_EMAIL=notifications#example.com
- GITLAB_EMAIL_REPLY_TO=noreply#example.com
- GITLAB_INCOMING_EMAIL_ADDRESS=reply#example.com
- GITLAB_BACKUP_SCHEDULE=daily
- GITLAB_BACKUP_TIME=01:00
- SMTP_ENABLED=false
- SMTP_DOMAIN=www.example.com
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=mailer#example.com
- SMTP_PASS=password
- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=login
- IMAP_ENABLED=false
- IMAP_HOST=imap.gmail.com
- IMAP_PORT=993
- IMAP_USER=mailer#example.com
- IMAP_PASS=password
- IMAP_SSL=true
- IMAP_STARTTLS=false
- OAUTH_ENABLED=false
- OAUTH_AUTO_SIGN_IN_WITH_PROVIDER=
- OAUTH_ALLOW_SSO=
- OAUTH_BLOCK_AUTO_CREATED_USERS=true
- OAUTH_AUTO_LINK_LDAP_USER=false
- OAUTH_AUTO_LINK_SAML_USER=false
- OAUTH_EXTERNAL_PROVIDERS=
- OAUTH_CAS3_LABEL=cas3
- OAUTH_CAS3_SERVER=
- OAUTH_CAS3_DISABLE_SSL_VERIFICATION=false
- OAUTH_CAS3_LOGIN_URL=/cas/login
- OAUTH_CAS3_VALIDATE_URL=/cas/p3/serviceValidate
- OAUTH_CAS3_LOGOUT_URL=/cas/logout
- OAUTH_GOOGLE_API_KEY=
- OAUTH_GOOGLE_APP_SECRET=
- OAUTH_GOOGLE_RESTRICT_DOMAIN=
- OAUTH_FACEBOOK_API_KEY=
- OAUTH_FACEBOOK_APP_SECRET=
- OAUTH_TWITTER_API_KEY=
- OAUTH_TWITTER_APP_SECRET=
- OAUTH_GITHUB_API_KEY=
- OAUTH_GITHUB_APP_SECRET=
- OAUTH_GITHUB_URL=
- OAUTH_GITHUB_VERIFY_SSL=
- OAUTH_GITLAB_API_KEY=
- OAUTH_GITLAB_APP_SECRET=
- OAUTH_BITBUCKET_API_KEY=
- OAUTH_BITBUCKET_APP_SECRET=
- OAUTH_SAML_ASSERTION_CONSUMER_SERVICE_URL=
- OAUTH_SAML_IDP_CERT_FINGERPRINT=
- OAUTH_SAML_IDP_SSO_TARGET_URL=
- OAUTH_SAML_ISSUER=
- OAUTH_SAML_LABEL="Our SAML Provider"
- OAUTH_SAML_NAME_IDENTIFIER_FORMAT=urn:oasis:names:tc:SAML:2.0:nameid-format:transient
- OAUTH_SAML_GROUPS_ATTRIBUTE=
- OAUTH_SAML_EXTERNAL_GROUPS=
- OAUTH_SAML_ATTRIBUTE_STATEMENTS_EMAIL=
- OAUTH_SAML_ATTRIBUTE_STATEMENTS_NAME=
- OAUTH_SAML_ATTRIBUTE_STATEMENTS_FIRST_NAME=
- OAUTH_SAML_ATTRIBUTE_STATEMENTS_LAST_NAME=
- OAUTH_CROWD_SERVER_URL=
- OAUTH_CROWD_APP_NAME=
- OAUTH_CROWD_APP_PASSWORD=
- OAUTH_AUTH0_CLIENT_ID=
- OAUTH_AUTH0_CLIENT_SECRET=
- OAUTH_AUTH0_DOMAIN=
- OAUTH_AZURE_API_KEY=
- OAUTH_AZURE_API_SECRET=
- OAUTH_AZURE_TENANT_ID=
- GITLAB_REGISTRY_ENABLED=true
- GITLAB_REGISTRY_HOST=registry.mydomain.com
- GITLAB_REGISTRY_API_URL=http://localhost:5000
- GITLAB_REGISTRY_KEY_PATH=/certs/registry.key
- GITLAB_REGISTRY_ISSUER=gitlab-issuer
labels:
- "traefik.frontend.rule=Host:gitlab.mydomain.com"
- "traefik.port=80"
- "traefik.backend=gitlab"
- "traefik.frontend.entryPoints=http,https"
- "traefik.docker.network=traefik"
networks:
gitlab:
driver: bridge
traefik:
external:
name: traefik
Command for register my runner:
docker exec -it gitlab-runner gitlab-runner register \
--non-interactive \
--name "Doker runner dind 1" \
--url "https://gitlab.mydomain.com/" \
--registration-token "FzZtgyN1cAMzoYne89ts" \
--env "COMPOSER_CACHE_DIR=/cache" \
--env "GIT_SSL_NO_VERIFY=true" \
--env "DOCKER_DRIVER=overlay2" \
--executor "docker" \
--docker-image docker:stable-dind \
--docker-privileged="true" \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock \
--docker-volumes /cache \
--tag-list "docker,dind" \
--run-untagged \
--locked="false"

According to my notes a 500 appearing in the Gitlab-Runner doesn't indicate much. It simply echoes the error it receives from workhorse which mangles the real message, some variant of 4XX from either gitaly or linguist into a 500. The first log to check is ones production.log but this seems to only log the 500 errors emitted by workhorse, so you have to got a level deeper and scan your workhorse.log.
Gitaly
Check the workhorse.log for a version mismatch between gitaly and workhorse. As I recall it was critical that both applications have comparable version numbers, there was a table one could check, as this dictated which protocols they understood.
Linguist
This was a really obscure issue I encountered. Essentially the version of Ruby used to run Gitaly and the version of Ruby used by Gitaly to run gitaly-ruby, the sub-processes it spawns internally, were different. This is apparently indicated by the cryptic messages
time="2017-12-04T18:11:34+02:00" level=fatal msg="load config" config_path=/etc/gitaly/config.toml error="load linguist colors: exit status 1; stderr: \"/usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs': Your bundle is locked to rake (12.1.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (12.1.0) has removed it. You'll need to update your bundle to a different version of rake (12.1.0) that hasn't been removed in order to install. (Bundler::GemNotFound)\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'\\n\\tfrom /usr/lib64/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'\\n\\tfrom /usr/lib64/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'\\n\\tfrom /usr/lib64/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'\\n\""
time="2017-12-04T18:17:54+02:00" level=info msg="Starting Gitaly" version="Gitaly, version 0.52.0, built 20171204.135804"
Note :
Please bear in mind that my notes are particular to Gentoo, a different version of GitlabHQ and may or may not be applicable to your situation accordingly. Please update your question as you find out more information since my notes may have further information that is relevant to your problem

Related

Adding instance/concurrent sessions in Selenium docker grid 4 is not working

I have configured the following yml file that spins up multiple instances of each node and all nodes booting correctly.
version: "3"
services:
selenium-event-bus:
image: selenium/event-bus:4.0.0-rc-1-prerelease-20210804
container_name: selenium-event-bus
ports:
- "4442:4442"
- "4443:4443"
- "5557:5557"
selenium-sessions:
image: selenium/sessions:4.0.0-rc-1-prerelease-20210804
container_name: selenium-sessions
ports:
- "5556:5556"
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-session-queue:
image: selenium/session-queue:4.0.0-rc-1-prerelease-20210804
container_name: selenium-session-queue
ports:
- "5559:5559"
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
selenium-distributor:
image: selenium/distributor:4.0.0-rc-1-prerelease-20210804
container_name: selenium-distributor
ports:
- "5553:5553"
depends_on:
- selenium-event-bus
- selenium-sessions
- selenium-session-queue
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_SESSIONS_MAP_HOST=selenium-sessions
- SE_SESSIONS_MAP_PORT=5556
- SE_SESSION_QUEUE_HOST=selenium-session-queue
- SE_SESSION_QUEUE_PORT=5559
selenium-router:
image: selenium/router:4.0.0-rc-1-prerelease-20210804
container_name: selenium-router
ports:
- "4444:4444"
depends_on:
- selenium-distributor
- selenium-sessions
- selenium-session-queue
environment:
- SE_DISTRIBUTOR_HOST=selenium-distributor
- SE_DISTRIBUTOR_PORT=5553
- SE_SESSIONS_MAP_HOST=selenium-sessions
- SE_SESSIONS_MAP_PORT=5556
- SE_SESSION_QUEUE_HOST=selenium-session-queue
- SE_SESSION_QUEUE_PORT=5559
chrome:
image: selenium/node-chrome:4.0.0-rc-1-prerelease-20210804
shm_size: 2gb
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- NODE_MAX_CONCURRENT_SESSIONS=25
ports:
- "6900:5900"
edge:
image: selenium/node-edge:4.0.0-rc-1-prerelease-20210804
shm_size: 2gb
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- NODE_MAX_CONCURRENT_SESSIONS=15
ports:
- "6901:5900"
firefox:
image: selenium/node-firefox:4.0.0-rc-1-prerelease-20210804
shm_size: 2gb
depends_on:
- selenium-event-bus
environment:
- SE_EVENT_BUS_HOST=selenium-event-bus
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- NODE_MAX_CONCURRENT_SESSIONS=50
ports:
- "6902:5900"
I would like to increase the concurrency by using this command NODE_MAX_CONCURRENT_SESSIONS but the Grid portal/UI is not reflecting and all tests are kept in the queue instead.
Any hints to make it parallel for running the tests?
Currently Selenium developers rework some stuff there and flags are the part of that reworks. The property you are using is not valid any more.
You need to use SE_NODE_MAX_SESSIONS in order to set up the number of concurrent sessions for your docker container. You would also probably need to set SE_NODE_OVERRIDE_MAX_SESSIONS=true because the default false value limits the maximum number of concurrent sessions to number of your cores.
Here I'm trying to keep the up-to date guide to Selenium Grid 4 configuration properties.

How to configure selenoid to use a specific version of selenoid/video-recorder to be used to record session

is there any way to mention which version of selenoid/video-recorder should be used while selenoid is started? either in docker-compose.yml or command line?
I get following error, due to the docker pull limit issue, so I need to mention the specific version i have pulled earlier.
2021/04/08 10:35:59 [909] [5.64s] [SESSION_FAILED] [test] [x.x.x.x] [chrome-89.0] [x.x.x.x:4444] [-] [6] [start video container: create video container: Error response from daemon: No such image: selenoid/video-recorder:latest-release]
Following is my docker compose file.
version: '3'
services:
selenoid:
network_mode: bridge
image: aerokube/selenoid:1.10.1
volumes:
- "/opt/selenoid:/etc/selenoid"
- "/var/run/docker.sock:/var/run/docker.sock"
- "/opt/selenoid/video:/opt/selenoid/video"
environment:
- OVERRIDE_VIDEO_OUTPUT_DIR=/opt/selenium/video
- TZ=America/Montreal
- limit=10
command: ["-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video"]
ports:
- "4444:4444"
selenoid-ui:
image: "aerokube/selenoid-ui"
network_mode: bridge
links:
- selenoid
ports:
- "8080:8080"
command: ["--selenoid-uri", "http://selenoid:4444"]
Respective image can be specified with -video-recorder-image flag in in command section. All available flags are listed here: https://aerokube.com/selenoid/latest/#_selenoid_cli_flags

How to configure Jaeger agent to send traces to collector on another server

I'm trying to use Jaeger to manage tracing system. Docker is running locally "all-in-one" image with application (on the same host) without any issues. My question is how to configure jaeger agent on host1 that would send traces jaeger collector on another host2. Host2 is configured with "all-in-one". I can see Jaeger UI on host2 but it doesn't seem getting any traces from host1.
Configure tracer:
var configuration = new Configuration("service-name")
.withSampler(Configuration.SamplerConfiguration.fromEnv())
.withReporter(Configuration.ReporterConfiguration.fromEnv());
GlobalTracer.registerIfAbsent(configuration.getTracer());
return openTracer;
Added environment variables in yaml file on host1:
-e JAEGER_AGENT_HOST=jaeger.hostname.com \
-e JAEGER_AGENT_PORT=6831 \
Added jaeger image in yaml file on host2:
$ docker run -d --name jaeger \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14268:14268 \
-p 9411:9411 \
jaegertracing/all-in-one:latest
Any suggestions will be appreciated.
In my case.
Host2
version: '2'
services:
hotrod:
image: jaegertracing/example-hotrod:1.28
ports:
- '8080:8080'
- '8083:8083'
command: ["-m","prometheus","all"]
environment:
- JAEGER_AGENT_HOST=jaeger-agent
- JAEGER_AGENT_PORT=6831
- JAEGER_SAMPLER_TYPE=remote
- JAEGER_SAMPLING_ENDPOINT=http://jaeger-agent:5778/sampling
depends_on:
- jaeger-agent
jaeger-collector:
image: jaegertracing/jaeger-collector:1.28
command:
- "--cassandra.keyspace=jaeger_v1_dc1"
- "--cassandra.servers=cassandra"
- "--collector.zipkin.host-port=9411"
- "--sampling.initial-sampling-probability=.5"
- "--sampling.target-samples-per-second=.01"
environment:
- SAMPLING_CONFIG_TYPE=adaptive
ports:
- "14269:14269"
- "14268:14268"
- "14250:14250"
- "9411:9411"
restart: on-failure
depends_on:
- cassandra-schema
jaeger-query:
image: jaegertracing/jaeger-query:1.28
command: ["--cassandra.keyspace=jaeger_v1_dc1", "--cassandra.servers=cassandra"]
ports:
- "16686:16686"
- "16687"
restart: on-failure
depends_on:
- cassandra-schema
jaeger-agent:
image: jaegertracing/jaeger-agent:1.28
command: ["--reporter.grpc.host-port=jaeger-collector:14250"]
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
restart: on-failure
depends_on:
- jaeger-collector
cassandra:
image: cassandra:4.0
cassandra-schema:
image: jaegertracing/jaeger-cassandra-schema:1.28
depends_on:
- cassandra
host1 is
version: '2'
services:
jaeger-agent:
image: jaegertracing/jaeger-agent:1.28
command: ["--reporter.grpc.host-port=host2:14250"]
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
restart: on-failure
it works well for me

Docker-The scale command is deprecated. Use the up command with the --scale flag instead

i want to launch 5 chrome and 5 firefox in docker container. I am using the below command but its giving the following error
The scale command is deprecated. Use the up command with the --scale flag instead.
ERROR: No such service: nodechrome
docker-compose scale nodechrome=5 nodefirefox=5
My docker-compose.yml file
version: '2'
services:
firefoxnode:
image: selenium/node-firefox-debug
volumes:
- /dev/shm:/dev/shm
depends_on:
- hub
environment:
HUB_HOST: hub
ports:
- "32772:5900"
chromenode:
image: selenium/node-chrome-debug
volumes:
- /dev/shm:/dev/shm
depends_on:
- hub
environment:
HUB_HOST: hub
ports:
- "32773:5900"
hub:
image: selenium/hub
ports:
- "4444:4444"
From where these names came? nodechrome and nodefirefox
Correct your command instead:
from:
docker-compose scale nodechrome=5 nodefirefox=5
to:
docker-compose scale chromenode=5 firefoxnode=5
Try this command:
docker-compose up --scale chrome=5
Verify the Grid by visiting: http://localhost:4444/ui/index.html#/
Refer: Documentation

Unable to Take Screenshots Using Firefox Nodes

My Selenium tests are designed to take screenshots on failure and add them to the report. The screenshots are displaying perfectly for chrome browsers, but Firefox screenshots are just white rectangles.The changelog says something about a "pass through" mode https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG which I've tried to disable, but nothing seems to be working.
Here's my docker compose file:
seleniumhub:
image: selenium/hub
ports:
- 4444:4444
firefoxnode:
image: selenium/node-firefox-debug
ports:
- 4577
links:
- seleniumhub:hub
environment:
- enablePassThrough=false
- NODE_MAX_INSTANCES=5
- NODE_MAX_SESSION=5
chromenode:
image: selenium/node-chrome-debug
ports:
- 4578
links:
- seleniumhub:hub
environment:
- NODE_MAX_INSTANCES=5
- NODE_MAX_SESSION=5
I don't think enablePassThrough is a valid environment variable. The configuration is generated from https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeFirefox/generate_config which only contains your NODE_MAX_INSTANCES and NODE_MAX_SESSION.
However, there is a SE_OPTS variable from the parent base image in the entrypoint at https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeBase/entry_point.sh#L28-L30. You can use this to set -enablePassThrough false. Your service definition in Docker Compose would be something like this instead:
firefoxnode:
image: selenium/node-firefox-debug
ports:
- 4577
links:
- seleniumhub:hub
environment:
- SE_OPTS="-enablePassThrough false"
- NODE_MAX_INSTANCES=5
- NODE_MAX_SESSION=5