Error installing Shield plugin

security

(Krishna Chaitanya) #1

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


(Jay Modi) #2

What operating system and java version are you using?


(Krishna Chaitanya) #3

Im using RHEL 7.2 and JAVA 8


(Jay Modi) #4

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


(Krishna Chaitanya) #5

Open JDK 1.8.0_65


(Jay Modi) #6

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


(Krishna Chaitanya) #7

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?


(Jay Modi) #8

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


(Krishna Chaitanya) #9

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


(Krishna Chaitanya) #10

Any suggestions?


(Jay Modi) #11

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


(Krishna Chaitanya) #12

/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.


(Jay Modi) #13

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?


(Krishna Chaitanya) #14

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


(Krishna Chaitanya) #15

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


(Krishna Chaitanya) #16

Any help appreciated


(system) #17

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