question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Diagnostics returning 500

See original GitHub issue

Release version

APIOps Toolkit for Azure APIM v4.0.4

Describe the bug

Running the tool against our APIM instance is failing with a 500 Internal Service error. I have tried disabling the diagnostic settings to remove them from the equation but the extract still fails.

Expected behavior

Export to complete successfully.

Actual behavior

Export is failing with error:

Microsoft.Extensions.Hosting.Internal.Host[9]
      BackgroundService failed
      System.InvalidOperationException: HTTP request to URI https://management.azure.com/subscriptions/{tenentId}/resourceGroups/{rg}/providers/Microsoft.ApiManagement/service/{apim instance}/diagnostics?api-version=2021-12-01-preview failed with status code 500. Content is '{"error":{"code":"InternalServerError","message":"Request processing failed due to internal error.","details":null}}'.
         at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)
         at common.HttpPipelineExtensions.GetContent(HttpPipeline pipeline, Uri uri, CancellationToken cancellationToken)
         at common.HttpPipelineExtensions.GetJsonObject(HttpPipeline pipeline, Uri uri, CancellationToken cancellationToken)
         at common.HttpPipelineExtensions.ListJsonObjects(HttpPipeline pipeline, Uri uri, CancellationToken cancellationToken)+MoveNext()
         at common.HttpPipelineExtensions.ListJsonObjects(HttpPipeline pipeline, Uri uri, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
         at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs:line 232
         at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 77
         at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 77
         at System.Threading.Tasks.Parallel.<>c__54`1.<<ForEachAsync>b__54_0>d.MoveNext()
      --- End of stack trace from previous location ---
         at common.IAsyncEnumerableExtensions.ForEachParallel[T](IAsyncEnumerable`1 enumerable, Func`2 action, CancellationToken cancellationToken)
         at extractor.Diagnostic.ExportAll(ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, GetRestResource getRestResource, ILogger logger, CancellationToken cancellationToken)
         at extractor.Service.Export(ServiceDirectory serviceDirectory, ServiceUri serviceUri, DefaultApiSpecification defaultSpecification, IEnumerable`1 apiNamesToExport, ListRestResources listRestResources, GetRestResource getRestResource, DownloadResource downloadResource, ILogger logger, CancellationToken cancellationToken)
         at extractor.Extractor.ExportService(CancellationToken cancellationToken)
         at extractor.Extractor.ExecuteAsync(CancellationToken cancellationToken)
         at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

Reproduction Steps

Run: .\Extractor\extractor.win-x64.exe --AZURE_SUBSCRIPTION_ID "" --AZURE_RESOURCE_GROUP_NAME "" --API_MANAGEMENT_SERVICE_NAME "" --API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH ./

Values redacted in this command.

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
waelkdouhcommented, Feb 28, 2023

Not to my knowledge. Will update here once we hear back. Che Keith us if we don’t get back within a week or so.

0reactions
blockingHDcommented, Mar 15, 2023

Closed as it is with MS to sort.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging an IIS 500 – Internal server error
The HTTP 500 error is a server-side error. While we understand that the problem is on the server end, the error is usually...
Read more >
How to Fix a 500 Internal Server Error
The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the website's server, but...
Read more >
What is “HTTP 500 Internal Server Error” and How to Fix It?
When you encounter an error 500, it means that the server has encountered an unexpected condition or configuration problem that prevents it from...
Read more >
500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response.
Read more >
500 Internal Server Error: What It Is And How To Fix It
The 500 internal server error is a common and annoying HTTP error. Here, we'll take a look at what they are and what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found