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

Cannot set property 'es.set.netty.runtime.available.processors' #464

Closed
dekimsey opened this issue Jul 9, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@dekimsey
Copy link

commented Jul 9, 2019

We successfully run 1.16.26. I was investigating trying to update, but 1.18.2 crashes on start with our ES 5.6.11 cluster. I'm not sure what the issue is.

I tried looking to see if I can download previous versions to try 1.17 and see if that works, but the only available download is 1.18.2.

Using docker.elastic.co/elasticsearch/elasticsearch:5.6.11 as the elasticseacrh image, I've removed x-pack but that's it.

2019-07-09T21:10:18,268][ERROR][t.b.r.e.IndexLevelActionFilter] Cannot set property 'es.set.netty.runtime.available.processors'
 java.security.AccessControlException: access denied ("java.util.PropertyPermission" "es.set.netty.runtime.available.processors" "write")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_181]
      at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_181]
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_181]
      at java.lang.System.setProperty(System.java:792) ~[?:1.8.0_181]
      at tech.beshu.ror.es.IndexLevelActionFilter.<init>(IndexLevelActionFilter.java:97) [readonlyrest-1.18.2_es5.6.11.jar:?]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_181]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_181]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_181]
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_181]
      at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:49) [elasticsearch-5.6.11.jar:5.6.11]
...
[2019-07-09T21:12:31,900][WARN ][r.suppressed             ] path: /_cluster/health, params: {local=true}
 tech.beshu.ror.es.RorNotReadyResponse: ReadonlyREST is not ready
      at tech.beshu.ror.es.IndexLevelActionFilter.lambda$apply$1(IndexLevelActionFilter.java:144) ~[?:?]
      at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_181]
      at tech.beshu.ror.es.IndexLevelActionFilter.apply(IndexLevelActionFilter.java:138) ~[?:?]
      at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:168) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:142) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:84) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.client.support.AbstractClient$ClusterAdmin.execute(AbstractClient.java:730) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.client.support.AbstractClient$ClusterAdmin.health(AbstractClient.java:751) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.rest.action.admin.cluster.RestClusterHealthAction.lambda$prepareRequest$0(RestClusterHealthAction.java:74) ~[elasticsearch-5.6.11.jar:5.6.11]
      at org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:80) ~[elasticsearch-5.6.11.jar:5.6.11]
      at tech.beshu.ror.es.ReadonlyRestPlugin.lambda$null$1(ReadonlyRestPlugin.java:152) ~[?:?]
      at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:262) [elasticsearch-5.6.11.jar:5.6.11]

Please let me know if there's anything I can add to the ticket to help in diagnosing the issue.

@dekimsey

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

I was able to build older versions of the package for es5.6.11 using the following commands.

I will test older versions of 1.18 tomorrow. Just want to record this information as I walk out for the day.

Older versions

$ git checkout v
$ docker run --rm -it -w /src -v $PWD/out:/src/es53x/build/distributions/ -v $PWD:/src openjdk:8-jdk-slim ./gradlew --stacktrace es53x:ror '-PesVersion=5.6.11'
$ scp ./out/*.zip my-es-host:
...

1.16.34

Started without issue.

1.17.6

Started, but did not like my proxy_auth: '*' nor my headers: ["host:localhost:*"] syntax. Switching to a more explicit worked.:

readonlyrest:
  access_control_rules:
     - ...
        proxy_auth:
             proxy_auth_config: oauth
             users: '*'
     - ...
        host: ["127.0.0.1/32"]

Note, I did not test 1.17.7, it doesn't appear to be tagged (only available as a pre1).

Had trouble building this. It seems gradle 1.10 has a bug [gradle/gradle#6612]. Updating to gradle 1.10.3 appears to have resolved the build issue. (See excerpt that follows).

> Task :core:compileJava
> Task :core:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:compileJava'.
> No incremental compile snapshot data available for /root/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpasyncclient/4.1.3/34c56f43fd3255fc239ffe33d0fbfb8195be6a24/httpasyncclient-4.1.3.jar with hash 8726274dd5c184024d9ce0c906fddcb8.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':core:compileJava'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
...
Caused by: java.lang.IllegalStateException: No incremental compile snapshot data available for /root/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpasyncclient/4.1.3/34c56f43fd3255fc239ffe33d0fbfb8195be6a24/httpasyncclient-4.1.3.jar with hash 8726274dd5c184024d9ce0c906fddcb8.
	at org.gradle.api.internal.tasks.compile.incremental.classpath.DefaultClasspathEntrySnapshotCache.getClasspathEntrySnapshots(DefaultClasspathEntrySnapshotCache.java:44)
...
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0839c7d8..4bed38ed 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

Feedback

Please make older versions of the plugin available for download. This was a real pain to debug because I had to also compile (and figure out how to compile) older versions of the package. While I recognize some may not want older versions laying around, in some environments one simply cannot upgrade to the very latest version. Sometimes the application does not work, others because it can be disruptive.

@sscarduzio

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

@dekimsey if you urgently need an old version because of an exceptional case like this, please tell us which one you want and for what ES version, we will provide you (and anybody else).

@coutoPL any idea?

@dekimsey

This comment has been minimized.

Copy link
Author

commented Jul 10, 2019

Thank you, but I don't think I'd try asking for older versions because I'm having to bisect them to figure out when the issue was introduced. It would have potentially been many versions and arduous. In total I've tested 6 here (counting my archived old version).

1.18

1.18.0 success.
1.18.1 success.
1.18.2 failure. (Just re-iterating since my configs changed, though that stack-trace doesn't sound like a configuration related issue to me).

So it looks like the issue was introduced in 1.18.2. Let me know if there's anything else I can provide that will help identify what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.