Grant Netty permission to read system somaxconn
When Netty listens on a socket, it specifies the established connection backlog for the socket. On Linux, Netty tries to read the system-wide configuration for this from /proc/sys/net/core/somaxconn and falls back to a default value when it can not read this value. This commit grants Netty permission to read this file so that it can honor the system-wide configuration for the connection backlog for sockets that it is listening on. This also removes an obnoxious stack trace that appears when Netty logging is set to debug logging. Relates #21840
This commit is contained in:
parent
360b74eda8
commit
a6082eb563
|
@ -17,8 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
grant codeBase "${codebase.netty-common-4.1.6.Final.jar}" {
|
||||
// for reading the system-wide configuration for the backlog of established sockets
|
||||
permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read";
|
||||
};
|
||||
|
||||
grant codeBase "${codebase.netty-transport-4.1.6.Final.jar}" {
|
||||
// Netty NioEventLoop wants to change this, because of https://bugs.openjdk.java.net/browse/JDK-6427854
|
||||
// the bug says it only happened rarely, and that its fixed, but apparently it still happens rarely!
|
||||
permission java.util.PropertyPermission "sun.nio.ch.bugLevel", "write";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue