With latest ES on OSX Yosemite, Java 1.8.0_91, all process run by the same user, I'm getting a 500 error on index creation, with a message that my synonym file cannot be read due to permissions error:
lee:nodejs lee$ ls -la /Users/lee/src/nodejs/.config/synonyms.txt
-rw-r--r-- 1 lee staff 21 6 Oct 09:15 /Users/lee/src/nodejs/.config/synonyms.txt
[ERROR] { [Error: [index_creation_exception] failed to create index]
status: 500,
displayName: 'InternalServerError',
message: '[index_creation_exception] failed to create index',
path: '/test',
query: {},
body:
{ error:
{ root_cause: [Object],
type: 'access_control_exception',
reason: 'access denied ("java.io.FilePermission" "/Users/lee/src/nodejs/.config/synonyms.txt" "read")' },
status: 500 },
statusCode: 500,
response: '{"error":{"root_cause":[{"type":"index_creation_exception","reason":"failed to create index"}],"type":"access_control_exception","reason":"access denied (\"java.io.FilePermission\" \"/Users/lee/src/nodejs/.config/synonyms.txt\" \"read\")"},"status":500}',
toString: [Function],
toJSON: [Function] }
Error: [index_creation_exception] failed to create index
at respond (/Users/lee/src/nodejs/node_modules/elasticsearch/src/lib/transport.js:289:15)
at checkRespForFailure (/Users/lee/src/nodejs/node_modules/elasticsearch/src/lib/transport.js:248:7)
at HttpConnector. (/Users/lee/src/nodejs/node_modules/elasticsearch/src/lib/connectors/http.js:164:7)
at IncomingMessage.wrapper (/Users/lee/src/nodejs/node_modules/elasticsearch/node_modules/lodash/index.js:3095:19)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17) ' at ElasticGolem. in ../lib/ElasticGolem.js:134'