-
Notifications
You must be signed in to change notification settings - Fork 99
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
HTTP issues tryin' to get the metadata #811
Comments
@bcoe any ideas on this one? If I recall correctly, you previously worked with this topic in gcp-metadata. edit Hi, @noguilty4you! |
@stephenplusplus, Stephen hi, we're waiting for @bcoe's response? =) |
@stephenplusplus @noguilty4you how are credentials being provided to the logging client, are you using During the initial bootstrapping step, an attempt should not be made to connect to |
@bcoe, thank you for response. In my case with Yandex.Cloud I pass the credentials explicitly: Which credentials should I pass to prevent the request to 169.254.169.254? google-stackdriver-credentials.json content is: |
@noguilty4you mind providing the snippet of code you use to actually instantiate the client as well? 👍 I'm definitely surprised that the metadata server is being hit. |
@bcoe, OK, this is it.
|
@bcoe, let's spend some time to solve that. Otherwise I have to fork the thick pack of |
@noguilty4you thanks for following up. @simonz130 wanted to put this bug on your radar, what's odd to me, is if we've provided the |
@noguilty4you can you provide const context = {
service: 'something',
version: '1.1', //optional
}
const google_journals_options = {
logName: 'my-log',
serviceContext: context,
...
} It looks like the LoggingBunyan constructor attempts to detectServiceContext when your I'll patch the libraries to do better error handling shortly. But don't let me block you - the above should (hopefully) fix your issue asap. |
Update: I spent some time investigating if we should handle this in Nodejs-logging or Nodejs-logging-bunyan, but that breaks usage pattern for getenv. So I filed a bug within |
Hi there!
Previously we used DigitalOcean's managed k8s clusters and after the fix googleapis/google-auth-library-nodejs#787 all was OK, but now we moved our project to our country's local managed k8s provider - Yandex.Cloud and so we're experiencing some errors with your lib which we love so much.
Supposition
When an instance of
Logging
class of your lib is running, it tries to usegcp-metadata
(during the./metadata.js
wrapper) lib to understand the current execution context (GKE, GCE, ...). This lib handles EHOSTDOWN etc. but don't handles the FetchError and throws an exception which stops your initialization process.Error log
FetchError: Response timeout while trying to fetch
http://169.254.169.254/computeMetadata/v1/instance (over 3000ms)
at Timeout._onTimeout (/app/node_modules/node-fetch/lib/index.js:387:12)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Environment details
OS
: node:13.8.0 / node:13.8.0-alpine3.11 (docker images), Yandex.Cloud managed k8s (1.16)
node.js version
: 13.8.0npm version
: 6.14.4@google-cloud/logging
version: 7.3.0The text was updated successfully, but these errors were encountered: