Azure App Service Extension - 403 Forbidden Errors
BlairMcc
Posted on
Dec 09 2022
Hiya,
We haven't been able to reliably bring data through APM for a week or so now. After looking into it today this is what we've found in the agent logs after restaring the RaygunAgent.exe process.
One log file seems to suggest everything has started up okay
[09/12/2022 02:09:24.084] AgentHost:Start : Starting Agent (Version: 1.0.1413.0) [09/12/2022 02:09:24.099] AgentHost:Start : Timing frequency is 10000000 [09/12/2022 02:09:24.302] AgentHost:Start : Starting Agent Management client on port 2790 [09/12/2022 02:09:24.662] AgentHost:StartAgentRegistration : Waiting for the Agent to register with Raygun (https://api2.raygun.com) [09/12/2022 02:09:24.662] AgentManagementService:TryRegisterAndWaitForRegisteredState : Attempting registration [09/12/2022 02:09:24.693] AgentManagementService:GetAgentDetails : Error retrieving environment info: No such interface supported
[09/12/2022 02:09:25.740] AgentManagementService:GetAgentDetails : Error retrieving CPU info: No such interface supported
[09/12/2022 02:09:26.162] AgentManagementService:Register : Agent registration status: Registered [09/12/2022 02:09:26.396] AgentHost:StartProcessingPipeline : Listening for network activity using File IPC [09/12/2022 02:09:26.396] AgentHost:StartProcessingPipeline : Receiver is listening on a single channel [09/12/2022 02:09:26.396] AgentHost:StartProcessingPipeline : Starting Live Blacklisting Worker thread [09/12/2022 02:09:26.412] AgentHost:StartProcessingPipeline : Starting Sampling Worker thread [09/12/2022 02:09:26.412] AgentHost:StartProcessingPipeline : Starting 2 Post Processing Worker(s) [09/12/2022 02:09:26.428] AgentHost:StartProcessingPipeline : Starting 2 Thread Detection Worker(s) [09/12/2022 02:09:26.428] AgentHost:StartProcessingPipeline : Starting Thread Correlation Worker thread [09/12/2022 02:09:26.428] AgentHost:StartProcessingPipeline : Starting Trace Manager thread [09/12/2022 02:09:26.428] AgentHost:StartProcessingPipeline : Starting Transmission Manager threads [09/12/2022 02:09:26.428] AgentHost:StartProcessingPipeline : Starting Trace Receiver thread [09/12/2022 02:09:26.443] AgentHost:StartProcessingPipeline : Starting API Message processor [09/12/2022 02:09:26.443] AgentHost:StartProcessingPipeline : Initialization completed, listening for data... [09/12/2022 02:09:26.443] AgentManagementService:TryRegisterAndWaitForRegisteredState : Agent successfully registered with ID: 092d4ca79aea4f93aba811a48841e5af
And then in other instance logs a few minutes later all we see are 403 Forbidden exceptions
[09/12/2022 02:13:49.216] FileAgentLogger:LogException : Exception: System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.HttpWebRequest.GetResponse() at Mindscape.Raygun.Agent.Services.Messaging.ApiRequestHandler.Execute[TRequest,TResponse](TRequest requestData, String apiKey, String apiEndpoint, String method) in C:\buildAgent\work\33c5785711afa534\src\Proton\Agent\Raygun.Agent.Core\Services\ApiRequestHandler.cs:line 36 at Mindscape.Raygun.Agent.Services.Messaging.AgentManagementService.CheckForMessages() in C:\buildAgent\work\33c5785711afa534\src\Proton\Agent\Raygun.Agent.Core\Services\Messaging\AgentManagementService.cs:line 348 at Mindscape.Raygun.Agent.Services.Messaging.ApiMessageProcessor.Execute() in C:\buildAgent\work\33c5785711afa534\src\Proton\Agent\Raygun.Agent.Core\Services\Messaging\ApiMessageProcessor.cs:line 33
We've checked that our Raygun_ApiKey is set as expected I'm curious what else we should be checking?
Edit - here is the output of the diagnostics webjob, all looks okay
[12/09/2022 02:24:29 > 051fa6: SYS INFO] Status changed to Initializing [12/09/2022 02:24:29 > 051fa6: SYS INFO] Run script 'run-diagnostics.ps1' with script host - 'PowerShellScriptHost' [12/09/2022 02:24:29 > 051fa6: SYS INFO] Status changed to Running [12/09/2022 02:24:31 > 051fa6: INFO] Running Raygun Agent status checks... [12/09/2022 02:24:31 > 051fa6: INFO] Agent status: Unknown [12/09/2022 02:24:31 > 051fa6: INFO] Agent test: Connected to the Raygun Agent v1.0.1413.0 on port 2790. [12/09/2022 02:24:31 > 051fa6: INFO] API test: Connected to the Raygun API at https://api2.raygun.com. [12/09/2022 02:24:31 > 051fa6: INFO] API key test: API key is valid [12/09/2022 02:24:31 > 051fa6: INFO] Profiler x86 test: 32-bit .NET Profiler found at C:\home\Raygun\Profiler\1.0.1413\x86\RaygunProfiler.dll. [12/09/2022 02:24:31 > 051fa6: INFO] Profiler x64 test: 64-bit .NET Profiler found at C:\home\Raygun\Profiler\1.0.1413\x64\RaygunProfiler.dll. [12/09/2022 02:24:31 > 051fa6: SYS INFO] Status changed to Success