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
Reset locale to C in bin/elasticsearch #6047
Conversation
I'm surprised the exception messages are localized, I thought it was only the case for the |
Hey, thats true. I dont know why it happens, but I know it happens, see #5957 Maybe some user/library code does this by accident? |
I suspect this error message is generated at the OS level and is just reused by the JVM so I think your PR would fix it! |
This is the only
instead to follow the pattern from |
@spinscale what's the status of this? |
@s1monw I just need to test, if Lee's suggestion works flawless under ubuntu (as they use dash and not bash for |
removed the export and added a bit more explanation |
Hardcoding the locale to C causes indices with non-ascii names to have some issues, for the index "test-weird-index-中文", I get this exception:
And then a ton of these errors repeating. To reproduce, package up this branch, run |
You should also be able to see it by running ES from this branch and doing:
And in the logs:
|
as suggested by robert, I set the locale to |
Tests are much happier now, +1 |
LGTM |
Because the NetworkExceptionHelper class relies on the english language in order to extract information and decide whether a certain exception is a network problem, we need to set the english locale on startup in order to prevent other locales to circumvent this check.
Because the NetworkExceptionHelper class relies on the english language in
order to extract information and decide whether a certain exception is a
network problem, we need to set the english locale on startup in order
to prevent other locales to circumvent this check.