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]: Selenium Grid: opentelemetry-exporter-jaeger not found on classpath #11592

Closed
AndreasPetersen opened this issue Jan 25, 2023 · 3 comments · Fixed by SeleniumHQ/docker-selenium#1780

Comments

@AndreasPetersen
Copy link

What happened?

When upgrading from Selenium Grid 4.7.2 to 4.8.0, we are getting the following error on Selenium Grid Hub startup (with similar error on nodes).

We are using the following environment variables for setting the tracing:

JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://open-telemetry-collector:14260 -Dotel.resource.attributes=service.name=selenium-hub

This works like on Selenium 4.7.2.

How can we reproduce the issue?

Start the `selenium/hub:4.8.0-20230123` Docker image with the following env vars:


SE_SESSION_REQUEST_TIMEOUT=1800
SE_ENABLE_TRACING=true
JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://open-telemetry-collector:14260 -Dotel.resource.attributes=service.name=selenium-hub


### Relevant log output

```shell
2023-01-25 13:40:15,055 INFO supervisord started with pid 9
2023-01-25 13:40:16,057 INFO spawned: 'selenium-grid-hub' with pid 11
Tracing is enabled
Classpath will be enriched with these external jars :  /opt/selenium/selenium-http-jdk-client.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-exporter-jaeger/1.19.0/opentelemetry-exporter-jaeger-1.19.0.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-netty/1.50.2/grpc-netty-1.50.2.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-sdk/1.19.0/opentelemetry-sdk-1.19.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-exporter-common/1.19.0/opentelemetry-exporter-common-1.19.0.jar:/external_jars/https/repo1.maven.org/maven2/io/opentelemetry/opentelemetry-semconv/1.19.0-alpha/opentelemetry-semconv-1.19.0-alpha.jar:/external_jars/https/repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.10.0/okhttp-4.10.0.jar:/external_jars/https/repo1.maven.org/maven2/com/fasterxml/jackson/jr/jackson-jr-objects/2.13.4/jackson-jr-objects-2.13.4.jar:/external_jars/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.50.2/grpc-core-1....
2023-01-25 13:40:16,154 INFO success: selenium-grid-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
13:40:28.653 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
13:40:28.756 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.openqa.selenium.grid.Bootstrap.runMain(Bootstrap.java:77)
	at org.openqa.selenium.grid.Bootstrap.main(Bootstrap.java:70)
Caused by: io.opentelemetry.sdk.autoconfigure.spi.ConfigurationException: otel.traces.exporter set to "jaeger" but opentelemetry-exporter-jaeger not found on classpath. Make sure to add it as a dependency.
	at io.opentelemetry.sdk.autoconfigure.SpanExporterConfiguration.configureExporter(SpanExporterConfiguration.java:90)
	at io.opentelemetry.sdk.autoconfigure.SpanExporterConfiguration.lambda$configureSpanExporters$0(SpanExporterConfiguration.java:69)
	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:178)
	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1621)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at io.opentelemetry.sdk.autoconfigure.SpanExporterConfiguration.configureSpanExporters(SpanExporterConfiguration.java:64)
	at io.opentelemetry.sdk.autoconfigure.TracerProviderConfiguration.configureTracerProvider(TracerProviderConfiguration.java:49)
	at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:347)
	at org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer.createTracer(OpenTelemetryTracer.java:81)
	at org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer.getInstance(OpenTelemetryTracer.java:60)
	at org.openqa.selenium.grid.log.LoggingOptions.getTracer(LoggingOptions.java:94)
	at org.openqa.selenium.grid.commands.Hub.createHandlers(Hub.java:122)
	at org.openqa.selenium.grid.TemplateGridServerCommand.asServer(TemplateGridServerCommand.java:48)
	at org.openqa.selenium.grid.commands.Hub.execute(Hub.java:228)
	at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$4(TemplateGridCommand.java:129)
	at org.openqa.selenium.grid.Main.launch(Main.java:83)
	at org.openqa.selenium.grid.Main.go(Main.java:57)
	at org.openqa.selenium.grid.Main.main(Main.java:42)
	... 6 more
2023-01-25 13:40:30,862 INFO exited: selenium-grid-hub (exit status 1; not expected)
Trapped SIGTERM/SIGINT/x so shutting down supervisord...
2023-01-25 13:42:01,957 WARN received SIGTERM indicating exit request
Shutdown complete

Operating System

selenium/hub:4.8.0-20230123 Docker image

Selenium version

4.8.0

What are the browser(s) and version(s) where you see this issue?

Selenium Grid Hub

What are the browser driver(s) and version(s) where you see this issue?

Selenium Grid Hub

Are you using Selenium Grid?

4.8.0

@github-actions
Copy link

@AndreasPetersen, 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!

@diemol
Copy link
Member

diemol commented Jan 25, 2023

Most likely the cause is that the available dependencies in the Base image do not match the released Open Telemetry version and the grpc version. @AndreasPetersen, would you like to send a PR updating them on the Base image?

@AndreasPetersen
Copy link
Author

I'll have a look, sure

AndreasPetersen added a commit to AndreasPetersen/docker-selenium that referenced this issue Jan 27, 2023
diemol pushed a commit to SeleniumHQ/docker-selenium that referenced this issue Jan 30, 2023
paxaxel223 added a commit to paxaxel223/docker-selenium that referenced this issue Apr 25, 2023
prashanth-volvocars pushed a commit to prashanth-volvocars/docker-selenium that referenced this issue Jun 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants