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

WARNING: A terminally deprecated method in java.lang.System has been called #80344

Closed
michaelgarde opened this issue Nov 4, 2021 · 7 comments
Assignees
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team

Comments

@michaelgarde
Copy link

I'm running elasticsearch 7.15.1 from a docker-compose setup and get the following warnings

elasticsearch  | WARNING: A terminally deprecated method in java.lang.System has been called
elasticsearch  | WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Elasticsearch (file:/usr/share/elasticsearch/lib/elasticsearch-7.15.1.jar)
elasticsearch  | WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Elasticsearch
elasticsearch  | WARNING: System::setSecurityManager will be removed in a future release
(kafka.utils.Log4jControllerRegistration$)
elasticsearch  | WARNING: A terminally deprecated method in java.lang.System has been called
elasticsearch  | WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Security (file:/usr/share/elasticsearch/lib/elasticsearch-7.15.1.jar)
elasticsearch  | WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Security
elasticsearch  | WARNING: System::setSecurityManager will be removed in a future release

I'm not seeing this with version 7.15.0.

This was also raised in https://discuss.elastic.co/t/warnings-when-service-starts/286928 but i could not find an issue here on GitHub, as requested.

@ebadyano ebadyano added the :Core/Infra/Core Core issues without another label label Nov 5, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Nov 5, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@williamrandolph
Copy link
Contributor

Thank you for reporting this. It's something that we've been seeing, but it is good to have a public issue for user awareness and discussion.

Elasticsearch has used the Java Security Manager for many years now in order to limit the actions the server and the plugins can make.

The JDK maintainers proposed in JEP 411 to deprecate and remove the Security Manager. The warnings you see here are part of the deprecation message. We (Elasticsearch) are aware that the Security Manager emits such warnings starting Java 17 (which is used by elasticsearch 7.15.1).

This warning is safe to ignore. We are working on a plan to replace the deprecated methods. We are also considering ways to convey the same information but make the warning look less dire.

@Mollyss725
Copy link

Mollyss725 commented Nov 24, 2021

I have the same issue in 7.15.2 and my system ram is 99%.I have to stop it.It happened when using docker image:docker run -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.15.2
Pls check. @elastic/es-core-infra (Team:Core/Infra)

@ChrisHegarty
Copy link
Contributor

@Mollyss725 The warning is emitted by the JDK runtime, when running with JDK 17. You are running with JDK 17, right? (the warning is not emitted for any JDK release prior to JDK 17)

The fix for #80462 has the affect of suppressing (or otherwise avoiding or bypassing) the warning when Elasticsearch is starting up, when running on JDK 17 (or greater). The fix for #80462 has been integrated into 7.16, 8.0, and 8.1. It is not in 7.15.2, and there are no plans to backport it to that release.

@Mollyss725
Copy link

Mollyss725 commented Nov 24, 2021 via email

@tutengdihuang

This comment has been minimized.

@karenlarkina
Copy link

karenlarkina commented Feb 12, 2023

I got a similar issue with JDK 19.0.1 today with gradle build.

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue
WARNING: Please consider reporting this to the maintainers of edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue
WARNING: System::setSecurityManager will be removed in a future release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

8 participants