Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed installing IK #1066

Open
vegetablest opened this issue Jul 2, 2024 · 2 comments
Open

Failed installing IK #1066

vegetablest opened this issue Jul 2, 2024 · 2 comments

Comments

@vegetablest
Copy link

vegetablest commented Jul 2, 2024

I used ECK to install ES on k8s and installed the IK in the init container, but it failed.

The configuration
      initContainers:
      - name: install-plugins
        command:
        - sh
        - -c
        - |
          bin/elasticsearch-plugin install --batch https://get.infini.cloud/elasticsearch/analysis-ik/8.14.1
      containers:
      - name: elasticsearch 
Error messages

-> Installing https://get.infini.cloud/elasticsearch/analysis-ik/8.12.2
-> Downloading https://get.infini.cloud/elasticsearch/analysis-ik/8.12.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  • java.net.SocketPermission * connect,resolve
    See https://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
    for descriptions of what these permissions allow and the associated risks.
    -> Failed installing https://get.infini.cloud/elasticsearch/analysis-ik/8.12.2
    -> Rolling back https://get.infini.cloud/elasticsearch/analysis-ik/8.12.2
    -> Rolled back https://get.infini.cloud/elasticsearch/analysis-ik/8.12.2
    Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/analysis-ik: Operation not permitted
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setOwners(UnixFileAttributeViews.java:291)
    at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setOwner(UnixFileAttributeViews.java:313)
    at org.elasticsearch.plugins.cli.InstallPluginAction.setOwnerGroup(InstallPluginAction.java:1077)
    at org.elasticsearch.plugins.cli.InstallPluginAction.installConfig(InstallPluginAction.java:1051)
    at org.elasticsearch.plugins.cli.InstallPluginAction.installPluginSupportFiles(InstallPluginAction.java:974)
    at org.elasticsearch.plugins.cli.InstallPluginAction.installPlugin(InstallPluginAction.java:943)
    at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:254)
    at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:89)
    at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
    at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:94)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:85)
    at org.elasticsearch.cli.Command.main(Command.java:50)
    at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)
@NanMu93
Copy link

NanMu93 commented Aug 29, 2024

        - name: install-plugins
          securityContext:
             privileged: true
             runAsUser: 0
          command:
          - sh
          - -c
          - |
            bin/elasticsearch-plugin install --batch https://get.infini.cloud/elasticsearch/analysis-ik/8.14.1

grant root privileges.

@NanMu93
Copy link

NanMu93 commented Aug 29, 2024

        - name: install-plugins
          securityContext:
             privileged: true
             runAsUser: 0
          command:
          - sh
          - -c
          - |
            bin/elasticsearch-plugin install --batch https://get.infini.cloud/elasticsearch/analysis-ik/8.14.1

grant root privileges.
runAsUser: 1000 ?

runAsUser: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants