Dynatrace / libbuildpack-dynatrace

Common resources used for Dynatrace integration in Cloudfoundry Buildpacks.
Apache License 2.0
1 stars 5 forks source link

Dynatrace Agent cannot be fetched: context deadline exceeded #23

Closed ryanmoran closed 1 year ago

ryanmoran commented 1 year ago

Hi from the Cloud Foundry Buildpacks Node.js Team!

We have a user reporting an issue with the latest version of libbuildpack-dynatrace. Specifically, they are using a buildpack after v1.7.72 which incorporated https://github.com/cloudfoundry/nodejs-buildpack/pull/456. It seems that they are having some sort of timeout issue fetching the agent with this latest update.

Here are their logs:

11:10:26.54+0530 [STG/0] OUT        DEBUG: Contrast Security after compile hook
11:10:26.54+0530 [STG/0] OUT        Contrast Security no credentials found. Will not write environment files.
11:10:26.54+0530 [STG/0] OUT        DEBUG: Checking for enabled dynatrace service...
11:10:26.54+0530 [STG/0] OUT        DEBUG: Found one matching service: foo-dynatrace
11:10:26.54+0530 [STG/0] OUT        Dynatrace service credentials found. Setting up Dynatrace OneAgent.
11:10:26.54+0530 [STG/0] OUT        Downloading 'https://<foo>/apm-service-broker-s3-new/XI7VF-BuRX2uApscZ0wwG_d02009af-1682-4506-937e-61b5614b5f5a' to '/tmp/paasInstaller.sh'
11:10:26.88+0530 [STG/0] OUT        DEBUG: Making /tmp/paasInstaller.sh executable...
11:10:26.88+0530 [STG/0] OUT -----> Starting Dynatrace OneAgent installer
11:10:26.88+0530 [STG/0] OUT 05:40:26 Installing to /tmp/app
11:10:26.89+0530 [STG/0] OUT 05:40:26 Extracting...
11:10:26.98+0530 [STG/0] OUT 05:40:26 Unpacking to '/tmp/app/dynatrace/oneagent' ...
11:10:28.40+0530 [STG/0] OUT 05:40:28 Unpacking complete.
11:10:28.41+0530 [STG/0] OUT        Dynatrace OneAgent installed.
11:10:28.41+0530 [STG/0] OUT -----> Setting up Dynatrace OneAgent injection...
11:10:28.41+0530 [STG/0] OUT        DEBUG: Copy dynatrace-env.sh to /tmp/contents687094651/deps/0/profile.d/dynatrace-env.sh
11:10:28.41+0530 [STG/0] OUT        DEBUG: Open /tmp/contents687094651/deps/0/profile.d/dynatrace-env.sh for modification...
11:10:28.41+0530 [STG/0] OUT        DEBUG: Setting LD_PRELOAD...
11:10:28.41+0530 [STG/0] OUT        DEBUG: Setting DT_LOGSTREAM to stdout...
11:10:28.41+0530 [STG/0] OUT        DEBUG: Preparing custom properties...
11:10:28.41+0530 [STG/0] OUT        DEBUG: Fetching updated OneAgent configuration from tenant...
11:10:34.41+0530 [STG/0] OUT        **ERROR** Failed to fetch OneAgent config from API: Get "https://foo/e//v1/deployment/installer/agent/processmoduleconfig": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
11:10:34.41+0530 [STG/0] OUT        **ERROR** Error during agent config update: Get "https://foo/e//v1/deployment/installer/agent/processmoduleconfig": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
11:10:34.41+0530 [STG/0] OUT        **ERROR** After Compile: Get "https://foo/e//v1/deployment/installer/agent/processmoduleconfig": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
11:10:34.56+0530 [STG/0] ERR Failed to compile droplet: Failed to run finalize script: exit status 13
11:10:34.56+0530 [STG/0] OUT Exit status 223
11:10:34.74+0530 [STG/0] OUT Cell 3efb2ded-7105-442f-8086-7d766ab43e4c stopping instance 68c36c4c-f58b-435e-967c-dcf0a3537cc7
11:10:34.74+0530 [STG/0] OUT Cell 3efb2ded-7105-442f-8086-7d766ab43e4c destroying container for instance 68c36c4c-f58b-435e-967c-dcf0a3537cc7
11:10:34.83+0530 [API/2] ERR Failed to stage build: staging failed
11:10:40.41+0530 [STG/0] OUT Cell 3efb2ded-7105-442f-8086-7d766ab43e4c successfully destroyed container for instance 68c36c4c-f58b-435e-967c-dcf0a3537cc7

cc/ @arthfl

arthfl commented 1 year ago

@ryanmoran This is a rather special case. They're activly blocking any GET requests during the app staging process. The only reason the previous GET request to download our installer works, is because they implemented a very customized proxy-ish solution to that.

That has to get fixed on the networking level, nothing we can handle in the buildpack-integration i'm afraid.