drata / drata-agent

Apache License 2.0
12 stars 5 forks source link

drata-agent popping up EPIPE errors on Ubuntu 22.04 #31

Closed hanwen-flow closed 1 month ago

hanwen-flow commented 1 month ago

I have been asked by my employer to run drata-agent.

I downloaded drata-agent from your website, and was served a .deb file.

$ ls -l ~/Downloads/Drata-Agent-linux.deb 
-rw-rw-r-- 1 hanwen hanwen 96036216 Sep 23 10:35 /home/hanwen/Downloads/Drata-Agent-linux.deb

I installed it, and am regularly greeted by an error-popup about EPIPE. (see image) drata

The drata-agent can't tell me which version it is,

$ drata-agent --version
menubar:  Error: ERR_FAILED (-2) loading 'file:///opt/Drata%20Agent/resources/app.asar/dist/index.html'
    at rejectAndCleanup (node:electron/js2c/browser_init:2:84559)
    at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:84946)
    at WebContents.emit (node:events:514:28) {
  errno: -2,
  code: 'ERR_FAILED',
  url: 'file:///opt/Drata%20Agent/resources/app.asar/dist/index.html'
}
mnrdrata commented 1 month ago

This is due to the executing context not having permissions to the folders, files, or endpoints required to run the Drata Agent. The website link is the latest (version 3.6.1), AppImage is also available and may be downloaded directly at https://github.com/drata/agent-releases/releases/latest.

Typically, the user will need access to the following at default installs: (local storage) RW: ~/.config/drata-agent/app-data.json (local logging) RW: ~/.config/drata-agent/logs/main.log (library) RWX: /opt/Drata Agent/resources/lib/linux/bin/osqueryi (auto updates) RW: /opt/Drata Agent

Endpoints https://agent.drata.com/ or https://agent.eu.drata.com/ https://*.datadoghq.com/

You may also contact our Support Team to get assistance with installation where we assist more directly with your specific setup and private machine/network details. We do have a ticket for the next release to make this error message more friendly and explicit.

Note: There is not a --version parameter nor CLI for the drata-agent application.

hanwen-flow commented 1 month ago

(library) RWX: /opt/Drata Agent/resources/lib/linux/bin/osqueryi

hanwen@hanwen-flow:~/vc/engflow$ ls -l  /opt/Drata\ Agent/resources/lib/linux/bin/osqueryi 
-rwxr-xr-x 1 root root 86097376 Mär 26 17:56 '/opt/Drata Agent/resources/lib/linux/bin/osqueryi'

so should I make this file mode 0777 then?

(auto updates) RW: /opt/Drata Agent

this is owned by root as well; please advise how to change the install.

Note: There is not a --version parameter nor CLI for the drata-agent application.

I gathered as much. I was trying to suggest you might want to add it.

mnrdrata commented 1 month ago

@hanwen-flow I would get in touch with our support team to resolve detailed installation issues. Ownership of certain files will vary based on the install used, for deb on Ubuntu you have to elevate for installation.

Please follow the permissions outlined in my previous comment or use the AppImage version linked there if preferred https://github.com/drata/drata-agent/issues/31#issuecomment-2368643139.