目前遇到一个问题:
Elasticsearch 数据的备份 在配置文件中设置的备份地址:path.repo: ["/data/es_backups"]
在Java代码中
PutRepositoryRequestBuilder 设置备份仓库时设置的是 /data/es_backups/local 而local目录是 另外目录的软连接,目的是为了扩容。
在设置时出现:
Elasticsearch 数据的备份 在配置文件中设置的备份地址:path.repo: ["/data/es_backups"]
在Java代码中
PutRepositoryRequestBuilder 设置备份仓库时设置的是 /data/es_backups/local 而local目录是 另外目录的软连接,目的是为了扩容。
在设置时出现:
RepositoryException[[eventback] cannot create blob store]; nested: SecurityException[access denied ("java.io.FilePermission" "/opt/arkbase_backups/local" "write")];
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.blobStore(BlobStoreRepository.java:328)
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.blobContainer(BlobStoreRepository.java:300)
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.listBlobsToGetLatestIndexId(BlobStoreRepository.java:811)
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:789)
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.getRepositoryData(BlobStoreRepository.java:652)
at org.elasticsearch.snapshots.SnapshotsService.getRepositoryData(SnapshotsService.java:155)
at org.elasticsearch.action.admin.cluster.snapshots.get.TransportGetSnapshotsAction.masterOperation(TransportGetSnapshotsAction.java:97)
at org.elasticsearch.action.admin.cluster.snapshots.get.TransportGetSnapshotsAction.masterOperation(TransportGetSnapshotsAction.java:55)
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:124)
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.doRun(TransportMasterNodeAction.java:211)
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.SecurityException: access denied ("java.io.FilePermission" "/opt/arkbase_backups/local" "write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:886)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
at sun.nio.fs.UnixPath.checkWrite(UnixPath.java:801)
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:376)
at java.nio.file.Files.createDirectory(Files.java:674)
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
at java.nio.file.Files.createDirectories(Files.java:727)
at org.elasticsearch.common.blobstore.fs.FsBlobStore.<init>(FsBlobStore.java:47)
at org.elasticsearch.repositories.fs.FsRepository.createBlobStore(FsRepository.java:117)
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.blobStore(BlobStoreRepository.java:324)
... 14 more
这些目录的权限都是777,但是一直出现这个问题,请各位大佬们指点指点
2 个回复
zlzlsx
赞同来自:
yimusidian - 90后IT男
赞同来自: