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

Provisioning failure when no home directory set #4

Open
Tenchi2xh opened this issue Jan 5, 2016 · 2 comments
Open

Provisioning failure when no home directory set #4

Tenchi2xh opened this issue Jan 5, 2016 · 2 comments

Comments

@Tenchi2xh
Copy link

We encountered a serious issue while deploying a service using kamon-system-metrics on a linux docker container where the user's home directory was set to / with no write privileges (for security), which provokes the following error:

[ERROR] [01/05/2016 11:19:22.224] [main] [ModuleLoader(akka://kamon)] Failed to auto start the [blaze-prometheus-exporter] module.
java.io.FileNotFoundException: /native/libsigar-amd64-linux.so (No such file or directory)

After investigating the source code of sigar-loader we found out that the native libraries are getting extracted to the home directory, which rests on the easy assumption that everyone has a write-access home directory.

Wouldn't it be better to extract it to a temporary directory?

@dpsoft
Copy link
Contributor

dpsoft commented Jan 5, 2016

Hi, @Tenchi2xh

The idea behind of SigarProvisioner is try to extract the native library based on the selection of the user otherwise depending on some priorities:

 * 1) user provided command line agent options. [AGENT]
 * 2) user provided o/s environment variable: [KAMON_SIGAR_FOLDER]
 * 3) user provided java system property. [kamon.sigar.folder] -> ex. -Dkamon.sigar.folder=whatever
 * 4) hard coded location in ${user.dir}/native. This is the last one

@agustafson
Copy link

I've submitted a PR kamon-io/kamon-system-metrics#15 which should at least allow the ability to set the extract directory by setting an environment variable/sys prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants