Unable to install Custom Realm

Hi,

I am trying to install the example custom realm in one of the nodes through command
bin/x-pack/extension install file:///<path>/my-realm-1.0.zip...

but keeps getting this NoSuchFileException.

Can someone pls throw some light on it.

D:\elasticsearch-5.6.10\bin\x-pack>extension install file:///D:/CustomRealmPlugin.zip
-> Downloading file:///D:/CustomRealmPlugin.zip
Exception in thread "main" java.nio.file.NoSuchFileException: D:\elasticsearch-5.6.10\plugins\x-pack\extensions\.installing-3375002382823345241\x-pack-extension-descriptor.properties

        at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
        at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
        at java.nio.file.Files.newByteChannel(Files.java:361)
        at java.nio.file.Files.newByteChannel(Files.java:407)
        at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
        at java.nio.file.Files.newInputStream(Files.java:152)
        at org.elasticsearch.xpack.extensions.XPackExtensionInfo.readFromProperties(XPackExtensionInfo.java:59)
        at org.elasticsearch.xpack.extensions.InstallXPackExtensionCommand.verify(InstallXPackExtensionCommand.java:163)
        at org.elasticsearch.xpack.extensions.InstallXPackExtensionCommand.install(InstallXPackExtensionCommand.java:204)
        at org.elasticsearch.xpack.extensions.InstallXPackExtensionCommand.execute(InstallXPackExtensionCommand.java:114)
        at org.elasticsearch.xpack.extensions.InstallXPackExtensionCommand.execute(InstallXPackExtensionCommand.java:101)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
        at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
        at org.elasticsearch.cstemProvider.newDireli.Command.mainWithoutErrorHandling(Command.java:134)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.xpack.extensions.XPackExtensionCli.main(XPackExtensionCli.java:36)

In the zip file, I have:
1.jar file
2.x-pack-extension-descriptor.properties

Please help.

Thank you.

There's 2 possibilities here:

  1. Your zip file doesn't contain exactly what you think it does. If your zip doesn't have a file named x-pack-extension-descriptor.properties at the root of archive, then you will get this error. This is the most likely cause. Check the contents with a command line zip tool. If you don't have anything else available, you can do this with jar tf CustomRealmPlugin.zip
  2. Something about your filesystem is causing problems. This happens occasionally, but is far less likely. Trying manually checking that your current user can create the directory D:\elasticsearch-5.6.10\plugins\x-pack\extensions\.installing-3375002382823345241 and then write the x-pack-extension-descriptor.properties file in that directory.

Thnkss TimV.

  1. Can you tell me what should be the contents of my zip file.

  2. The user which I am using can create directory. How to check whether my user can create that inside directory or not(.installing-*).

Thanks.

For the purposes of this issue, the important part is what I replied earlier - your zip needs to have x-pack-extension-descriptor.properties at the root of archive.

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