Unix Domain sockets (UDS) error when starting profiler
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- java
- Domain
- observability-sre
Research direction
Start in com.datadog.profiling.uploader.ProfileUploader at ProfileUploader.java:151 and follow how ProfilingAgent.run passes the configured agent URL. Compare the behavior with the linked issue and pull request, then verify that the Java Profiler agent starts without an error when the agent is configured with a Unix domain socket.
Written by the indexing model from the issue text.
Description
Tracer Version(s)
Starting in 1.52.1
Java Version(s)
24.0.2
JVM Vendor
Amazon Corretto
Bug Report
When starting a Java app with the profiler enabled and Unix domain sockets are configured -Ddd.trace.agent.url=unix:///var/run/datadog/apm.socket, the following error occurs:
[dd.trace 2025-08-21 03:20:49:154 +0000] [dd-task-scheduler] INFO datadog.trace.agent.core.StatusLogger - DATADOG TRACER CONFIGURATION {"version":"1.52.1~6b6db17410","os_name":"Linux","os_version":"5.14.0-503.21.1.el9_5.x86_64","architecture":"amd64","lang":"jvm","lang_version":"24.0.2","jvm_vendor":"Amazon.com Inc.","jvm_version":"24.0.2+12-FR","java_class_version":"68.0","http_nonProxyHosts":"null","http_proxyHost":"null","enabled":true,"service":"adserver-external-production-4969","agent_url":"unix:///var/run/datadog/apm.socket","agent_unix_domain_socket":"/var/run/datadog/apm.socket","agent_error":true,"debug":false,"trace_propagation_style_extract":["datadog","tracecontext","baggage"],"trace_propagation_style_inject":["datadog","tracecontext","baggage"],"analytics_enabled":false,"priority_sampling_enabled":true,"logs_correlation_enabled":true,"profiling_enabled":true,"remote_config_enabled":true,"debugger_enabled":false,"debugger_exception_enabled":false,"debugger_span_origin_enabled":false,"debugger_distributed_debugger_enabled":false,"appsec_enabled":"ENABLED_INACTIVE","rasp_enabled":true,"telemetry_enabled":true,"telemetry_dependency_collection_enabled":true,"telemetry_log_collection_enabled":true,"dd_version":"","health_checks_enabled":true,"configuration_file":"no config file present","runtime_id":"b88ebcb9-2eee-4d72-857c-041082502a62","logging_settings":{"levelInBrackets":false,"dateTimeFormat":"'[dd.trace 'yyyy-MM-dd HH:mm:ss:SSS Z']'","logFile":"System.err","configurationFile":"simplelogger.properties","showShortLogName":false,"showDateTime":true,"showLogName":true,"jsonEnabled":false,"showThreadName":true,"defaultLogLevel":"INFO","warnLevelString":"WARN","embedException":false},"cws_enabled":false,"cws_tls_refresh":5000,"datadog_profiler_enabled":true,"datadog_profiler_safe":true,"datadog_profiler_enabled_overridden":false,"data_streams_enabled":false}
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:544)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:556)
Caused by: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but was 'unix'
at datadog.okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1328)
at datadog.okhttp3.HttpUrl.get(HttpUrl.java:916)
at com.datadog.profiling.uploader.ProfileUploader.(ProfileUploader.java:151)
at com.datadog.profiling.uploader.ProfileUploader.(ProfileUploader.java:134)
at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:131)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 16 more
[dd.trace 2025-08-21 03:20:48:794 +0000] [main] SEND_TELEMETRY datadog.trace.bootstrap.Agent - Throwable thrown while starting profiling agent
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at datadog.trace.bootstrap.Agent.startProfilingAgent(Agent.java:1252)
at datadog.trace.bootstrap.Agent.start(Agent.java:379)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at datadog.trace.bootstrap.AgentBootstrap.agentmainImpl(AgentBootstrap.java:159)
at datadog.trace.bootstrap.AgentBootstrap.agentmain(AgentBootstrap.java:73)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at datadog.trace.bootstrap.AgentPreCheck.continueBootstrap(AgentPreCheck.java:166)
at datadog.trace.bootstrap.AgentPreCheck.agentmain(AgentPreCheck.java:24)
at datadog.trace.bootstrap.AgentPreCheck.premain(AgentPreCheck.java:17)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
This appears to have been introduced by https://github.com/DataDog/dd-trace-java/pull/9339 The 'http://' was previously hardcoded to avoid this error, per similar bug: https://github.com/DataDog/dd-trace-java/issues/7165 & Fix: https://github.com/DataDog/dd-trace-java/pull/7166
Expected Behavior
Java Profiler agent to startup without error when configured with Unix Domain Sockets
- Dominant language
- Java
- Stars
- 737
- Forks
- 361
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 173
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/dd-trace-java
-
type: feature request
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
DataDog/dd-trace-java#10245 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 62/100
DataDog/dd-trace-java#12608 ·
-
type: bug report
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DataDog/dd-trace-java#12597 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DataDog/dd-trace-java#12540 · 3 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
DataDog/dd-trace-java#12480 ·
All issues in DataDog/dd-trace-java
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·