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

error sending the request ---> System.Net.WebException: NameResolutionFailure #1590

Closed
ismeyueyue opened this issue Jul 21, 2022 · 6 comments

Comments

@ismeyueyue
Copy link

Self-Hosted Version

the lastest master branch

CPU Architecture

x86_64

Docker Version

20.10.8

Docker Compose Version

1.29.2

Steps to Reproduce

  1. installed self-hosted successfully in my owner server with all docker up healthy.
    image

  2. installed sentry unity sdk with upm.
    image

  3. started monitor my unity project with sentry unity sdk using follow test.

SentryUnity.Init(o =>
{
    o.Dsn = "http://b47cae695xxxxd7a46@host:9000/11";
    o.Debug = true;
    o.TracesSampleRate  = 1.0;
});

try
{
    throw new Exception("Test");
}
catch (Exception ex)
{
    SentrySdk.CaptureException(ex);
}

Expected Result

the self-hosted sentry should receive the Exception.

Actual Result

My unity project console came out the follow errors
image

Sentry: (Error) Error while processing envelope (event ID: '4621cdxxxxxxx3b'). #1 in queue. System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: NameResolutionFailure
  at System.Net.WebConnection.Connect (System.Net.WebOperation operation, System.Threading.CancellationToken cancellationToken) [0x00044] in <c7c32602e34d422f9c1a5e3ed52782b2>:0 
  at System.Net.WebConnection.InitConnection (System.Net.WebOperation operation, System.Threading.CancellationToken cancellationToken) [0x000cc] in <c7c32602e34d422f9c1a5e3ed52782b2>:0 
  at System.Net.WebOperation.Run () [0x0009a] in <c7c32602e34d422f9c1a5e3ed52782b2>:0 
  at System.Net.WebCompletionSource`1[T].WaitForCompletion () [0x00094] in <c7c32602e34d422f9c1a5e3ed52782b2>:0 
  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <c7c32602e34d422f9c1a5e3ed52782b2>:0 
  at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00378] in <f0a1e2b28d5249f4a1d6ad1969e1daaf>:0 
   --- End of inner exception stack trace ---
  at System.Net.Http.MonoWebRequestHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00509] in <f0a1e2b28d5249f4a1d6ad1969e1daaf>:0 
  at Sentry.Internal.Http.RetryAfterHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x0007f] in /sentry-unity/src/sentry-dotnet/src/Sentry/Internal/Http/RetryAfterHandler.cs:65 
  at System.Net.Http.HttpClient.SendAsyncWorker (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) [0x000e8] in <f0a1e2b28d5249f4a1d6ad1969e1daaf>:0 
  at Sentry.Internal.Http.HttpTransport.SendEnvelopeAsync (Sentry.Protocol.Envelopes.Envelope envelope, System.Threading.CancellationToken cancellationToken) [0x00080] in /sentry-unity/src/sentry-dotnet/src/Sentry/Internal/Http/HttpTransport.cs:46 
  at Sentry.Internal.BackgroundWorker.WorkerAsync () [0x001d8] in /sentry-unity/src/sentry-dotnet/src/Sentry/Internal/BackgroundWorker.cs:130 
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
Sentry.Unity.Integrations.UnityLogHandlerIntegration:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) (at /sentry-unity/src/Sentry.Unity/Integrations/UnityLogHandlerIntegration.cs:80)
UnityEngine.Debug:LogError (object)
Sentry.Unity.UnityLogger:Log (Sentry.SentryLevel,string,System.Exception,object[]) (at /sentry-unity/src/Sentry.Unity/UnityLogger.cs:47)
Sentry.Extensibility.DiagnosticLoggerExtensions:LogIfEnabled<System.Nullable`1<Sentry.SentryId>, int> (Sentry.Extensibility.IDiagnosticLogger,Sentry.SentryLevel,System.Exception,string,System.Nullable`1<Sentry.SentryId>,int) (at /sentry-unity/src/sentry-dotnet/src/Sentry/Extensibility/DiagnosticLoggerExtensions.cs:410)
Sentry.Extensibility.DiagnosticLoggerExtensions:LogError<System.Nullable`1<Sentry.SentryId>, int> (Sentry.SentryOptions,string,System.Exception,System.Nullable`1<Sentry.SentryId>,int) (at /sentry-unity/src/sentry-dotnet/src/Sentry/Extensibility/DiagnosticLoggerExtensions.cs:268)
Sentry.Internal.BackgroundWorker/<WorkerAsync>d__19:MoveNext () (at /sentry-unity/src/sentry-dotnet/src/Sentry/Internal/BackgroundWorker.cs:142)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException (System.Exception)
Sentry.Internal.Http.HttpTransport/<SendEnvelopeAsync>d__3:MoveNext () (at /sentry-unity/src/sentry-dotnet/src/Sentry/Internal/Http/HttpTransport.cs:48)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Net.Http.HttpResponseMessage>:SetException (System.Exception)
Sentry.Internal.Http.RetryAfterHandler/<SendAsync>d__8:MoveNext () (at /sentry-unity/src/sentry-dotnet/src/Sentry/Internal/Http/RetryAfterHandler.cs:73)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

And my self-hosted got nothing
image

@ismeyueyue ismeyueyue changed the title error sending the request ---> System.Net.WebException: Error: NameResolutionFailure error sending the request ---> System.Net.WebException: NameResolutionFailure Jul 21, 2022
@aminvakil
Copy link
Collaborator

AFAICS this is related to sentry unity sdk, do you have a reason to believe it's related to self-hosted? Does it work with Sentry SaaS ?

@ismeyueyue
Copy link
Author

ismeyueyue commented Jul 22, 2022

@aminvakil thanks for your replay.

well, it worked on the sentry.io using the same code.
image

I think the self-hosted is set up successfully which I can open the web link http://host:9000/, is there any other way to verify it, and help me to figure out this problem

@aminvakil
Copy link
Collaborator

If you have a reverse proxy in front of your sentry (9000 port), try bypassing it and hit sentry on 9000 port directly.

Also try docker compose logs -f and send your request, then see if you can get a clue from logs.

@ethanhs
Copy link
Contributor

ethanhs commented Jul 27, 2022

I believe this is really getsentry/sentry-dotnet#1817, since the Unity SDK depends on the dotnet SDK.

@bruno-garcia, does that makes sense? If so, is the fix here a new sentry-unity release? Looks like the dependency was bumped yesterday: getsentry/sentry-unity#911

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@ethanhs
Copy link
Contributor

ethanhs commented Aug 18, 2022

The related sentry-unity issue is closed, so I think we are good here. @ishuyueyue if you run into further problems, feel free to open a new issue!

@ethanhs ethanhs closed this as completed Aug 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2022
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

3 participants