Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ranger LDAP error: Failed to add portal user (HDP-3.0.1.0)

Highlighted

Ranger LDAP error: Failed to add portal user (HDP-3.0.1.0)

New Contributor

Hi,

My cluster is Kerberized and I'm planning to integrate Ranger with FreeIPA.

My Auth Method is LDAP in Ranger and Sync source is LDAP/AD.

I've provided the values for required fields, users are also seen in usersync.log file as well but its not syncing with Ranger.

Here's the sample of the Usersync log error. Kindly check attachment for full logs.

21 Dec 2018 12:05:08  INFO UnixAuthenticationService [main] - Starting User Sync Service!
21 Dec 2018 12:05:08  INFO AbstractMapper [UnixUserSyncThread] - Initializing for ranger.usersync.mapping.username.regex
21 Dec 2018 12:05:08  INFO AbstractMapper [UnixUserSyncThread] - Initializing for ranger.usersync.mapping.groupname.regex
21 Dec 2018 12:05:08  INFO LdapUserGroupBuilder [UnixUserSyncThread] - LdapUserGroupBuilder created
21 Dec 2018 12:05:08  INFO UserGroupSyncConfig [UnixUserSyncThread] - Sleep Time Between Cycle can not be lower than [3600000] millisec. resetting to min value.
21 Dec 2018 12:05:08  INFO UserGroupSync [UnixUserSyncThread] - initializing sink: org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder
21 Dec 2018 12:05:08  INFO PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Using principal = rangerusersync@XXXXXX.COM and keytab = /etc/security/keytabs/ranger_user_sync.keytab
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to build Group List : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.buildGroupList(PolicyMgrUserGroupBuilder.java:590)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$000(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$1.run(PolicyMgrUserGroupBuilder.java:215)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$1.run(PolicyMgrUserGroupBuilder.java:211)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.buildUserGroupInfo(PolicyMgrUserGroupBuilder.java:211)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.init(PolicyMgrUserGroupBuilder.java:198)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:51)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 14 more
21 Dec 2018 12:05:09  INFO AbstractMapper [UnixUserSyncThread] - Initializing for ranger.usersync.mapping.username.regex
21 Dec 2018 12:05:09  INFO AbstractMapper [UnixUserSyncThread] - Initializing for ranger.usersync.mapping.groupname.regex
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - LdapUserGroupBuilder created
21 Dec 2018 12:05:09  INFO UserGroupSync [UnixUserSyncThread] - initializing source: org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - LdapUserGroupBuilder initialization started
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - LdapUserGroupBuilder initialization completed with --  ldapUrl: ldap://prd-freeipa001-prd-clouddb077.XXXXXX.nm1:389,  ldapBindDn: cn=Directory Manager,  ldapBindPassword: ***** ,  ldapAuthenticationMechanism: simple,  searchBase: cn=users,cn=accounts,dc=XXXXXX,dc=com,  userSearchBase: [cn=users,cn=accounts,dc=XXXXXX,dc=com],  userSearchScope: 2,  userObjectClass: person,  userSearchFilter: ,  extendedUserSearchFilter: (objectclass=person),  userNameAttribute: uid,  userSearchAttributes: [uid],  userGroupNameAttributeSet: [uid],  pagedResultsEnabled: true,  pagedResultsSize: 500,  groupSearchEnabled: false,  groupSearchBase: [cn=groups,cn=accounts,dc=XXXXXX,dc=com],  groupSearchScope: 2,  groupObjectClass: group,  groupSearchFilter: ,  extendedGroupSearchFilter: (&(objectclass=group)(|(memberof={0})(memberof={1}))),  extendedAllGroupsSearchFilter: (&(objectclass=group)),  groupMemberAttributeName: memberof,  groupNameAttribute: cn, groupSearchAttributes: [cn, memberof],  groupUserMapSyncEnabled: false, groupSearchFirstEnabled: false, userSearchEnabled: true,  ldapReferral: follow
21 Dec 2018 12:05:09  INFO UserGroupSync [UnixUserSyncThread] - Begin: initial load of user/group from source==>sink
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - LDAPUserGroupBuilder updateSink started
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Performing user search first
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: admin, groupName: admin
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 1, userName: admin, groupList: [admin]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: shesh.kumar, groupName: shesh.kumar
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 2, userName: shesh.kumar, groupList: [shesh.kumar]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: ambari-server, groupName: ambari-server
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 3, userName: ambari-server, groupList: [ambari-server]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: ambari-server-lucy, groupName: ambari-server-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 4, userName: ambari-server-lucy, groupList: [ambari-server-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: hbase-lucy, groupName: hbase-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 5, userName: hbase-lucy, groupList: [hbase-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: hdfs-lucy, groupName: hdfs-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 6, userName: hdfs-lucy, groupList: [hdfs-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: ambari-qa-lucy, groupName: ambari-qa-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 7, userName: ambari-qa-lucy, groupList: [ambari-qa-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: spark-lucy, groupName: spark-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 8, userName: spark-lucy, groupList: [spark-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: yarn-ats-lucy, groupName: yarn-ats-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 9, userName: yarn-ats-lucy, groupList: [yarn-ats-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: zeppelin-lucy, groupName: zeppelin-lucy
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 10, userName: zeppelin-lucy, groupList: [zeppelin-lucy]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: animesh.chandra, groupName: animesh.chandra
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 11, userName: animesh.chandra, groupList: [animesh.chandra]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: saurabh.deshpande, groupName: saurabh.deshpande
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 12, userName: saurabh.deshpande, groupList: [saurabh.deshpande]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_digigold_mysql_ingestion, groupName: svc_digigold_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 13, userName: svc_digigold_mysql_ingestion, groupList: [svc_digigold_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: shoyeb.ibuse, groupName: shoyeb.ibuse
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 14, userName: shoyeb.ibuse, groupList: [shoyeb.ibuse]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_referral_mysql_ingestion, groupName: svc_referral_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 15, userName: svc_referral_mysql_ingestion, groupList: [svc_referral_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_offerengine_mysql_ingestion, groupName: svc_offerengine_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 16, userName: svc_offerengine_mysql_ingestion, groupList: [svc_offerengine_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_symphony_mysql_ingestion, groupName: svc_symphony_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 17, userName: svc_symphony_mysql_ingestion, groupList: [svc_symphony_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_wallet_mysql_ingestion, groupName: svc_wallet_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 18, userName: svc_wallet_mysql_ingestion, groupList: [svc_wallet_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_nexus_mysql_ingestion, groupName: svc_nexus_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 19, userName: svc_nexus_mysql_ingestion, groupList: [svc_nexus_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_users_mysql_ingestion, groupName: svc_users_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 20, userName: svc_users_mysql_ingestion, groupList: [svc_users_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_iris_mysql_ingestion, groupName: svc_iris_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 21, userName: svc_iris_mysql_ingestion, groupList: [svc_iris_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_merchant_mysql_ingestion, groupName: svc_merchant_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 22, userName: svc_merchant_mysql_ingestion, groupList: [svc_merchant_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: svc_payment_mysql_ingestion, groupName: svc_payment_mysql_ingestion
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 23, userName: svc_payment_mysql_ingestion, groupList: [svc_payment_mysql_ingestion]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: sachidanand.sinha, groupName: sachidanand.sinha
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 24, userName: sachidanand.sinha, groupList: [sachidanand.sinha]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: airflow, groupName: airflow
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 25, userName: airflow, groupList: [airflow]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - longGroupName: rangerusersync, groupName: rangerusersync
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - Updating user count: 26, userName: rangerusersync, groupList: [rangerusersync]
21 Dec 2018 12:05:09  INFO LdapUserGroupBuilder [UnixUserSyncThread] - LDAPUserGroupBuilder.getUsers() completed with user count: 26
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add portal user
21 Dec 2018 12:05:09 ERROR LdapUserGroupBuilder [UnixUserSyncThread] - sink.addOrUpdateUser failed with exception: Failed to add portal user, for user: admin, groups: [admin]
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add portal user
21 Dec 2018 12:05:09 ERROR LdapUserGroupBuilder [UnixUserSyncThread] - sink.addOrUpdateUser failed with exception: Failed to add portal user, for user: ambari-server-lucy, groups: [ambari-server-lucy]
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
21 Dec 2018 12:05:09 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add portal user
21 Dec 2018 12:05:09 ERROR LdapUserGroupBuilder [UnixUserSyncThread] - sink.addOrUpdateUser failed with exception: Failed to add portal user, for user: svc_nexus_mysql_ingestion, groups: [svc_nexus_mysql_ingestion]
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add portal user
21 Dec 2018 12:05:10 ERROR LdapUserGroupBuilder [UnixUserSyncThread] - sink.addOrUpdateUser failed with exception: Failed to add portal user, for user: animesh.chandra, groups: [animesh.chandra]
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add portal user
21 Dec 2018 12:05:10 ERROR LdapUserGroupBuilder [UnixUserSyncThread] - sink.addOrUpdateUser failed with exception: Failed to add portal user, for user: yarn-ats-lucy, groups: [yarn-ats-lucy]
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add portal user
21 Dec 2018 12:05:10 ERROR LdapUserGroupBuilder [UnixUserSyncThread] - sink.addOrUpdateUser failed with exception: Failed to add portal user, for user: shesh.kumar, groups: [shesh.kumar]
21 Dec 2018 12:05:10 ERROR PolicyMgrUserGroupBuilder [UnixUserSyncThread] - Failed to add User : 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.getMUser(PolicyMgrUserGroupBuilder.java:1231)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.access$800(PolicyMgrUserGroupBuilder.java:79)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1195)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder$5.run(PolicyMgrUserGroupBuilder.java:1191)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addMUser(PolicyMgrUserGroupBuilder.java:1191)
at org.apache.ranger.unixusersync.process.PolicyMgrUserGroupBuilder.addOrUpdateUser(PolicyMgrUserGroupBuilder.java:365)
at org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:358)
at org.apache.ranger.usergroupsync.UserGroupSync.run(UserGroupSync.java:58)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 15 more
# hadoop org.apache.hadoop.security.HadoopKerberosName rangerusersync@REALM.COM
Name: rangerusersync@REALM.COM to rangerusersync
rangerusersync@prd-xxxx120:~$ kinit -kt /etc/security/keytabs/ranger_user_sync.keytab rangerusersync@REALM.COM

rangerusersync@prd-xxxx120:~$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: rangerusersync@REALM.COM
Valid starting     Expires            Service principal
12/21/18 12:10:26  12/22/18 12:10:26  krbtgt/REALM.COM@REALM.COM
           renew until 12/28/18 12:10:26

Please help me in resolving the issue.

Thanks,

Shesh Kumar

Attachment:
usersync-123.txt