Elastic Fleet Agent Upgrade failing

Hi,

Whenever I try to upgrade an agent via fleet it fails with the following;

[elastic_agent][error] failed to dispatch actions, error: failed upgrade of agent binary: 2 errors occurred:
	* package 'C:\Program Files\Elastic\Agent\data\elastic-agent-9b2fec\downloads\elastic-agent-7.12.1-windows-x86_64.zip' not found: open C:\Program Files\Elastic\Agent\data\elastic-agent-9b2fec\downloads\elastic-agent-7.12.1-windows-x86_64.zip: The system cannot find the file specified.
	* fetching package failed: net/http: request canceled (Client.Timeout or context cancellation while reading body)

There is no reason why it should not be able to call out to pull the zip. Or is it expecting the file to be manually placed ?

Thanks in advance.

Following. I also found similiar errors on upgrade last week.
Was there more to your error messages, what happened after it couldn't find the file? In my example (in another post), the following errors gave additional info.

Hi @scottdfedorov,

It seems that at its core the errors are basically the same.
An attempt was made to pull down the upgrade zip file, this did not occur so when looking for the file locally it also error-ed out.

Not sure why yours is making reference to a sha512 or getting the extra fidelity in the errors though :confused:

I have tired upgrading the agent via fleet on a few builds and have yet to have it work correctly.

I've been able to upgrade some agents via Fleet in Kibana successfully. Specifically it seems the ones with full access to the internet (which is only a small subset of our servers).

Can you post all your logs from the agent you are trying to upgrade please?

The instance that I pulled those errors from has been torn down. However I should be able to re-create it over the weekend, assuming I still have the issue I can post the full logs then.

this is probably because our package got larger in size and is not possible for it to be downloaded in time on slower networks(before timeout kicks in as a prevention for getting stuck)
I will raise an issue and work on that.

workaround is to download archive, hash and asc file and store it inside download directory (location dependent on system used)

Hi @Michal_Pristas ,

That would make sense as my internet speed is not great where I am. I will test from the office at some point in the near future as the connection there is far better.

Thanks

1 Like

Hi @Michal_Pristas , I had a similiar issue, and downloaded the files and saved to the directory and that did not work.
Link to my topic.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

what might work is editing elastic-agent.yml file and setting agent.download.timeout to some larger value. by default it's 2 minutes. so setting this to 600 should do the trick. you need to restart agent service to pick up this option