webdevops / azure-resourcemanager-exporter

Prometheus exporter for Azure ResourceManager informations (infos, quotas, limits, usages, public IPs, portscanner)
MIT License
33 stars 17 forks source link

Panic- Server misbehaving #123

Open Sandhiya15061997 opened 1 month ago

Sandhiya15061997 commented 1 month ago

Team,

While I am using Azure resource manager exporter, I am getting below error message. This is not occurring frequently. Need help in fixing this issue. Below are log lines collected from exporter.

2024-09-23 03:44:07.192        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/metrics_azurerm_resources.go:66 2024-09-23 03:44:07.192  github.com/webdevops/go-common/azuresdk/armclient.(*SubscriptionsIterator).ForEachAsync.func1 2024-09-23 03:44:07.192        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/github.com/webdevops/go-common/azuresdk/armclient/iterator.subscriptions.go:113 2024-09-23 03:44:08.220  2024-09-22T22:14:08.220Z      panic azure-resourcemanager-exporter/metrics_azurerm_resources.go:78    Get "https://management.azure.com/subscriptions/*****************************/resourcegroups?api-version=2021-04-01": dial tcp: lookup management.azure.com on 10.0.0.10:53: server misbehaving {"collector": "resource", "subscriptionID": "****", "subscriptionName": "#############"} 2024-09-23 03:44:08.220  main.(MetricsCollectorAzureRmResources).collectAzureResourceGroup 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/metrics_azurerm_resources.go:78 2024-09-23 03:44:08.220  main.(MetricsCollectorAzureRmResources).Collect.func1 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/metrics_azurerm_resources.go:66 2024-09-23 03:44:08.220  github.com/webdevops/go-common/azuresdk/armclient.(*SubscriptionsIterator).ForEachAsync.func1 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/github.com/webdevops/go-common/azuresdk/armclient/iterator.subscriptions.go:113 2024-09-23 03:44:08.220  2024-09-22T22:14:08.220Z      error armclient/iterator.subscriptions.go:107   panic: Get "https://management.azure.com/subscriptions/******************************/resourcegroups?api-version=2021-04-01": dial tcp: lookup management.azure.com on 10.0.0.10:53: server misbehaving

2024-09-23 03:44:08.220  goroutine 707164 [running]: 2024-09-23 03:44:08.220  runtime/debug.Stack() 2024-09-23 03:44:08.220        /opt/hostedtoolcache/go/1.20.5/x64/src/runtime/debug/stack.go:24 +0x65 2024-09-23 03:44:08.220  github.com/webdevops/go-common/azuresdk/armclient.(SubscriptionsIterator).ForEachAsync.func1.1() 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/github.com/webdevops/go-common/azuresdk/armclient/iterator.subscriptions.go:104 +0x136 2024-09-23 03:44:08.220  panic({0x1f54520, 0xc01af0d5a0}) 2024-09-23 03:44:08.220        /opt/hostedtoolcache/go/1.20.5/x64/src/runtime/panic.go:884 +0x213 2024-09-23 03:44:08.220  go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x0?, 0x0?, {0x0?, 0x0?, 0xc010ae1320?}) 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/go.uber.org/zap/zapcore/entry.go:198 +0x65 2024-09-23 03:44:08.220  go.uber.org/zap/zapcore.(CheckedEntry).Write(0xc00f321ad0, {0x0, 0x0, 0x0}) 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/go.uber.org/zap/zapcore/entry.go:264 +0x3ec 2024-09-23 03:44:08.220  go.uber.org/zap.(SugaredLogger).log(0xc006bf8018, 0x4, {0x0?, 0xc01a5fa980?}, {0xc0006bbdb8?, 0x10?, 0x3adea0f?}, {0x0, 0x0, 0x0}) 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/go.uber.org/zap/sugar.go:295 +0xee 2024-09-23 03:44:08.220  go.uber.org/zap.(SugaredLogger).Panic(...) 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/vendor/go.uber.org/zap/sugar.go:153 2024-09-23 03:44:08.220  main.(MetricsCollectorAzureRmResources).collectAzureResourceGroup(0xc0005bfbd8, 0xc009338e78?, 0x7477af?, 0xc0001c00e0?) 2024-09-23 03:44:08.220        /home/runner/work/azure-resourcemanager-exporter/azure-resourcemanager-exporter/metrics_azurerm_resources.go:78 +0xc6 2024-09-23 03:44:08.220  main.(MetricsCollectorAzureRmResources).Collect.func1(0xc0002122e8?, 0xc00dc566e0?)

Sandhiya15061997 commented 1 month ago

Adding below details to the above issue,

Resource manager exporter-v23.6.1 Go version-go1.20.5 Error desc- Though we have serviceentry available in our cluster we are seeing Server misbehaving error as per logs attached above.