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

Elasticsearch 2.0.0beta1 does not start if ES_GC_LOG_FILE value is set in init file. #13277

Closed
ajaybhatnagar opened this issue Sep 2, 2015 · 1 comment · Fixed by #13296
Closed
Labels

Comments

@ajaybhatnagar
Copy link

No logs generated for ES (in Debug mode) or system log. process does not start at all. Commenting the line , elasticsearch starts with no issues. Tried creating directory path and empty file with full permission on gc.log ES_GC_LOG_FILE=/var/log/elasticsearch/gc.log, still unable to start with no error message any where.

@dakrone
Copy link
Member

dakrone commented Sep 2, 2015

@ajaybhatnagar when I specify it on the command line, I get this error:

» ES_GC_LOG_FILE=/tmp/foo/gc.log bin/elasticsearch
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been "/tmp/foo/gc.log"
Note %p or %t can only be used once
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Which file are you putting it in? It could be the same error but just not being printed to the right place.

Note that even if I specify a super simple log filename ("foo"), I still get the same error, so I think this is a bug:

» ES_GC_LOG_FILE=foo bin/elasticsearch
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been "foo"
Note %p or %t can only be used once
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

dakrone added a commit to dakrone/elasticsearch that referenced this issue Sep 2, 2015
The `-Xloggc:filename.log` parameter has very strict filename semantics:

```
[A-Z][a-z][0-9]-_.%[p|t]
```

Our script specifies \" and \" to surround it, which makes Java think we
are sending: -Xloggc:"foo.log" and it fails with:

```
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been "foo.log"
Note %p or %t can only be used once
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```

We can't quote this, and we should not need to since the valid
characters don't include a space character, so we don't need to worry
about quoting.

Resolves elastic#13277
dakrone added a commit that referenced this issue Sep 3, 2015
The `-Xloggc:filename.log` parameter has very strict filename semantics:

```
[A-Z][a-z][0-9]-_.%[p|t]
```

Our script specifies \" and \" to surround it, which makes Java think we
are sending: -Xloggc:"foo.log" and it fails with:

```
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been "foo.log"
Note %p or %t can only be used once
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```

We can't quote this, and we should not need to since the valid
characters don't include a space character, so we don't need to worry
about quoting.

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

Successfully merging a pull request may close this issue.

3 participants