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

ECS Fargate Sidecar: X-Ray throws warnings at startup #62

Open
cynicaljoy opened this issue Sep 23, 2020 · 1 comment
Open

ECS Fargate Sidecar: X-Ray throws warnings at startup #62

cynicaljoy opened this issue Sep 23, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cynicaljoy
Copy link

I'm deploying my application as a container that's deployed to ECS Fargate w/X-Ray Daemon as a sidecar. All of the expected traces are showing up in X-Ray but my OCD is pained by the WARN logs that show up on startup 😂

At the startup of my application I get the following WARN logs:

java.net.ConnectException: Invalid argument (connect failed)
	at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
	at java.base/java.net.Socket.connect(Socket.java:609)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
	at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341)
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at com.amazonaws.xray.plugins.EC2MetadataFetcher.fetchString(EC2MetadataFetcher.java:159)
	at com.amazonaws.xray.plugins.EC2MetadataFetcher.fetchToken(EC2MetadataFetcher.java:123)
	at com.amazonaws.xray.plugins.EC2MetadataFetcher.fetch(EC2MetadataFetcher.java:72)
	at com.amazonaws.xray.plugins.EC2Plugin.<init>(EC2Plugin.java:72)
	at com.amazonaws.xray.plugins.EC2Plugin.<init>(EC2Plugin.java:67)
	at com.amazonaws.xray.AWSXRayRecorderBuilder.withDefaultPlugins(AWSXRayRecorderBuilder.java:216)
	at com.amazonaws.xray.agent.runtime.config.XRaySDKConfiguration.init(XRaySDKConfiguration.java:204)
	at com.amazonaws.xray.agent.runtime.config.XRaySDKConfiguration.init(XRaySDKConfiguration.java:158)
	at com.amazonaws.xray.agent.runtime.AgentRuntimeLoader.configureXRay(AgentRuntimeLoader.java:74)
	at com.amazonaws.xray.agent.runtime.AgentRuntimeLoader.init(AgentRuntimeLoader.java:53)
	at com.amazonaws.xray.agent.runtime.AgentRuntimeLoader.init(AgentRuntimeLoader.java:37)
	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 software.amazon.disco.agent.plugin.PluginDiscovery.apply(PluginDiscovery.java:172)
	at software.amazon.disco.agent.DiscoAgentTemplate.install(DiscoAgentTemplate.java:145)
	at software.amazon.disco.agent.DiscoAgentTemplate.install(DiscoAgentTemplate.java:107)
	at software.amazon.disco.agent.DiscoAgent.impl(DiscoAgent.java:91)
	at software.amazon.disco.agent.DiscoAgent.premain(DiscoAgent.java:52)
	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)```


@willarmiros
Copy link
Contributor

Hi @cynicaljoy,
Glad to hear the agent is working well for you! Those logs look like they're from the EC2 plugin auto-detection. I'll lower those errors to debug level so they won't appear by default. Sorry for the inconvenience!

@willarmiros willarmiros self-assigned this Sep 28, 2020
@willarmiros willarmiros added the bug Something isn't working label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants