Infrastructure at your Service

Morgan Patou

Documentum – Fixing issues with the D2 Privileged Client utility

In a previous blog, I talked about the D2 utility that can be used to automate the registration, approval and global management of the DFC Client IDs and Privileged Clients. The instructions I gave were the optimal (“normal”) ones… However, in reality, this utility or at least the shell script that is supposed to facilitate its execution is kinda bad. Therefore, if you really want to use it, then you first need to fix it.

I saw these issues so far on the shell script (‘D2PrivilegedClientUtil.sh‘):

  • D2 16.4.0:
    • No shebang
    • First line is just ‘:’
    • log4j_configuration variable is set to ‘/Documentum/config/log4j.properties’
  • D2 16.5.0:
    • Same as D2 16.4.0 (the 3 issues)
    • The file is in DOS format
  • D2 16.5.1:
    • Same as D2 16.5.0 (the 4 issues)

If you are trying to execute the D2 16.5.1 utility with its default content, you will therefore have the following:

[[email protected] d2privilegedclient]$ chmod 700 D2PrivilegedClientUtil.sh
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ ./D2PrivilegedClientUtil.sh -d ${gr} -u ${user} -p ${pw} | grep -v "|-"
./D2PrivilegedClientUtil.sh: line 1: $':\r': command not found
./D2PrivilegedClientUtil.sh: line 2: $'\r': command not found
./D2PrivilegedClientUtil.sh: line 4: $'\r': command not found
./D2PrivilegedClientUtil.sh: line 7: $'\r': command not found
Running D2PrivilegedClientUtil
./D2PrivilegedClientUtil.sh: line 9: $'\r': command not found
./D2PrivilegedClientUtil.sh: line 13: $'\r': command not found
./D2PrivilegedClientUtil.sh: line 20: $'\r': command not found
./D2PrivilegedClientUtil.sh: line 35: syntax error: unexpected end of file
[[email protected] d2privilegedclient]$

 

Therefore, the first issue you can see is the DOS format. Let’s fix this first:

[[email protected] d2privilegedclient]$ cp D2PrivilegedClientUtil.sh D2PrivilegedClientUtil.sh.orig
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ awk '{ sub("\r$", ""); print }' D2PrivilegedClientUtil.sh > temp.sh
[[email protected] d2privilegedclient]$ mv temp.sh D2PrivilegedClientUtil.sh
[[email protected] d2privilegedclient]$ chmod 700 D2PrivilegedClientUtil.sh
[[email protected] d2privilegedclient]$

 

Once the DOS format issue is fixed, let’s try again to execute the shell script:

[[email protected] d2privilegedclient]$ ./D2PrivilegedClientUtil.sh -d ${gr} -u ${user} -p ${pw} | grep -v "|-"
Running D2PrivilegedClientUtil

log4j:ERROR Could not read configuration file from URL [file:/Documentum/config/log4j.properties].
java.io.FileNotFoundException: /Documentum/config/log4j.properties (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:93)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:524)
        at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
        at com.documentum.fc.common.impl.logging.LoggingConfigurator.configureLog4j(LoggingConfigurator.java:141)
        at com.documentum.fc.common.impl.logging.LoggingConfigurator.performInitialConfiguration(LoggingConfigurator.java:33)
        at com.documentum.fc.common.DfLogger.<clinit>(DfLogger.java:624)
        at com.documentum.fc.common.impl.logging.LoggingConfigurator.onPreferencesInitialized(LoggingConfigurator.java:178)
        at com.documentum.fc.common.DfPreferences.initialize(DfPreferences.java:71)
        at com.documentum.fc.common.DfPreferences.getInstance(DfPreferences.java:43)
        at com.documentum.fc.client.DfSimpleDbor.getDefaultDbor(DfSimpleDbor.java:78)
        at com.documentum.fc.client.DfSimpleDbor.<init>(DfSimpleDbor.java:66)
        at com.documentum.fc.client.DfClient$ClientImpl.<init>(DfClient.java:350)
        at com.documentum.fc.client.DfClient.<clinit>(DfClient.java:766)
        at com.documentum.com.DfClientX.getLocalClient(DfClientX.java:43)
        at com.emc.xcp.rest.core.dfc.dao.impl.PrivilegeClientDaoImpl.fetchAndGrantPermissions(PrivilegeClientDaoImpl.java:40)
        at com.opentext.d2.util.D2PrivilegedClientUtil.main(D2PrivilegedClientUtil.java:90)
log4j:ERROR Ignoring configuration file [file:/Documentum/config/log4j.properties].
0 [main] WARN com.documentum.fc.common.impl.logging.LoggingConfigurator  - Using default log4j configuration
552 [main] WARN com.documentum.fc.client.impl.docbroker.ServerMapBuilder  - [DFC_DOCBROKER_REQUEST_FAILED] Request to Docbroker "documentum-server-0:1489" failed
DfIOException:: THREAD: main; MSG: [DM_SESSION_E_RPC_ERROR]error:  "Server communication failure"; ERRORCODE: 100; NEXT: null
        at com.documentum.fc.client.DfIOException.newCommunicationFailureException(DfIOException.java:16)
        at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.sendMessage(AbstractNetwiseRpcClient.java:216)
        at com.documentum.fc.client.impl.connection.docbroker.netwise.NetwiseDocbrokerRpcClient.requestObject(NetwiseDocbrokerRpcClient.java:58)
        at com.documentum.fc.client.impl.connection.docbroker.DocbrokerConnection.requestObject(DocbrokerConnection.java:80)
        at com.documentum.fc.client.impl.docbroker.MapBuilder.issueRequest(MapBuilder.java:34)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getDataFromDocbroker(ServerMapBuilder.java:169)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getMap(ServerMapBuilder.java:60)
        at com.documentum.fc.client.impl.docbroker.DocbrokerClient.getServerMap(DocbrokerClient.java:152)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoices(ServerChoiceManager.java:159)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoicesIfNecessary(ServerChoiceManager.java:148)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.getServerChoices(ServerChoiceManager.java:47)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.getServerChoices(DocbaseConnection.java:273)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.establishNewRpcClient(DocbaseConnection.java:227)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.open(DocbaseConnection.java:126)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:100)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:60)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionFactory.newDocbaseConnection(DocbaseConnectionFactory.java:26)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.createNewConnection(DocbaseConnectionManager.java:192)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getDocbaseConnection(DocbaseConnectionManager.java:122)
        at com.documentum.fc.client.impl.session.SessionFactory.newSession(SessionFactory.java:23)
        at com.documentum.fc.client.impl.session.PrincipalAwareSessionFactory.newSession(PrincipalAwareSessionFactory.java:44)
        at com.documentum.fc.client.impl.session.PooledSessionFactory.newSession(PooledSessionFactory.java:49)
        at com.documentum.fc.client.impl.session.SessionManager.getSessionFromFactory(SessionManager.java:134)
        at com.documentum.fc.client.impl.session.SessionManager.newSession(SessionManager.java:72)
        at com.documentum.fc.client.impl.session.SessionManager.getSession(SessionManager.java:191)
        at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.connect(ModuleManager.java:397)
        at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.init(ModuleManager.java:352)
        at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.getInstance(ModuleManager.java:43)
        at com.documentum.fc.client.security.impl.DfcIdentityPublisher.<init>(DfcIdentityPublisher.java:44)
        at com.documentum.fc.client.security.internal.RegistrationMgr.register(RegistrationMgr.java:34)
        at com.documentum.fc.impl.RuntimeContext.<clinit>(RuntimeContext.java:195)
        at com.documentum.fc.client.DfClient.<clinit>(DfClient.java:772)
        at com.documentum.com.DfClientX.getLocalClient(DfClientX.java:43)
        at com.emc.xcp.rest.core.dfc.dao.impl.PrivilegeClientDaoImpl.fetchAndGrantPermissions(PrivilegeClientDaoImpl.java:40)
        at com.opentext.d2.util.D2PrivilegedClientUtil.main(D2PrivilegedClientUtil.java:90)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
        at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2020)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1127)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
        at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
        at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
        at com.documentum.fc.impl.util.io.MessageChannel.writeSocket(MessageChannel.java:261)
        at com.documentum.fc.impl.util.io.MessageChannel.write(MessageChannel.java:219)
        at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.sendMessage(AbstractNetwiseRpcClient.java:211)
        ... 33 more
564 [main] WARN com.documentum.fc.client.impl.bof.classmgmt.ModuleManager  - [DFC_BOF_COULDNT_CONNECT_TO_REGISTRY] Unable to connect to module registry, docbase name gr_repo username dm_bof_registry.
DfDocbrokerException:: THREAD: main; MSG: [DFC_DOCBROKER_REQUEST_FAILED] Request to Docbroker "documentum-server-0:1489" failed; ERRORCODE: ff; NEXT: null
        at com.documentum.fc.client.DfDocbrokerException.newRequestFailedException(DfDocbrokerException.java:12)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getMap(ServerMapBuilder.java:72)
        at com.documentum.fc.client.impl.docbroker.DocbrokerClient.getServerMap(DocbrokerClient.java:152)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoices(ServerChoiceManager.java:159)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoicesIfNecessary(ServerChoiceManager.java:148)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.getServerChoices(ServerChoiceManager.java:47)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.getServerChoices(DocbaseConnection.java:273)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.establishNewRpcClient(DocbaseConnection.java:227)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.open(DocbaseConnection.java:126)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:100)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:60)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionFactory.newDocbaseConnection(DocbaseConnectionFactory.java:26)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.createNewConnection(DocbaseConnectionManager.java:192)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getDocbaseConnection(DocbaseConnectionManager.java:122)
        at com.documentum.fc.client.impl.session.SessionFactory.newSession(SessionFactory.java:23)
        at com.documentum.fc.client.impl.session.PrincipalAwareSessionFactory.newSession(PrincipalAwareSessionFactory.java:44)
        at com.documentum.fc.client.impl.session.PooledSessionFactory.newSession(PooledSessionFactory.java:49)
        at com.documentum.fc.client.impl.session.SessionManager.getSessionFromFactory(SessionManager.java:134)
        at com.documentum.fc.client.impl.session.SessionManager.newSession(SessionManager.java:72)
        at com.documentum.fc.client.impl.session.SessionManager.getSession(SessionManager.java:191)
        at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.connect(ModuleManager.java:397)
        at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.init(ModuleManager.java:352)
        at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.getInstance(ModuleManager.java:43)
        at com.documentum.fc.client.security.impl.DfcIdentityPublisher.<init>(DfcIdentityPublisher.java:44)
        at com.documentum.fc.client.security.internal.RegistrationMgr.register(RegistrationMgr.java:34)
        at com.documentum.fc.impl.RuntimeContext.<clinit>(RuntimeContext.java:195)
        at com.documentum.fc.client.DfClient.<clinit>(DfClient.java:772)
        at com.documentum.com.DfClientX.getLocalClient(DfClientX.java:43)
        at com.emc.xcp.rest.core.dfc.dao.impl.PrivilegeClientDaoImpl.fetchAndGrantPermissions(PrivilegeClientDaoImpl.java:40)
        at com.opentext.d2.util.D2PrivilegedClientUtil.main(D2PrivilegedClientUtil.java:90)
Caused by: DfIOException:: THREAD: main; MSG: [DM_SESSION_E_RPC_ERROR]error:  "Server communication failure"; ERRORCODE: 100; NEXT: null
        at com.documentum.fc.client.DfIOException.newCommunicationFailureException(DfIOException.java:16)
        at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.sendMessage(AbstractNetwiseRpcClient.java:216)
        at com.documentum.fc.client.impl.connection.docbroker.netwise.NetwiseDocbrokerRpcClient.requestObject(NetwiseDocbrokerRpcClient.java:58)
        at com.documentum.fc.client.impl.connection.docbroker.DocbrokerConnection.requestObject(DocbrokerConnection.java:80)
        at com.documentum.fc.client.impl.docbroker.MapBuilder.issueRequest(MapBuilder.java:34)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getDataFromDocbroker(ServerMapBuilder.java:169)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getMap(ServerMapBuilder.java:60)
        ... 28 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
        at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2020)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1127)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
        at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
        at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
        at com.documentum.fc.impl.util.io.MessageChannel.writeSocket(MessageChannel.java:261)
        at com.documentum.fc.impl.util.io.MessageChannel.write(MessageChannel.java:219)
        at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.sendMessage(AbstractNetwiseRpcClient.java:211)
        ... 33 more
577 [main] WARN com.documentum.fc.client.security.internal.RegistrationMgr  - [DFC_SECURITY_GR_PUBLICATION_FAILED] Publication of DFC instance with global registry failed
DfException:: THREAD: main; MSG: [DFC_BOF_GLOBAL_REGISTRY_UNAVAILABLE] Unable to connect to the global registry no session; ERRORCODE: ff; NEXT: null
        at com.documentum.fc.client.security.impl.DfcIdentityPublisher.<init>(DfcIdentityPublisher.java:55)
        at com.documentum.fc.client.security.internal.RegistrationMgr.register(RegistrationMgr.java:34)
        at com.documentum.fc.impl.RuntimeContext.<clinit>(RuntimeContext.java:195)
        at com.documentum.fc.client.DfClient.<clinit>(DfClient.java:772)
        at com.documentum.com.DfClientX.getLocalClient(DfClientX.java:43)
        at com.emc.xcp.rest.core.dfc.dao.impl.PrivilegeClientDaoImpl.fetchAndGrantPermissions(PrivilegeClientDaoImpl.java:40)
        at com.opentext.d2.util.D2PrivilegedClientUtil.main(D2PrivilegedClientUtil.java:90)
2019-09-07 11:12:03,915 UTC [ERROR] (main) - c.e.x.r.c.d.dao.impl.PrivilegeClientDaoImpl   : [DFC_DOCBROKER_REQUEST_FAILED] Request to Docbroker "documentum-server-0:1489" failed
com.documentum.fc.client.DfDocbrokerException: [DFC_DOCBROKER_REQUEST_FAILED] Request to Docbroker "documentum-server-0:1489" failed
        at com.documentum.fc.client.DfDocbrokerException.newRequestFailedException(DfDocbrokerException.java:12)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getMap(ServerMapBuilder.java:72)
        at com.documentum.fc.client.impl.docbroker.DocbrokerClient.getServerMap(DocbrokerClient.java:152)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoices(ServerChoiceManager.java:159)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoicesIfNecessary(ServerChoiceManager.java:148)
        at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.getServerChoices(ServerChoiceManager.java:47)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.getServerChoices(DocbaseConnection.java:273)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.establishNewRpcClient(DocbaseConnection.java:227)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.open(DocbaseConnection.java:126)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:100)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:60)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionFactory.newDocbaseConnection(DocbaseConnectionFactory.java:26)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.createNewConnection(DocbaseConnectionManager.java:192)
        at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getDocbaseConnection(DocbaseConnectionManager.java:122)
        at com.documentum.fc.client.impl.session.SessionFactory.newSession(SessionFactory.java:23)
        at com.documentum.fc.client.impl.session.PrincipalAwareSessionFactory.newSession(PrincipalAwareSessionFactory.java:44)
        at com.documentum.fc.client.impl.session.PooledSessionFactory.newSession(PooledSessionFactory.java:49)
        at com.documentum.fc.client.impl.session.SessionManager.getSessionFromFactory(SessionManager.java:134)
        at com.documentum.fc.client.impl.session.SessionManager.newSession(SessionManager.java:72)
        at com.documentum.fc.client.impl.session.SessionManager.getSession(SessionManager.java:191)
        at com.emc.xcp.rest.core.dfc.dao.impl.PrivilegeClientDaoImpl.fetchAndGrantPermissions(PrivilegeClientDaoImpl.java:47)
        at com.opentext.d2.util.D2PrivilegedClientUtil.main(D2PrivilegedClientUtil.java:90)
Caused by: com.documentum.fc.client.DfIOException: [DM_SESSION_E_RPC_ERROR]error:  "Server communication failure"
        at com.documentum.fc.client.DfIOException.newCommunicationFailureException(DfIOException.java:16)
        at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.sendMessage(AbstractNetwiseRpcClient.java:216)
        at com.documentum.fc.client.impl.connection.docbroker.netwise.NetwiseDocbrokerRpcClient.requestObject(NetwiseDocbrokerRpcClient.java:58)
        at com.documentum.fc.client.impl.connection.docbroker.DocbrokerConnection.requestObject(DocbrokerConnection.java:80)
        at com.documentum.fc.client.impl.docbroker.MapBuilder.issueRequest(MapBuilder.java:34)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getDataFromDocbroker(ServerMapBuilder.java:169)
        at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getMap(ServerMapBuilder.java:60)
        ... 20 common frames omitted
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
        at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2020)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1127)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
        at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
        at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
        at com.documentum.fc.impl.util.io.MessageChannel.writeSocket(MessageChannel.java:261)
        at com.documentum.fc.impl.util.io.MessageChannel.write(MessageChannel.java:219)
        at com.documentum.fc.client.impl.connection.netwise.AbstractNetwiseRpcClient.sendMessage(AbstractNetwiseRpcClient.java:211)
        ... 25 common frames omitted
null
[[email protected] d2privilegedclient]$

 

Above, we can see two issues:

  • The wrong path for the log4j.properties file
  • An SSL Handshake error, which cause the connection to the docbroker to fail

The first issue is simple to fix. It’s technically not mandatory to have a log4j.properties file, the utility will still run properly but it will create two files in the local folder: “log4j.log” and “trace.log”. It will also print an exception, the one shown above. Since D2 doesn’t come with a log4j.properties file, it’s a little bit strange to use that for a newly developed utility but it’s like that. Anyway, either remove the files after the execution and ignore the errors or use a custom log4j.properties file. We are usually adding a custom log4j.properties file for the DFC logs in D2. Therefore, in my case, I will just use it.

The second issue is actually a bug. When I first executed it, I saw this message and based on the stack trace, I highly suspected that the issue was linked to the DFC connection mode. Since we are always using secure communications by default for our Applications, I switched it to native and tried again: it worked. Therefore, I opened a SR with the OpenText Support (#4190973) which resulted in two defects. First, DTWO-46920 to fix the different issues in the shell script linked to linux (the utility was obviously developed for Windows and never tested on linux). Second, DTWO-46921 to document the bug that prevent the D2 utility to work over secure channels.

Since none of these issues are blocking, I applied the workaround for each of these (+ the missing shebang) to execute the D2 utility a third time:

[[email protected] d2privilegedclient]$ sed -i 's,^:$,#!/bin/bash,' D2PrivilegedClientUtil.sh
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ sed -i 's,^log4j_configuration=.*,log4j_configuration=${webinfdir}/classes/log4j.properties,' D2PrivilegedClientUtil.sh
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ grep secure_connect_default $APP_DATA/D2/dfc.properties
dfc.session.secure_connect_default=secure
[[email protected] d2privilegedclient]$ sed -i 's,^dfc.session.secure_connect_default=.*,dfc.session.secure_connect_default=native,' $APP_DATA/D2/dfc.properties
[[email protected] d2privilegedclient]$ grep secure_connect_default $APP_DATA/D2/dfc.properties
dfc.session.secure_connect_default=native
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ ./D2PrivilegedClientUtil.sh -d ${gr} -u ${user} -p ${pw} | grep -v "|-"
Running D2PrivilegedClientUtil

2019-09-07 11:17:27,359 UTC [INFO ] (main) - c.e.x.r.c.d.dao.impl.PrivilegeClientDaoImpl   : Checking dm_client_rights for dfc: dfc_Lp76piwfz4tpAupiCktfKFfndOAa
D2_WS1_weblogic-server-0_fndOAa
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ ./D2PrivilegedClientUtil.sh -d ${repo} -u ${user} -p ${pw} | grep -v "|-"
Running D2PrivilegedClientUtil

2019-09-07 11:18:05,735 UTC [INFO ] (main) - c.emc.xcp.rest.core.dfc.utils.IpAndRcHelper   : filling in {0} a new record with this persistent certificate:
{1}
2019-09-07 11:18:06,082 UTC [INFO ] (main) - c.e.x.r.c.d.dao.impl.PrivilegeClientDaoImpl   : Checking dm_client_rights for dfc: dfc_Lp76piwfz4tpAupiCktfKFfndOAa
D2_WS1_weblogic-server-0_fndOAa
[[email protected] d2privilegedclient]$
[[email protected] d2privilegedclient]$ grep secure_connect_default $APP_DATA/D2/dfc.properties
dfc.session.secure_connect_default=native
[[email protected] d2privilegedclient]$ sed -i 's,^dfc.session.secure_connect_default=.*,dfc.session.secure_connect_default=secure,' $APP_DATA/D2/dfc.properties
[[email protected] d2privilegedclient]$ grep secure_connect_default $APP_DATA/D2/dfc.properties
dfc.session.secure_connect_default=secure
[[email protected] d2privilegedclient]$

 

After applying all these fixes, the D2 utility is finally working and it does register and approve the DFC Client ID correctly. I’m curious to see when exactly they are going to fix all that and provide an utility that can work over secure communications.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Morgan Patou
Morgan Patou

Senior Consultant & Technology Leader ECM