Open VisionaryAries opened 9 months ago
Did you use create external catalog to configure ranger?
We created hive catalog before integrating with ranger, so the external catalog don't configure ranger.
It seems that the configuration file is not configured correctly. Show me ranger-starrocks-security.xml under the fe/conf directory.
Please see the attachment, thanks. ranger-starrocks-security.xml.zip
need ranger-policymgr-ssl.xml in fe/conf
@HangyuanLiu after adding ranger-policymgr-ssl.xml
in fe/conf
, other files are showed in logs also needed. So where I can download these files?
2023-12-04 19:11:22,532 ERROR (UNKNOWN 10.10.16.198_9010_1696992935521(-1)|1) [RangerConfiguration.addResourceIfReadable():61] addResourceIfReadable(ranger-starrocks-audit.xml): couldn't find resource file location
2023-12-04 19:11:22,631 ERROR (UNKNOWN 10.10.16.198_9010_1696992935521(-1)|1) [RangerConfiguration.addResourceIfReadable():61] addResourceIfReadable(ranger-starrocks-policymgr-ssl.xml): couldn't find resource file location
2023-12-04 19:11:22,633 ERROR (UNKNOWN 10.10.16.198_9010_1696992935521(-1)|1) [Configuration.loadResource():3097] error parsing conf file:/opt/StarRocks-latest/fe/conf/xasecure-audit.xml
java.io.FileNotFoundException: /opt/StarRocks-latest/fe/conf/xasecure-audit.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_181]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_181]
at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_181]
at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[?:1.8.0_181]
@HangyuanLiu after adding
ranger-policymgr-ssl.xml
infe/conf
, other files are showed in logs also needed. So where I can download these files?2023-12-04 19:11:22,532 ERROR (UNKNOWN 10.10.16.198_9010_1696992935521(-1)|1) [RangerConfiguration.addResourceIfReadable():61] addResourceIfReadable(ranger-starrocks-audit.xml): couldn't find resource file location 2023-12-04 19:11:22,631 ERROR (UNKNOWN 10.10.16.198_9010_1696992935521(-1)|1) [RangerConfiguration.addResourceIfReadable():61] addResourceIfReadable(ranger-starrocks-policymgr-ssl.xml): couldn't find resource file location 2023-12-04 19:11:22,633 ERROR (UNKNOWN 10.10.16.198_9010_1696992935521(-1)|1) [Configuration.loadResource():3097] error parsing conf file:/opt/StarRocks-latest/fe/conf/xasecure-audit.xml java.io.FileNotFoundException: /opt/StarRocks-latest/fe/conf/xasecure-audit.xml (No such file or directory) at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_181] at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_181] at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_181] at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[?:1.8.0_181]
Maybe xasecure-audit.xml
is actually this file: https://github.com/StarRocks/ranger/blob/master/plugin-starrocks/conf/ranger-starrocks-audit.xml
@HangyuanLiu Please help. Thanks!
I ran into the same issue with StarRocks 3.2.2, after adding https://github.com/StarRocks/ranger/blob/master/plugin-starrocks/conf/ranger-starrocks-audit.xml to fe/conf, FE still restarted failed with the following error:
2024-02-07 15:25:23,751 WARN (UNKNOWN 10.196.68.218_29010_1707186521097(-1)|1) [NativeCodeLoader.<clinit>():60] Unable to load native-hadoop library for your platform... using builtin-java classes where applicab
le
2024-02-07 15:25:24,191 INFO (Ranger async Audit cleanup|96) [AuditProviderFactory$RangerAsyncAuditCleanup.run():501] RangerAsyncAuditCleanup: Waiting to audit cleanup start signal
2024-02-07 15:25:24,293 INFO (UNKNOWN 10.196.68.218_29010_1707186521097(-1)|1) [RangerBasePlugin.init():243] Created PolicyRefresher Thread(PolicyRefresher(serviceName=starrocks-test)-98)
2024-02-07 15:25:24,927 ERROR (UNKNOWN 10.196.68.218_29010_1707186521097(-1)|1) [StarRocksFE.start():192] StarRocksFE start failed
java.lang.NoSuchMethodError: javax.ws.rs.core.NewCookie.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;ILjava/util/Date;ZZ)V
at org.glassfish.jersey.message.internal.CookiesParser$MutableNewCookie.getImmutableNewCookie(CookiesParser.java:130) ~[jersey-common-2.36.jar:?]
at org.glassfish.jersey.message.internal.CookiesParser.parseNewCookie(CookiesParser.java:176) ~[jersey-common-2.36.jar:?]
at org.glassfish.jersey.message.internal.HttpHeaderReader.readNewCookie(HttpHeaderReader.java:335) ~[jersey-common-2.36.jar:?]
at org.glassfish.jersey.message.internal.NewCookieProvider.fromString(NewCookieProvider.java:87) ~[jersey-common-2.36.jar:?]
at org.glassfish.jersey.message.internal.NewCookieProvider.fromString(NewCookieProvider.java:34) ~[jersey-common-2.36.jar:?]
at javax.ws.rs.core.NewCookie.valueOf(NewCookie.java:126) ~[jsr311-api-1.1.1.jar:?]
at com.sun.jersey.api.client.ClientResponse.getCookies(ClientResponse.java:783) ~[jersey-client-1.19.4.jar:1.19.4]
at org.apache.ranger.admin.client.RangerAdminRESTClient.setCookieReceivedFromRoleDownloadSession(RangerAdminRESTClient.java:1364) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.admin.client.RangerAdminRESTClient.getRolesIfUpdatedWithCred(RangerAdminRESTClient.java:1220) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.admin.client.RangerAdminRESTClient.getRolesIfUpdated(RangerAdminRESTClient.java:167) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.plugin.util.RangerRolesProvider.loadUserGroupRolesFromAdmin(RangerRolesProvider.java:183) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.plugin.util.RangerRolesProvider.loadUserGroupRoles(RangerRolesProvider.java:123) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.plugin.util.PolicyRefresher.loadRoles(PolicyRefresher.java:495) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.plugin.util.PolicyRefresher.startRefresher(PolicyRefresher.java:144) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at org.apache.ranger.plugin.service.RangerBasePlugin.init(RangerBasePlugin.java:245) ~[ranger-plugins-common-2.4.0.jar:2.4.0]
at com.starrocks.privilege.RangerAccessController.<init>(RangerAccessController.java:42) ~[starrocks-fe.jar:?]
at com.starrocks.privilege.ranger.starrocks.RangerStarRocksAccessController.<init>(RangerStarRocksAccessController.java:40) ~[starrocks-fe.jar:?]
at com.starrocks.sql.analyzer.Authorizer.<clinit>(Authorizer.java:51) ~[starrocks-fe.jar:?]
at com.starrocks.server.CatalogMgr.replayCreateCatalog(CatalogMgr.java:259) ~[starrocks-fe.jar:?]
at com.starrocks.server.CatalogMgr.load(CatalogMgr.java:503) ~[starrocks-fe.jar:?]
at com.starrocks.server.GlobalStateMgr.loadImage(GlobalStateMgr.java:1579) ~[starrocks-fe.jar:?]
at com.starrocks.server.GlobalStateMgr.initialize(GlobalStateMgr.java:1131) ~[starrocks-fe.jar:?]
at com.starrocks.StarRocksFE.start(StarRocksFE.java:135) ~[starrocks-fe.jar:?]
at com.starrocks.StarRocksFE.main(StarRocksFE.java:84) ~[starrocks-fe.jar:?]
java.lang.NoSuchMethodError: javax.ws.rs.core.NewCookie.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;ILjava/util/Date;ZZ)V
which the jvm version? jsr311-api-1.1.1.jar and jersey-client-1.19.4.jar has collision
https://github.com/StarRocks/ranger/blob/master/plugin-starrocks/conf/ranger-policymgr-ssl.xml
I also met this error, the document didn't mentioned that SR needs this xml file, please help add relevant instructions in the future: https://docs.starrocks.io/docs/administration/user_privs/ranger_plugin/#configure-starrocks-service-on-ranger-admin
StarRocks version: 3.1.4
I have successfully installed ranger and added StarRocks service in ranger-admin, but failed to restart
FE
after adding the fileranger-starrocks-security.xml
infe/conf
. The error message are as following.