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

add warning or Caveat for existing Config directory #28

Open
dziggas opened this issue Jan 16, 2020 · 0 comments
Open

add warning or Caveat for existing Config directory #28

dziggas opened this issue Jan 16, 2020 · 0 comments

Comments

@dziggas
Copy link

dziggas commented Jan 16, 2020

When installing from this tap, it would be convenient to issue a warning or display a Caveat to verify that no existing config directory conflicts exist.

Assuming a clean install from from a non-elastic tap (currently this installs 6x):
brew install elasticsearch

And then a subsequent uninstall (perhaps because 7x was desired)
brew uninstall elasticsearch

The config directory is left behind at /usr/local/etc/elasticsearch/

Then, when running
brew install elastic/tap/elasticsearch-full

The following will occur:

➜  ~ elasticsearch
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.003s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
[0.003s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed.
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
    at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:118)
    at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:86)
    at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59)
    at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:92)

Java:

➜  ~ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)

Not a big issue - clearing out the dirs mentioned in the Caveats clears it up - but a sanity check in the formula might save somebody some time down the road.

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

1 participant