Access denied for restore (url type)


#1

Hello,
I'm trying to do the following:

  • I have one ES node on a remote machine (Windows).
    I configured backup in a shared folder:
    PUT /_snapshot/bak_videos
    {
    "type": "fs",
    "settings": {
    "compress": true,
    "location": "\\myesnode\Snapshot"
    }
    }

in the config file I added:
path.repo: ["\\myesnode\Snapshot"]

  • I made a snapshot:
    PUT /_snapshot/bak_videos/snap_1

  • I added an FTP access to the Snapshot folder (anonymous at the moment, is there a way to configure a user to connect to the ftp ?).

  • I want to restore the data on my local machine.
    I did the following:
    PUT /_snapshot/bak_videos
    {
    "type": "url",
    "settings": {
    "compress": true,
    "location": "ftp://mynodeaddress"
    }
    }

and in the config file:
repositories.url.allowed_urls: ["ftp://mynodeaddress"]

I can access the ftp folder correctly and see the files (index-0, the indices folder ...) and can read them correctly on a classic FTP client.

The root address (ftp://mynodeaddress) is pointing to the Snapshot folder on the ES node.

Now, when I try to restore the backup on my local machine:
POST /_snapshot/bak_videos/snap_1/_restore

I doesn't work and I have a the following error:

{
"error": {
"root_cause": [
{
"type": "access_control_exception",
"reason": "access denied ("java.net.SocketPermission" "localhost:0" "listen,resolve")"
}
],
"type": "access_control_exception",
"reason": "access denied ("java.net.SocketPermission" "localhost:0" "listen,resolve")"
},
"status": 500
}

Here are the logs I have on my local machine:
[2017-01-19T13:00:54,466][WARN ][o.e.s.RestoreService ] [jpQ47EO] [bak_videos:snap_1] failed to restore snapshot
java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:0" "listen,resolve")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_111]
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_111]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_111]
at java.lang.SecurityManager.checkListen(SecurityManager.java:1131) ~[?:1.8.0_111]
at java.net.Socket.bind(Socket.java:642) ~[?:1.8.0_111]
at sun.net.ftp.impl.FtpClient.openPassiveDataConnection(FtpClient.java:662) ~[?:?]
at sun.net.ftp.impl.FtpClient.openDataConnection(FtpClient.java:708) ~[?:?]
at sun.net.ftp.impl.FtpClient.getFileStream(FtpClient.java:1283) ~[?:?]
at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:428) ~[?:?]
at java.net.URL.openStream(URL.java:1045) ~[?:1.8.0_111]
at org.elasticsearch.common.blobstore.url.URLBlobContainer.readBlob(URLBlobContainer.java:102) ~[elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:841) ~[elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:823) ~[elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.getRepositoryData(BlobStoreRepository.java:721) ~[elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:195) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:89) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:49) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:86) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:170) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.1.1.jar:5.1.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

I don't really know from where this error comes from, the error does not help a lot to know where is the issue :).
Any suggestion ?

Thanks,


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.