Error installing Shield plugin

I am trying to install shield plugin. I tried using both offline installation procedure as well as RPM packaged installation. I am using elasticsearch 2.4.1

Packaged installation steps:
bin/plugin install shield

Offline installation steps:
bin/plugin install file://my_path/shield-2.4.1.zip

Was able to successfully install "license" plugin. While installing shield, both procedures give the same error below:

ERROR: Error copying config directory [/usr/share/elasticsearch/plugins/shield/config] to [/etc/elasticsearch/shield], cleaning up, reason: FileSystemException:[/etc/elasticsearch/shield/logging.yml: Invalid argument]
ERROR: /etc/elasticsearch/shield/logging.yml: Invalid argument

Need help with this. Thanks

What operating system and java version are you using?

Im using RHEL 7.2 and JAVA 8

Oracle Java or OpenJDK? What do you see when you type java -version?

Open JDK 1.8.0_65

Any chance you can try with a newer one or the oracle jdk?

I can try, but do I have to uninstall ELK for that? Or just install the latest open JDK or oracle java version and try installing Shield?

No need to uninstall. Just update and ensure the path is setup correctly and then try to install shield.

I installed Oracle Java and also configured JAVA_HOME and alternatives.
Now my java version is Java (TM) SE Runtime Environment 1.8.0_102.
I still have the same error when installing Shield

Any suggestions?

What are the file permissions of /etc/elasticsearch and what user is running the install command?

/etc/elasticsearch folder and all of its contents have : as elasticsearch: elasticsearch. I am running install as root user. I also checked by making /etc/elasticsearch and its contents to root:root but, the same error occurred.

Sorry for all of the questions, but can you try installing with the -v option and provide the output.

bin/plugin install file://my_path/shield-2.4.1.zip -v

Finally, can you also tell us what type of filesystem you use on this machine?

Well I got it worked in very unconventional way.
The plugin was working in my laptop well. So, based on that, I extracted the shield plugin files into respective folders on my machine having issue, and it worked out. Now I could create users, roles and apply field level security, ehich I was originally looking for.
I dont have that verbose output. But, from what I saw, it searched for bin/ in /usr/share/elasticsearch and copied bin/ files from plugin over there. Later on, it tried copying plugin's config/ directory files from /usr/share/elasticsearch/plugins/shield into /etc/elasticsearch/shield. One such file is logging.yml and the error is same as one stated above.

I am using ext3 file system

Below is the verbose:

Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/shield/2.4.1/shield-2.4.1.zip ...
Downloading ...............................................................................................................................................DONE
Verifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/shield/2.4.1/shield-2.4.1.zip checksums if available ...
Downloading .DONE

  • Plugin information:
    Name: shield
    Description: Elasticsearch Shield (security)
    Site: false
    Version: 2.4.1
    JVM: true
  • Classname: org.elasticsearch.shield.ShieldPlugin
  • Isolated: false
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @ WARNING: plugin requires additional permissions @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  • java.lang.RuntimePermission setFactory
    See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
    for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
Installed shield into /usr/share/elasticsearch/plugins/shield
Found bin, moving to /usr/share/elasticsearch/bin/shield
Installed shield into /usr/share/elasticsearch/bin/shield
Found config, moving to /etc/elasticsearch/shield
ERROR: Error copying config directory [/usr/share/elasticsearch/plugins/shield/config] to [/etc/elasticsearch/shield], cleaning up, reason: FileSystemException:[/etc/elasticsearch/shield/logging.yml: Invalid argument]
ERROR: /etc/elasticsearch/shield/logging.yml: Invalid argument

Any help appreciated

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