-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Functionbeat can't find default credentials #17329
Comments
Re-opening to address this in product. The default functionbeat.yml file has various templates in place with I have only enabled the Cloudwatch function in the yml. But functionbeat throws the following error on deploy related to Google services:
Not until I commented out the entire section below (even though this section already has
We should address this in product instead of having end users workaround this by commenting out sections of the yml. |
Pinging @elastic/integrations-services (Team:Services) |
## What does this PR do? This PR moves retrieving a GCP token to a later stage of running Functionbeat. From now on tokens are only needed when the operations require it. ## Why is it important? Previously user was required to set a proper credentials file under `GOOGLE_APPLICATION_CREDENTIALS` environment variable regardless of the operation. Closes #17329
## What does this PR do? This PR moves retrieving a GCP token to a later stage of running Functionbeat. From now on tokens are only needed when the operations require it. ## Why is it important? Previously user was required to set a proper credentials file under `GOOGLE_APPLICATION_CREDENTIALS` environment variable regardless of the operation. Closes elastic#17329 (cherry picked from commit c2efa09)
This PR moves retrieving a GCP token to a later stage of running Functionbeat. From now on tokens are only needed when the operations require it. Previously user was required to set a proper credentials file under `GOOGLE_APPLICATION_CREDENTIALS` environment variable regardless of the operation. Closes elastic#17329 (cherry picked from commit c2efa09)
## What does this PR do? This PR moves retrieving a GCP token to a later stage of running Functionbeat. From now on tokens are only needed when the operations require it. ## Why is it important? Previously user was required to set a proper credentials file under `GOOGLE_APPLICATION_CREDENTIALS` environment variable regardless of the operation. Closes #17329 (cherry picked from commit c2efa09)
…g it (#21076) * Add Known issues section with an issue about Functionbeat * Do not need Google credentials before using it (#21072) This PR moves retrieving a GCP token to a later stage of running Functionbeat. From now on tokens are only needed when the operations require it. Previously user was required to set a proper credentials file under `GOOGLE_APPLICATION_CREDENTIALS` environment variable regardless of the operation. Closes #17329 (cherry picked from commit c2efa09)
…re using it (elastic#21076) * Add Known issues section with an issue about Functionbeat * Do not need Google credentials before using it (elastic#21072) This PR moves retrieving a GCP token to a later stage of running Functionbeat. From now on tokens are only needed when the operations require it. Previously user was required to set a proper credentials file under `GOOGLE_APPLICATION_CREDENTIALS` environment variable regardless of the operation. Closes elastic#17329 (cherry picked from commit 98bb86d)
- Steps to Reproduce:
1. Add in set aws creds in powershell
2. Add configs:
`functionbeat.provider.aws.endpoint: "s3.amazonaws.com"
functionbeat.provider.aws.deploy_bucket: "fn-deploy"
functionbeat.provider.aws.functions:
name: cloudwatch-to-es
enabled: true
type: cloudwatch_logs
triggers:
filter_pattern: "ERROR"
setup.kibana:
host: "000:5601"
output.elasticsearch:
hosts: ["000:9200"]
ssl.certificate: "path/to/pem"
protocol: "https"
username: "elastic"
password: "changeme"`
3. In powershell as admin: ./functionbeat -v -e -d "*" deploy cloudwatch-to-es
Logs:
2020-03-30T09:44:40.610-0400 INFO instance/beat.go:622 Home path: [C:\Program Files\Functionbeat] Config path: [C:\Program Files\Functionbeat] Data path: [/tmp] Logs path: [/tmp/logs] 2020-03-30T09:44:40.611-0400 DEBUG [beat] instance/beat.go:674 Beat metadata path: \tmp\meta.json 2020-03-30T09:44:40.612-0400 INFO instance/beat.go:630 Beat ID: c0fcb17c-41c2-4384-bd71-a0ad65082391 2020-03-30T09:44:40.636-0400 DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadata: starting to fetch metadata, timeout=3s 2020-03-30T09:44:40.640-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for openstack after 1.0006ms. result=[provider:openstack, error=failed requesting openstack metadata: Get http://169.254.169.254/2009-04-04/meta-data/instance-id: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}] 2020-03-30T09:44:40.640-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for digitalocean after 2.9992ms. result=[provider:digitalocean, error=failed requesting digitalocean metadata: Get http://169.254.169.254/metadata/v1.json: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}] 2020-03-30T09:44:40.640-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for aws after 2.9992ms. result=[provider:aws, error=failed requesting aws metadata: Get http://169.254.169.254/2014-02-25/dynamic/instance-identity/document: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}] 2020-03-30T09:44:40.640-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for gcp after 2.9992ms. result=[provider:gcp, error=failed requesting gcp metadata: Get http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}] 2020-03-30T09:44:40.641-0400 DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadata: received disposition for az after 4.0017ms. result=[provider:az, error=failed requesting az metadata: Get http://169.254.169.254/metadata/instance/compute?api-version=2017-04-02: dial tcp 169.254.169.254:80: connectex: A socket operation was attempted to an unreachable network., metadata={}] 2020-03-30T09:44:40.641-0400 DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadata: fetchMetadata ran for 4.0017ms 2020-03-30T09:44:40.641-0400 INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected. 2020-03-30T09:44:40.641-0400 DEBUG [processors] processors/processor.go:101 Generated new processors: add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null **error while creating CLIManager: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information**.
I am using AWS, so im not sure why google is looking for credentials. I removed the gcp config info from the yaml file but its still giving me that error as an output.
My AWS credentials are in the .aws file in "C::/user/" as [ default ] and also in my environment variables.
I have confirmed that aws cli works so my credentials should be working and be accessible by functionbeat.
I have confirmed that my network has access to aws from cli so im not sure why its saying "A socket operation was attempted to an unreachable network" in the logs
I have tried everything to get it working, is there any other things I can try to see if I am doing something wrong? At this point this seems like a bug with finding my AWS credentials in my environment.
Version: 7.6.1
Operating System: Windows 10
Discuss Forum URL: https://discuss.elastic.co/t/functionbeat-not-finding-default-credentials/222784
Thanks for you help,
Patrice
The text was updated successfully, but these errors were encountered: