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

[🐛 Bug]: Rejecting message without a valid secret in session-map #2320

Closed
Doofus100500 opened this issue Jul 23, 2024 · 5 comments
Closed
Milestone

Comments

@Doofus100500
Copy link
Contributor

Doofus100500 commented Jul 23, 2024

What happened?

Due to the fact that the registrationSecret is not passed as an option in the session-map(I can't see "Appending Selenium options: --registration-secret"), errors start to occur. If there are too many sessions, the session-map crashes and the entire grid stops working.

I tried to add it here:

#Custom environment variables for all components

extraEnvironmentVariables:
- name: SE_REGISTRATION_SECRET
  value: $SELENIUM_REGISTRATION_SECRET

but it didn’t help.

Command used to start Selenium Grid with Docker (or Kubernetes)

helm

Relevant log output

2024-07-23 10:02:59,027 INFO Included extra file "/etc/supervisor/conf.d/selenium-grid-sessions.conf" during parsing
2024-07-23 10:02:59,031 INFO RPC interface 'supervisor' initialized
2024-07-23 10:02:59,031 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-07-23 10:02:59,031 INFO supervisord started with pid 8
2024-07-23 10:03:00,034 INFO spawned: 'selenium-grid-sessions' with pid 9
Starting Selenium Grid Sessions...
Using SE_SESSIONS_HOST: selenium-grid-selenium-session-map.selenium-test
2024-07-23 10:03:00,042 INFO success: selenium-grid-sessions entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Using SE_SESSIONS_PORT: 5556
Appending Selenium options: --log-level INFO
Appending Selenium options: --https-certificate /etc/ssl/certs/selenium/selenium.pem
Appending Selenium options: --https-private-key /etc/ssl/certs/selenium/selenium.pkcs8
Appending Java options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/selenium/selenium.jks
Appending Java options: -Djavax.net.ssl.trustStorePassword=changeit
Appending Java options: -Djdk.internal.httpclient.disableHostnameVerification=true
Tracing is enabled
Classpath will be enriched with these external jars :  --ext /external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-exporter-otlp/1.38.0/opentelemetry-exporter-otlp-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-netty/1.64.0/grpc-netty-1.64.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk-trace/1.38.0/opentelemetry-sdk-trace-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk-metrics/1.38.0/opentelemetry-sdk-metrics-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk-logs/1.38.0/opentelemetry-sdk-logs-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-exporter-otlp-common/1.38.0/opentelemetry-exporter-otlp-common-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-exporter-sender-okhttp/1.38.0/opentelemetry-exporter-sender-okhttp-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi/1.38.0/opentelemetry-sdk-extension-autoconfigure-spi-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-api/1.64.0/grpc-api-1.64.0.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-codec-http2/4.1.100.Final/netty-codec-http2-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.64.0/grpc-core-1.64.0.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-handler-proxy/4.1.100.Final/netty-handler-proxy-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/com/google/guava/guava/32.1.3-android/guava-32.1.3-android.jar:/external_jars/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.23.0/error_prone_annotations-2.23.0.jar:/external_jars/https/repo1.maven.org/maven2/io/perfmark/perfmark-api/0.26.0/perfmark-api-0.26.0.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/4.1.100.Final/netty-transport-native-unix-common-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-util/1.64.0/grpc-util-1.64.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-api/1.38.0/opentelemetry-api-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk-common/1.38.0/opentelemetry-sdk-common-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-api-incubator/1.38.0-alpha/opentelemetry-api-incubator-1.38.0-alpha.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-exporter-common/1.38.0/opentelemetry-exporter-common-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.12.0/okhttp-4.12.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk/1.38.0/opentelemetry-sdk-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-buffer/4.1.100.Final/netty-buffer-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-transport/4.1.100.Final/netty-transport-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-codec/4.1.100.Final/netty-codec-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-handler/4.1.100.Final/netty-handler-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-codec-http/4.1.100.Final/netty-codec-http-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar:/external_jars/https/repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar:/external_jars/https/repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.23/animal-sniffer-annotations-1.23.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-context/1.64.0/grpc-context-1.64.0.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-codec-socks/4.1.100.Final/netty-codec-socks-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:/external_jars/https/repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/external_jars/https/repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar:/external_jars/https/repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/2.8/j2objc-annotations-2.8.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-context/1.38.0/opentelemetry-context-1.38.0.jar:/external_jars/https/repo1.maven.org/maven2/com/squareup/okio/okio/3.6.0/okio-3.6.0.jar:/external_jars/https/repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.10/kotlin-stdlib-jdk8-1.9.10.jar:/external_jars/https/repo1.maven.org/maven2/io/netty/netty-resolver/4.1.100.Final/netty-resolver-4.1.100.Final.jar:/external_jars/https/repo1.maven.org/maven2/com/squareup/okio/okio-jvm/3.6.0/okio-jvm-3.6.0.jar:/external_jars/https/repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.9.10/kotlin-stdlib-1.9.10.jar:/external_jars/https/repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.10/kotlin-stdlib-jdk7-1.9.10.jar:/external_jars/https/repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.10/kotlin-stdlib-common-1.9.10.jar:/external_jars/https/repo1.maven.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.jar
List arguments for OpenTelemetry:  -Dotel.resource.attributes=service.name=selenium-grid-selenium-session-map -Dotel.traces.exporter=otlp -Dotel.exporter.otlp.endpoint=https://opentm-cloud.host -Dotel.java.global-autoconfigure.enabled=true
10:03:00.495 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
10:03:00.505 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
10:03:01.052 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://selenium-grid-selenium-event-bus.selenium-test:4442 and tcp://selenium-grid-selenium-event-bus.selenium-test:4443
10:03:01.119 INFO [UnboundZmqEventBus.<init>] - Sockets created
10:03:02.121 INFO [UnboundZmqEventBus.<init>] - Event bus ready
10:03:02.819 INFO [SessionMapServer.execute] - Started Selenium SessionMap 4.22.0 (revision c5f3146703): https://selenium-grid-selenium-session-map.-selenium-test:5556
10:05:59.031 ERROR [UnboundZmqEventBus$PollingRunnable.rejectEvent] - Rejecting message without a valid secret. Event[id=fd1610de-8eed-4a31-94d9-6aaa0183962e, type=selenium-rejected-event, data={"data": "\"139ee94cfa332e2615a1626051a02850\"","name": "session-closed"}]
10:07:25.469 ERROR [UnboundZmqEventBus$PollingRunnable.rejectEvent] - Rejecting message without a valid secret. Event[id=d490cb8f-8a9c-4bf6-a8d9-ef2e20b0524d, type=selenium-rejected-event, data={"data": "\"1ca095f58f4ca24689fb361ad3661446\"","name": "session-closed"}]
10:08:55.233 ERROR [UnboundZmqEventBus$PollingRunnable.rejectEvent] - Rejecting message without a valid secret. Event[id=6a174324-3733-48e5-b8df-5c868e954512, type=selenium-rejected-event, data={"data": "\"7a6742497e8853320e6496fef177a5b6\"","name": "session-closed"}]
10:10:24.303 ERROR [UnboundZmqEventBus$PollingRunnable.rejectEvent] - Rejecting message without a valid secret. Event[id=8a2ed4ca-aa27-4844-9f11-a788629699aa, type=selenium-rejected-event, data={"data": "\"2137898c69568bfdce24e8d29ad5462f\"","name": "session-closed"}]
10:15:40.502 ERROR [UnboundZmqEventBus$PollingRunnable.rejectEvent] - Rejecting message without a valid secret. Event[id=3a5ba87a-6e34-42c7-a8d3-fd0871566635, type=selenium-rejected-event, data={"data": "\"7ec408b91ecbebaeea11828b82b26c15\"","name": "session-closed"}]

Operating System

k8s

Docker Selenium version (image tag)

4.22.0-20240621

Selenium Grid chart version (chart version)

0.32.0

Copy link

@Doofus100500, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@VietND96
Copy link
Member

Did you set this env var in Node?

@Doofus100500
Copy link
Contributor Author

Doofus100500 commented Jul 23, 2024

Of course, otherwise they wouldn’t have connected to the grid, and there would be errors everywhere(i see errors about a secret only in session-map) about an incorrect secret. I use:

  registrationSecret:
    enabled: true
    value: "$SELENIUM_REGISTRATION_SECRET"

and the problem occurs even with the standard nodes (from the chart).

@VietND96
Copy link
Member

Ah ok, I can see. There are tests for feat registration secret, however the error is raised in logs itself without failing the test, hence we oversights

@VietND96 VietND96 added this to the 4.23.0 milestone Jul 26, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants