Siddhesh Phatak created RANGER-4660:
---------------------------------------

             Summary: While creating service, ranger logs show error if service 
name does not have underscore ('_') in it.
                 Key: RANGER-4660
                 URL: https://issues.apache.org/jira/browse/RANGER-4660
             Project: Ranger
          Issue Type: Bug
          Components: admin, Ranger
            Reporter: Siddhesh Phatak
            Assignee: Siddhesh Phatak


When we create a service, a linked tag service also gets created for the same. 
While doing so, ranger generates a name for the tag service based on the 
service name. In this, ranger replaces word after the last underscore with 
'tag'. If the name does not contain any underscore, it returns null. Due to 
this, ranger tries to create a tag service with name null. This causes errors 
and service creation takes lot of time because of this.

Following errors are seen in logs

ranger logs
2024-01-17 09:47:26,894 [http-nio-6080-exec-5] INFO [ServiceREST.java:4365] 
Successfully retrieved resource-service:[myhbase]
2024-01-17 09:47:27,862 [http-nio-6080-exec-5] INFO [ServiceREST.java:4381] 
creating service [null]
2024-01-17 09:47:33,440 [http-nio-6080-exec-5] INFO [ServiceREST.java:4365] 
Successfully retrieved resource-service:[myhbase]
2024-01-17 09:47:33,440 [http-nio-6080-exec-5] INFO [ServiceREST.java:4381] 
creating service [null]
2024-01-17 09:47:40,524 [http-nio-6080-exec-5] INFO [ServiceREST.java:4365] 
Successfully retrieved resource-service:[myhbase]
2024-01-17 09:47:40,525 [http-nio-6080-exec-5] INFO [ServiceREST.java:4381] 
creating service [null]

catalina log
[EL Warning]: 2024-01-17 09:45:15.324--ClientSession(1172639212)--Exception 
[EclipseLink-4002] (Eclipse Persistence Services - 
2.7.12.v20230209-e5c4074ef3): 
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: Column 
'obj_name' cannot be null
Error Code: 1048
Call: INSERT INTO x_data_hist (action, content, CREATE_TIME, from_time, 
obj_class_type, obj_guid, obj_id, obj_name, to_time, UPDATE_TIME, version) 
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
        bind => [11 parameters bound]
Query: ValueReadQuery(name="x_data_hist_SEQ" sql="SELECT LAST_INSERT_ID()")





--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to