Pivotal Knowledge Base

Follow

Linux users and groups are not syncing into the Ranger GUI

Environment

Product Version
Pivotal HD 3.0.x
Pivotal HDP  2.2.x, 2.3.x, 2.4.x
Ranger 0.5

Symptom

Linux users and groups to do not sync correctly into the Ranger UI.

The following error is seen in /var/log/ranger/usersync/usersync.log:

01 Sep 2016 11:51:38  WARN UnixUserGroupBuilder [UnixUserSyncThread] - Group Name could not be found for group id: [7201659]. Skipping adding user [zabbix] with id [996].
01 Sep 2016 11:51:38  WARN UnixUserGroupBuilder [UnixUserSyncThread] - Unix UserId: []: can not be parsed as valid int. considering as  -1.
java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:592)
        at java.lang.Integer.parseInt(Integer.java:615)
        at org.apache.ranger.unixusersync.process.UnixUserGroupBuilder.buildUnixUserList(UnixUserGroupBuilder.java:153)
        at org.apache.ranger.unixusersync.process.UnixUserGroupBuilder.buildUserGroupInfo(UnixUserGroupBuilder.java:102)
        at org.apache.ranger.unixusersync.process.UnixUserGroupBuilder.init(UnixUserGroupBuilder.java:65)
        at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:55)
        at java.lang.Thread.run(Thread.java:745)

Cause

This is caused by an incorrectly formatted /etc/passwd or /etc/group file.

Resolution

Check for formatting issues in /etc/passwd or /etc/group files. For example, the ";" in the line before is a typo that caused the above error:

gpadmin:x:7200665:43457;:/home/gpadmin:/sbin/nologin

Correct the typo and restart Ranger via Ambari.

 

 

Comments

Powered by Zendesk