I have given the backup folder like this in elasticsearch.yml but facing error while restart the elasticsearch , can anyone help me to resolve this issue?
path.repo:["/home/ec2-user/es_backup"]
Caused by: while scanning a simple key
in 'reader', line 38, column 1:
path.repo:["/home/ec2-user/es_ba ...
^
could not find expected ':'
in 'reader', line 39, column 1:
#
^
at org.yaml.snakeyaml.scanner.ScannerImpl.stalePossibleSimpleKeys(ScannerImpl.java:465)
at org.yaml.snakeyaml.scanner.ScannerImpl.needMoreTokens(ScannerImpl.java:280)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:225)
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:168)
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:340)
That looks correct to me, but I am wondering if trying to use an environment variable for node.name is allowed and that this might be causing problems. Can you change this to a string and see if that has any effect?
Exception
Caused by: java.lang.IllegalStateException: Unable to access 'path.repo' (/home/ec2-user/es_backup)
at org.elasticsearch.bootstrap.Security.addPath(Security.java:444) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:326) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:240) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.configure(Security.java:118) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:228) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.2.jar:5.6.2]
... 6 more
Caused by: java.nio.file.AccessDeniedException: /home/ec2-user/es_backup
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_161]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_161]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_161]
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_161]
at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_161]
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_161]
at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_161]
at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:486) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.addPath(Security.java:442) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:326) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:240) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Security.configure(Security.java:118) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:228) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.2.jar:5.6.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.2.jar:5.6.2]
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.