Skip to content
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

Failed to access metadata service ReadTimeOut #259

Closed
josselinchevalay opened this issue Sep 21, 2018 · 4 comments
Closed

Failed to access metadata service ReadTimeOut #259

josselinchevalay opened this issue Sep 21, 2018 · 4 comments

Comments

@josselinchevalay
Copy link

josselinchevalay commented Sep 21, 2018

Hello all,

A bit context to begin, currently i try to use fluent-plugin-google-cloud to send logs from docker container (redis) on google stackdriver logging. so for my test i have locally two container :

  • fluentd (1.2.5) + ruby (2.5.1) + fluent-plugin-google-cloud (0.6.25.1)
  • redis

in my company we have a http(s)-proxy enable.

my fluent.conf

<source>
    @type forward
    port 24224
  </source>
  <match *.**>
    @type google_cloud
    project_id "my-test"
  </match>

My issue : i can't send my local docker logs on GOOGLE STACKDRIVER LOGGING.

when i start fluentd with trace display i see that

2018-09-21 08:55:42 +0000 [error]: fluent/log.rb:362:error: Failed to access metadata service: error_class=Net::ReadTimeout error="Net::ReadTimeout"

my first analyse : is always DNS

so after a quick lock into out_google_cloud.rb i notice that
https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/blob/master/lib/fluent/plugin/out_google_cloud.rb#L246 and i can't ping that. But i'm not totally sure about that.

AND in my trace log i see that :
2018-09-21 09:09:44 +0000 [trace]: #0 fluent/log.rb:281:trace: adding metadata instance=47401531773880 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=nil, tag=nil, variables=nil> 2018-09-21 09:09:44 +0000 [trace]: #0 fluent/log.rb:281:trace: writing events into buffer instance=47401531773880 metadata_size=1
any idea to solve that ?

Regards

@igorpeshansky
Copy link
Member

Are you running this container on either GCP or AWS cloud instances? If not, your use case is not supported. This plugin currently requires a GCP/AWS metadata server to construct the necessary data for communicating with Stackdriver logging.

@josselinchevalay
Copy link
Author

Nope i try on premise -> google cloud. so thanks a lot

@evmin02
Copy link

evmin02 commented May 15, 2019

This is a shame. As it used to work before (plugin version version 0.5.2).

@igorpeshansky
Copy link
Member

@evmin02, the on-prem use case was never officially supported by the plugin. v0.5.2 is nearly 3 years old and used a deprecated (v1) API. It ended up conjuring values out of thin air when those values were not available from the environment, which made it appear to work, but only if you didn't care about resource attribution for your logs.
This hacky way is still technically possible (just override the instance_id and zone in the config to point to some nonexistent instance), but it's neither sanctioned nor recommended, and will cause annoying glitches for you in other parts of Stackdriver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants