Macos M1 Ventura 13.0.1 Elastic agent install fail

I installed the elastic agent on macos Ventura 13.0.1 using the command line and the installation failed showing:

panic: getwd: invalid argument

goroutine 1 [running]:

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths.retrieveExecutablePath()

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths/common.go:197 +0x148

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths.initialTop()

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths/common.go:183 +0x20

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths.init.0()

github.com/elastic/elastic-agent/internal/pkg/agent/application/paths/common.go:41 +0x20

Command used:
sudo . /elastic-agent install --url=https://xx.xx --enrollment-token=xx --insecure --force

What is the solution to this?

which version of elastic-agent are you trying to install?

Also, just to double check. Are you using the aarch64 version or the x86_64 version?

Also does the Terminal application that you are installing from have Full Disk Access? We have seen the install fail on Ventura when it doesn't.

The installation package used is the arch64 version.The installation is failing, the option is not yet displayed in the full disk access rights.

I have tried to use the installation package of elastic agent 8.5.0 and elastic agent 8.5.3, but the installation failed, what is the solution? Or is this a bug?

The first time the installation is performed the error shows:

Error: failed to fix permissions: chown /Library/Elastic/Agent/data/elastic-agent-xxx/elastic-agent.app: operation not permitted

For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.5/fleet-troubleshooting.html

Error: enroll command failed with exit code: 1

For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.5/fleet-troubleshooting.html

open Full Disk Access,Error displayed :

The server side shows:

I'm having the same issue on macOS Ventura.

When trying to install elastic agent on Mac, it fails with Error: failed to fix permissions: chown /Library/Elastic/Agent/data/elastic-agent-{code}/elastic-agent.app: operation not permitted error.

Agent is visible on elastic fleet but when searching for elastic files on /Library/Elastic/, I see an empty directory. The /Library/Elastic directory is created, but there is no Agent sub-directory.

Fetch agent status via elastic-agent status throws command not found: elastic-agent error.

Unable to uninstall using sudo /Library/Elastic/Agent/elastic-agent uninstall too.

Tried using 2 different machines running Ventura. They have the same problem. Previous OS versions work just fine.

Failing OS details : macOS Ventura 13.0.1

I'm having the same issue on macOS Ventura.

Captura de pantalla 2022-12-27 a las 13.54.36

solution:

Add full access to the hard disk to the terminal application.

2 Likes

Thank you @Carlos_Caballero. This step fixed the issue.

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