Agent 003 status: The repository is not reachable

2,371 views
Skip to first unread message

Muneeb Alam Khan

unread,
Jan 25, 2023, 4:58:33 AM1/25/23
to Wazuh mailing list
When I am trying to upgrade agent remotely getting this error:
Agent 003 status: The repository is not reachable


please help !!
Message has been deleted
Message has been deleted

Christian Borla

unread,
Jan 25, 2023, 6:10:46 AM1/25/23
to Wazuh mailing list
Hi! I hope you are doing fine!

I would like to know Which version of Wazuh Manager do you use?, and Agent version too?
From which version to which version do you want to upgrade? and Agent OS?
Which upgrade method are you using, API or Command line?
The error: Agent 003 status: The repository is not reachable,  means the manager can't find an Agent version in the external repository. Does the manager have an internet connection?
Let me know if that helps.
Regards.

Muneeb Alam Khan

unread,
Jan 25, 2023, 10:35:11 PM1/25/23
to Wazuh mailing list
Hi I have recently updated my wazuh manager , indexer and dashboard right now my version is   4.3.10 . Previously it was 4.3.6.
Agent versions are 4.3.6 and want to upgrade them to 4.3.10. I was trying to upgrade my agents from wazuh server using CLI and then encountered this error. Then i tried to uninstall agent manually from the system and now when I am trying to restart the agent on the system it is giving the error , I have attached the error. Can you please help ?

Untitled.png

Muneeb Alam Khan

unread,
Jan 26, 2023, 12:51:33 AM1/26/23
to Wazuh mailing list
I have solved this by installing a new agent on a new machine then I copied the ossec.conf from newly installed system and copied it to the affected system.. now  the agent is back online !! this issue should have resolved by re-installing agent when I did it separately on that machine but that didn't work.. anyways thanks for the support:)

Christian Borla

unread,
Jan 26, 2023, 9:07:32 AM1/26/23
to Wazuh mailing list
Hi 
Great that you fixed it!
Regards.

Maxim M.

unread,
Apr 26, 2023, 10:14:33 PM4/26/23
to Wazuh mailing list

Hi.

Wazuh manager version 4.4.0(so are wazuh-indexer, wazuh-dashboard).

My lab's agents versions:

  • 4.3.1(linux) - 001;
  • 4.2.5(solaris - not upgradable, I know) - 003;
  • 4.2.5(windows) - 004

So I've tried to do remote upgrade(on manager side) with both variants(cli & rest).

Cli(001, linux):

# /var/ossec/bin/agent_upgrade -l ID Name Version 001 linux-test-1 Wazuh v4.3.1 003 solaris-test-1 Wazuh v4.2.5 004 PC1 Wazuh v4.2.5 Total outdated agents: 3 # /var/ossec/bin/agent_upgrade -a 001 Upgrading... Failed upgrades: Agent 001 status: The repository is not reachable

REST(001, linux):

curl -k -X PUT "https://localhost:55000/agents/upgrade?agents_list=001&pretty=true" -H "Authorization: Bearer $TOKEN" { "data": { "affected_items": [ { "agent": "001", "task_id": 18 } ], "total_affected_items": 1, "total_failed_items": 0, "failed_items": [] }, "message": "All upgrade tasks were created", "error": 0 } curl -k -X GET "https://localhost:55000/agents/upgrade_result?agents_list=001&pretty=true" -H "Authorization: Bearer $TOKEN" { "data": { "affected_items": [ { "message": "Success", "agent": "001", "task_id": 18, "node": "worker-node-1", "module": "upgrade_module", "command": "upgrade", "status": "Error", "error_msg": "The repository is not reachable", "create_time": "2022-06-20T10:59:44Z", "update_time": "2022-06-20T11:00:02Z" } ], "total_affected_items": 1, "total_failed_items": 0, "failed_items": [] }, "message": "All upgrade tasks were returned", "error": 0 }

I have no corresponding logs for that event, neither manager nor agent's side in ossec.log.

Shared conf of , for example, linux is default:

<agent_config> <!-- Shared agent configuration here --> <agent-upgrade> <enabled>yes</enabled> <notification_wait_start>60s</notification_wait_start> <notification_wait_factor>4</notification_wait_factor> <notification_wait_max>2h</notification_wait_max> <ca_verification> <enabled>yes</enabled> <ca_store>etc/wpk_root.pem</ca_store> </ca_verification> </agent-upgrade> ...

Manager and worker conf of is default:

... <agent-upgrade> <chunk_size>16384</chunk_size> <wpk_repository>packages.wazuh.com/4.x/wpk/</wpk_repository> <max_threads>16</max_threads> </agent-upgrade> ...

I know that agent-upgrade is not neccessary for default conf, but it doesn't work either way.

I use proxy(http/HTTP/https/HTTPS) in my /etc/environment of manager host and have no issues with curl/dnf/wget.

Below is curl output from manger's side to packages.wazuh.com/4.x/wpk:

curl -i https://packages.wazuh.com/4.x/wpk HTTP/1.1 200 Connection established HTTP/2 404 content-type: application/xml date: Tue, 28 Jun 2022 03:13:26 GMT server: AmazonS3 x-cache: Error from cloudfront via: 1.1 e3d7e26a5df51c85de01773b18b95a58.cloudfront.net (CloudFront) x-amz-cf-pop: HEL51-P1 x-amz-cf-id: uvb-ZW4R0dRCiPqyalnY9Kno89-HlMuIS8e47U5-4tT9eWsvoShDXw== <?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>4.x/wpk</Key><RequestId>GCSEHWHWK2QHHDJG</RequestId><HostId>tju/bWrQR/w/9gW34Taqt8DiEUHsla9i9BWMCdIpnCAHPsduX2bZlSlVANYHD2ork+NghKlkmM4=</HostId></Error>

Need help.


четверг, 26 января 2023 г. в 20:07:32 UTC+6, Christian Borla:
Reply all
Reply to author
Forward
0 new messages