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

Trino version 467 Apache Ranger Plugin and warnings & errors seen in Server.log ? Are these normal or some issues with config ? #24497

Closed
sanjay92gupta opened this issue Dec 16, 2024 · 4 comments

Comments

@sanjay92gupta
Copy link

Following errors are in server.log after I enable Apache Ranger Plugin
Any idea whether this is normal or issues with configuration.
I see Trino Server was started though

2024-12-16T22:16:44.229Z        INFO    main    Bootstrap       ranger.plugin.config.resource  []       [etc/ranger-trino-security.xml, etc/ranger-trino-audit.xml]  List of paths to Ranger plugin configuration files
2024-12-16T22:16:44.229Z        INFO    main    Bootstrap       ranger.service.name            ----     trino                                                        Name of Ranger service containing policies to enforce
2024-12-16T22:16:44.532Z        ERROR   main    org.apache.ranger.authorization.hadoop.config.RangerConfiguration       addResourceIfReadable(ranger-trino-audit.xml): couldn't find resource file location
2024-12-16T22:16:44.534Z        ERROR   main    org.apache.ranger.authorization.hadoop.config.RangerConfiguration       addResourceIfReadable(ranger-trino-security.xml): couldn't find resource file location
2024-12-16T22:16:44.534Z        ERROR   main    org.apache.ranger.authorization.hadoop.config.RangerConfiguration       addResourceIfReadable(ranger-trino-policymgr-ssl.xml): couldn't find resource file location
2024-12-16T22:16:44.535Z        ERROR   main    org.apache.ranger.authorization.hadoop.config.RangerConfiguration       addResourceIfReadable(ranger-trino-trino-audit.xml): couldn't find resource file location
2024-12-16T22:16:44.535Z        ERROR   main    org.apache.ranger.authorization.hadoop.config.RangerConfiguration       addResourceIfReadable(ranger-trino-trino-security.xml): couldn't find resource file location
2024-12-16T22:16:44.535Z        ERROR   main    org.apache.ranger.authorization.hadoop.config.RangerConfiguration       addResourceIfReadable(ranger-trino-trino-policymgr-ssl.xml): couldn't find resource file location
2024-12-16T22:16:44.537Z        INFO    main    org.apache.ranger.authorization.hadoop.config.RangerPluginConfig       

2024-12-16T22:16:45.485Z        WARN    main    org.apache.ranger.plugin.conditionevaluator.RangerScriptConditionEvaluator      initScriptEngineCreator(): failed to instantiate engine creator org.apache.ranger.plugin.util.NashornScriptEngineCreator
java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting/ClassFilter
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:462)
        at java.base/java.lang.Class.forName(Class.java:453)
        at org.apache.ranger.plugin.util.ScriptEngineUtil.initScriptEngineCreator(ScriptEngineUtil.java:107)
        at org.apache.ranger.plugin.util.ScriptEngineUtil.getScriptEngineCreator(ScriptEngineUtil.java:87)
        at org.apache.ranger.plugin.util.ScriptEngineUtil.createScriptEngine(ScriptEngineUtil.java:52)
        at org.apache.ranger.plugin.conditionevaluator.RangerScriptConditionEvaluator.init(RangerScriptConditionEvaluator.java:73)
        at org.apache.ranger.plugin.conditionevaluator.RangerScriptTemplateConditionEvaluator.init(RangerScriptTemplateConditionEvaluator.java:41)
        at org.apache.ranger.plugin.policyevaluator.RangerCustomConditionEvaluator.getConditionEvaluator(RangerCustomConditionEvaluator.java:131)
        at org.apache.ranger.plugin.policyevaluator.RangerCustomConditionEvaluator.getConditionEvaluators(RangerCustomConditionEvaluator.java:101)
        at org.apache.ranger.plugin.policyevaluator.RangerCustomConditionEvaluator.getPolicyItemConditionEvaluators(RangerCustomConditionEvaluator.java:79)
        at org.apache.ranger.plugin.policyevaluator.RangerDefaultPolicyItemEvaluator.init(RangerDefaultPolicyItemEvaluator.java:63)
        at org.apache.ranger.plugin.policyevaluator.RangerDefaultPolicyEvaluator.createPolicyItemEvaluators(RangerDefaultPolicyEvaluator.java:1229)
        at org.apache.ranger.plugin.policyevaluator.RangerDefaultPolicyEvaluator.init(RangerDefaultPolicyEvaluator.java:138)

@ebyhr
Copy link
Member

ebyhr commented Dec 16, 2024

cc: @kokosing @mneethiraj

@sanjay92gupta sanjay92gupta changed the title Trino version 467 Apache Ranger Plugin and errors seen in Server.log ? Are these normal or some issues with config ? Trino version 467 Apache Ranger Plugin and warnings & errors seen in Server.log ? Are these normal or some issues with config ? Dec 17, 2024
@mneethiraj
Copy link
Contributor

@sanjay92gupta - these WARN logs can be ignored. These warning do not cause any failure or loss of functionality. These messages logged with Ranger plugin fail loading few JDK classes (which are not available since JDK15). In such cases, Ranger plugin uses corresponding implementations in later JDK version. I will file an Apache Ranger JIRA to track update of Apache Ranger libraries to remove these warning logs.

@ebyhr ebyhr closed this as completed Dec 25, 2024
@viethqb
Copy link

viethqb commented Jan 7, 2025

@sanjay92gupta I also have the same warning, besides I can't send audit logs to ES. I workaround by editing the ranger libraries org.apache.ranger_ranger-plugins-common-2.5.0.jar and org.apache.ranger_ranger-plugins-audit-2.5.0.jar => I push audit logs to opensearch. You can refer here: https://github.com/viethqb/trino-ranger-access-control-poc/

@gagan211
Copy link

@mneethiraj what about the error log that are present ? as i am facing the same errors when i am using the apache doris connector.

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

No branches or pull requests

5 participants