Error 401 Unauthorized when trying to create a project using API

book

Article ID: 220874

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction



 System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

We manage to re-run the job and then it worked, but now we need to understand why this happened.

 

Cause

2021-07-29 20:15:27.070 UTC [INFO ] [https-openssl-nio-8443-exec-10] --- [U:][M:][P:] c.c.t.s.LDAPUtil: Authentication failed for user: SEADMBatch javax.naming.PartialResultException: Unprocessed Continuation Reference(s) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2917) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2891) at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.getNextBatch(AbstractLdapNamingEnumeration.java:148) at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(AbstractLdapNamingEnumeration.java:217) at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(AbstractLdapNamingEnumeration.java:189) at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:365) ... 95 common frames omitted

Environment

Release : 4.9.1

Component :

Resolution

 

looking at the TDM Web logs,

2021-07-29 20:20:22.573 UTC [ERROR] [Thread-189 ] --- [U:][M:][P:] c.c.t.t.d.TDODSession: TDoD Authentication failed. Error: org.apache.axis.AxisFault: AuthenticateUser: failed to authenticate user ABCDEFG: : TDMoDFault at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

TDMServcices log it shows
021-07-29 20:20:22.245 UTC [DEBUG] [https-openssl-nio-8443-exec-2] --- [U:][M:][P:]                                  c.c.t.s.LDAPUtil:  Fetching LDAP configuration

2021-07-29 20:20:22.339 UTC [INFO ] [https-openssl-nio-8443-exec-2] --- [U:][M:][P:]                                  c.c.t.s.LDAPUtil:  Authentication failed for user: DPL5657


so looks like the LDAP authentication failed if this is the user you  were working with at the time.
Could have just been the LDAP was busy or unreachable at the time. If the LDAP authentication cannot go through the job or process will fail. 

Work with LDAP admin