Error=13, Permission denied


#1

Hi,
in ELK-Stack 6.3.x i get following Error:
[2018-07-15T13:37:00,885][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [zebra-log-node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/global/zebra/elkstack/oem/elasticsearch-6.3.1/modules/x-pack/x-pack-ml/platform/linux-x86_64/bin/controller": error=13, Permission denied
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.3.1.jar:6.3.1]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.3.1.jar:6.3.1]
Caused by: org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Cannot run program "/global/zebra/elkstack/oem/elasticsearch-6.3.1/modules/x-pack/x-pack-ml/platform/linux-x86_64/bin/controller": error=13, Permission denied
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:168) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.1.jar:6.3.1]
... 6 more
Caused by: java.io.IOException: Cannot run program "/global/zebra/elkstack/oem/elasticsearch-6.3.1/modules/x-pack/x-pack-ml/platform/linux-x86_64/bin/controller": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_171]
at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:118) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:86) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:166) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.1.jar:6.3.1]
... 6 more
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:1.8.0_171]
at java.lang.UNIXProcess.(UNIXProcess.java:247) ~[?:1.8.0_171]
at java.lang.ProcessImpl.start(ProcessImpl.java:134) ~[?:1.8.0_171]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_171]
at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:118) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:86) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:166) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.1.jar:6.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.1.jar:6.3.1]
... 6 more

Thanks

Regards
Günter


(Mark Walkom) #2

How did you install Elasticsearch?
What user are you running as?


#3

hi,
i installed with user zebra.
i made my own Installation Zip-File.
in ELK 6.2.4 it was installed correctly

Regards
Günter


(Tim Vernum) #4

There is some issue between the way you installed Elasticsearch, the user you installed it as and the user you are running it as.

You have a permissions problem running the /global/zebra/elkstack/oem/elasticsearch-6.3.1/modules/x-pack/x-pack-ml/platform/linux-x86_64/bin/controller process.

The 6.3.1 zip file has the correct permissions for that file:

-rwxr-xr-x  2.0 unx    84352 b-    31823 defN 18-Jun-29 22:04 elasticsearch-6.3.1/modules/x-pack/x-pack-ml/platform/linux-x86_64/bin/controller

So it appears that your installation process has failed to set the correct permissions.

in ELK 6.2.4 it was installed correctly

In 6.2.4 X-Pack was a plugin which was installed for you by elasticsearch-plugin, so the process you used to install Elasticsearch would not have affected the permissions on the ML controller.


#5

Thanks.
in ELK 6.2.4 i don't use xpack.

Is it possible to install ELK 6.3.x without xpack.

i use search-guard for security

Regards
Günter


(David Pilato) #6

Here: https://www.elastic.co/downloads/elasticsearch-oss


#7

thanks


#8

Hi,
when i set in elasticsearch.yml and kibany.yml xpack.ml.enabled:false the error also coming

the OSS Version worked for me correctly.

Best Regards
Günter


(Vadim Gindin) #9

Hi, I'm trying to impement custom StemFilter, that uses external program as stemmer. I got the same error.

I've implemented simple TokenFilter, that calls external program like this

        SecurityManager sm = System.getSecurityManager();
    if (sm != null) {
        sm.checkPermission(new SpecialPermission());
    }

    mystemProcess = AccessController.doPrivileged((PrivilegedAction<Process>) () -> {
        ProcessBuilder pb = new ProcessBuilder("/usr/local/bin/mystem", "-ign", "--format", "json");
        try {
            return pb.start();
        } catch (IOException e) {
            LOG.error(e);
            return  null;
        }
    });

And I got the same error:

Caused by: java.io.IOException: error=13, Permission denied
    at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:1.8.0_161]
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) ~[?:1.8.0_161]
    at java.lang.ProcessImpl.start(ProcessImpl.java:134) ~[?:1.8.0_161]
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_161]
    ... 24 more

Could you help me?

P.S. File permissions are set correctly:

user@server:/usr/local/bin$ ls -la | grep mystem
-rwxrwxrwx  1 root staff 21135640 Aug 16 14:38 mystem

(Tim Vernum) #10

@vgindin Please start a new thread - your issue is different.


(Tim Vernum) #11