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

Elastic-Agent snapshot downloader ignores proxy settings #27903

Closed
michel-laterman opened this issue Sep 13, 2021 · 1 comment · Fixed by #27904
Closed

Elastic-Agent snapshot downloader ignores proxy settings #27903

michel-laterman opened this issue Sep 13, 2021 · 1 comment · Fixed by #27904
Assignees
Labels
bug Team:Elastic-Agent Label for the Agent team

Comments

@michel-laterman
Copy link
Contributor

Elastic-Agent (running under fleet) does not use any proxies settings when looking up snapshot locations for artifact upgrade.
Snapshot lookup uses the standard library client (gohttp is an alias for net/http)

artifactsURI := fmt.Sprintf("https://artifacts-api.elastic.co/v1/search/%s-SNAPSHOT/elastic-agent", version)
resp, err := gohttp.Get(artifactsURI)

This ignores any settings defined in fleet.yml, specifically:

agent:
  download:
    proxy_url: PROXY_ADDRESS

If the agent is running behind an Internet proxies the logs will show that timeouts on the search request occured:

{"log.level":"error","@timestamp":"2021-09-13T20:28:18.431Z","log.origin":{"file.name":"log/reporter.go","file.line":36},"message":"2021-09-13T20:28:18Z - message: Application: [59f55f0a-93bf-4462-ba7f-3de75161046a]: State changed to FAILED: initiating verifier: failed to detect remote snapshot repo, proceeding with configured: Get \"https://artifacts-api.elastic.co/v1/search/7.15.0-SNAPSHOT/elastic-agent\": dial tcp 35.188.12.98:443: i/o timeout - type: 'ERROR' - sub_type: 'FAILED'","ecs.version":"1.6.0"}

For confirmed bugs, please report:

  • Version: 7.14.1
  • Steps to Reproduce:
  1. Deploy ES + Kibana v7.15.0-SNAPSHOT
  2. Deploy fleet/elastic-agent v7.14.1 behind an Internet proxy
  3. Attempt to use the Fleet UI to update the running process to v7.15.0-SNAPSHOT
@michel-laterman michel-laterman added bug Team:Elastic-Agent Label for the Agent team labels Sep 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants