You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agent seems to work, but has a nasty java.lang.IllegalStateException: Agent could not be initialized message
Steps to reproduce
Run the agent 0.4.0 on windows. Workaround is to disable it, eg -Delastic.otel.universal.profiling.integration.enabled=false
Expected behavior
No nasty error
Debug logs
Click to expand
[otel.javaagent 2024-06-26 16:42:37:310 +0100] [main] ERROR co.elastic.otel.JvmtiAccess - Failed to load jvmti native library
java.lang.IllegalStateException: Native agent does not work on windows 10
at co.elastic.otel.JvmtiAccess.loadNativeLibrary(JvmtiAccess.java:153)
at co.elastic.otel.JvmtiAccess.doInit(JvmtiAccess.java:93)
at co.elastic.otel.JvmtiAccess.ensureInitialized(JvmtiAccess.java:82)
at co.elastic.otel.JvmtiAccess.startProfilerReturnChannelSocket(JvmtiAccess.java:60)
at co.elastic.otel.UniversalProfilingCorrelation.startProfilerReturnChannel(UniversalProfilingCorrelation.java:108)
at co.elastic.otel.UniversalProfilingProcessor.openProfilerSocket(UniversalProfilingProcessor.java:160)
at co.elastic.otel.UniversalProfilingProcessor.<init>(UniversalProfilingProcessor.java:123)
at co.elastic.otel.UniversalProfilingProcessorBuilder.build(UniversalProfilingProcessorBuilder.java:43)
at co.elastic.otel.UniversalProfilingProcessorAutoConfig.lambda$registerSpanProcessors$0(UniversalProfilingProcessorAutoConfig.java:79)
at co.elastic.otel.common.ChainingSpanProcessorsInstaller.createProcessorChain(ChainingSpanProcessorsInstaller.java:88)
at co.elastic.otel.common.ChainingSpanProcessorsInstaller.lambda$customize$0(ChainingSpanProcessorsInstaller.java:53)
at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.lambda$mergeCustomizer$13(AutoConfiguredOpenTelemetrySdkBuilder.java:637)
at io.opentelemetry.sdk.autoconfigure.TracerProviderConfiguration.configureTracerProvider(TracerProviderConfiguration.java:64)
at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:464)
at io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller.installOpenTelemetrySdk(OpenTelemetryInstaller.java:29)
at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:122)
at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:102)
at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:99)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer$1.run(AgentInitializer.java:53)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer$1.run(AgentInitializer.java:47)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer.execute(AgentInitializer.java:64)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer.initialize(AgentInitializer.java:46)
at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:57)
at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:45)
at co.elastic.otel.agent.ElasticAgent.premain(ElasticAgent.java:29)
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 java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
[otel.javaagent 2024-06-26 16:42:37:311 +0100] [main] ERROR co.elastic.otel.UniversalProfilingProcessorAutoConfig - Failed to initialize universal profiling integration, the feature won't work
java.lang.IllegalStateException: Agent could not be initialized
at co.elastic.otel.JvmtiAccess.ensureInitialized(JvmtiAccess.java:85)
at co.elastic.otel.JvmtiAccess.startProfilerReturnChannelSocket(JvmtiAccess.java:60)
at co.elastic.otel.UniversalProfilingCorrelation.startProfilerReturnChannel(UniversalProfilingCorrelation.java:108)
at co.elastic.otel.UniversalProfilingProcessor.openProfilerSocket(UniversalProfilingProcessor.java:160)
at co.elastic.otel.UniversalProfilingProcessor.<init>(UniversalProfilingProcessor.java:123)
at co.elastic.otel.UniversalProfilingProcessorBuilder.build(UniversalProfilingProcessorBuilder.java:43)
at co.elastic.otel.UniversalProfilingProcessorAutoConfig.lambda$registerSpanProcessors$0(UniversalProfilingProcessorAutoConfig.java:79)
at co.elastic.otel.common.ChainingSpanProcessorsInstaller.createProcessorChain(ChainingSpanProcessorsInstaller.java:88)
at co.elastic.otel.common.ChainingSpanProcessorsInstaller.lambda$customize$0(ChainingSpanProcessorsInstaller.java:53)
at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.lambda$mergeCustomizer$13(AutoConfiguredOpenTelemetrySdkBuilder.java:637)
at io.opentelemetry.sdk.autoconfigure.TracerProviderConfiguration.configureTracerProvider(TracerProviderConfiguration.java:64)
at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:464)
at io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller.installOpenTelemetrySdk(OpenTelemetryInstaller.java:29)
at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:122)
at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:102)
at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:99)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer$1.run(AgentInitializer.java:53)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer$1.run(AgentInitializer.java:47)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer.execute(AgentInitializer.java:64)
at io.opentelemetry.javaagent.bootstrap.AgentInitializer.initialize(AgentInitializer.java:46)
at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:57)
at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:45)
at co.elastic.otel.agent.ElasticAgent.premain(ElasticAgent.java:29)
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 java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
The text was updated successfully, but these errors were encountered:
The autoconfig will try to start the correlation on default settings, independent of whether the OS is supported or not. We should not do this and instead add pre-checks.
Describe the bug
Agent seems to work, but has a nasty
java.lang.IllegalStateException: Agent could not be initialized
messageSteps to reproduce
Run the agent 0.4.0 on windows. Workaround is to disable it, eg -Delastic.otel.universal.profiling.integration.enabled=false
Expected behavior
No nasty error
Debug logs
Click to expand
The text was updated successfully, but these errors were encountered: