Ranger1.2.1+LDAP bug fix

说明:ranger1.2.1  在集成LDAP使用过程中发现用户数据同步参数不生效,排查发现是一个bug。

ranger.usersync.sleeptimeinmillisbetweensynccycle 默认是3600000  1h同步一次。实际生产不能满足。

在ambari页面修改也不能生效。排查ranger日志发现并没有生效。

具体可见 https://issues.apache.org/jira/browse/RANGER-681

ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java 代码修改后 重新编译 打包  替换 class

 

Linux centos 安装 maven 3.5.4

1.编译环境 maven 和jdk

 

直接下载

二、安装与部署

  1、maven 解压

1
2
3
4
# maven 解压
tar zvxf apache-maven-3.5.4-bin.tar.gz
# 把maven转换到指定目录
mv apache-maven-3.5.4 /usr/local/

  2、修改配置文件

1
2
3
4
5
# 打开全局配置文件
vim /etc/profile
# 添加maven全局配置参数
export MAVEN_HOME=/usr/local/apache-maven-3.5.4/
export PATH=$MAVEN_HOME/bin:$PATH# 让配置文件生效source /etc/profile

  3、查询是否成功

1
2
# 查询maven版本号
mvn --version

  4、配置阿里云镜像仓库

  • 如下图把参数放到对应参数下

 

1
2
3
4
5
6
7
# 配置参数
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

 

说明: jdk1.8+、maven 3.3.3+

 

 

 

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (generate-version-annotation) on project ranger-util: An Ant BuildException has occured: exec returned: 1

[ERROR] around Ant part ...<exec failοnerrοr="true" executable="python">... @ 4:48 in /mnt/vdb/ranger-ranger-1.2/ranger-util/target/antrun/build-main.xml

[ERROR] -> [Help 1]

 

异常原因:

yum -y install git

 

编译命令:

 

mvn clean compile package assembly:assembly install -DskipTests -Drat.skip=true

 

 

ranger 1.2 集成ladp 同步用户信息 同步时间频率bug问题:

  1. Ranger
  2. RANGER-681

Update default sync intervals for LDAP and UNIX

 

https://issues.apache.org/jira/browse/RANGER-681

 

https://reviews.apache.org/r/39078/diff/2/#0

 

https://reviews.apache.org/r/39078/diff/2#0

 

ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java 

 

ranger bug 修改:

ranger-usersync/dist/unixusersync-1.2.0.3.1.0.0-78.jar 中 org.apache.ranger.unixusersync.config  UserGroupSyncConfig class 文件

 

[root@hdp2 usersync]# pwd

/var/log/ranger/usersync

[root@hdp2 usersync]# cat usersync.log|grep "LdapDeltaUserGroupBuilder updateSink started"

 

 

 

修复好的jar可直接替换使用  unixusersync-1.2.0.3.1.0.0-78.jar

 

 

然后重启 RANGER USERSYNC 这个服务就ok

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值