IBM Support

What are the mustgathers for IBM Dependency Based Build (DBB)?

Question & Answer


Question

What logs to collect when you experience issues with IBM Dependency Based Build?

Answer

DBB API traces show detailed information, but are also useful to show what your groovy script is doing and what APIs are used.
For the DBB v2.0.x toolkit on z/OS:
1) Copy the file $DBB_HOME/conf/logging/simplelogger.properties to a writable location, such as /tmp.
2) Edit the copy and uncomment the lines:
org.slf4j.simpleLogger.defaultLogLevel=warn
# date and time
#org.slf4j.simpleLogger.showDateTime=true
#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
# Uncomment to enable tracing for build commands
#org.slf4j.simpleLogger.log.com.ibm.dbb.build=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.build.internal=debug
# Uncomment to enable tracing for dependency scanning and resolution
#org.slf4j.simpleLogger.log.com.ibm.dbb.dependency=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.dependency.internal=debug
# Uncomment to enable tracing for build report generation
#org.slf4j.simpleLogger.log.com.ibm.dbb.build.report=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.build.report.records=debug
# Uncomment to enable tracing for metadata creation and storing
#org.slf4j.simpleLogger.log.com.ibm.dbb.metadata=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.metadata.cli=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.metadata.common=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.metadata.filesystem=debug
#org.slf4j.simpleLogger.log.com.ibm.dbb.metadata.jdbc=debug          
3) Run groovyz with this option:
-cp <log config file location>
-Dorg.slf4j.simpleLogger
As an example,
$DBB_HOME/bin/groovyz -cp /tmp -Dorg.slf4j.simpleLogger /u/dbb/build/compile.groovy
For the DB2 JDBC traces on z/OS with DBB v2.0:
1) Create a file named DB2JccConfiguration.properties with the following content:
db2.jcc.traceDirectory=/tmp
db2.jcc.traceFile=dbbjcc
db2.jcc.traceLevel=-1 
For example, if you use /tmp/DB2JccConfiguration.properties,
change db2.jcc.traceDirectory=/tmp to a suitable directory.
db2.jcc.traceFile=dbbjcc creates a file such as /tmp/dbbjcc_global_1
db2.jcc.traceLevel=-1 traces everything, which is recommended for initial tracing.
If less trace information is required,
db2.jcc.traceLevel=50 creates traces for connection, driver configuration, and statements.
See the Related Information section below for links describing more options.
3) Run groovyz with option:
-cp <DB2 trace config file location>
For example,
$DBB_HOME/bin/groovyz -cp /tmp /u/dbb/build/scan.groovy
For the DBB toolkit on z/OS v1.x:
These steps apply to DBB toolkit version 1.0.8 and later.
 
1) Edit the log4j2.properties file to enable specific tracing features.

The log4j2.properties sample can be found in /usr/lpp/IBM/dbb/conf.
Copy to a suitable location such as /tmp.

Uncomment the lines as indicated to enable debug mode per components.
For example, to enable debug mode for the build API, uncomment the following lines:
logger.build.name=com.ibm.dbb.build
logger.build.level=DEBUG
logger.buildInternal.name=com.ibm.dbb.build.internal
logger.buildInternal.level=DEBUG
2) (Optional) In your groovy build script, also add the following calls to print the version of the DBB toolkit used as well as DBB Server:
//Get DBB toolkit product info
version = new VersionInfo()
println(" ")
println("Info about this DBB installation")
println("--------------------------------")
println("DBB Version: " + version.getVersion())
println("Build Number: " + version.getBuild())
println("Release Date: " + version.getDate())

 
def dbbServer="https://9.42.84.222:19443/dbb/"
def client = new RepositoryClient().url(dbbServer).userId("ADMIN").password("ADMIN").forceSSLTrusted(true)
println("server version="+client.getServerVersion().getVersion())
3) In your groovy script, run groovyz with option:
-Dlog4j.configurationFile=<log config file location>
As an example,
$DBB_HOME/bin/groovyz -Dlog4j.configurationFile=/tmp/log4j2.properties /tmp/myBuild.groovy
4) Send your groovy scripts to show what DBB APIs are used and how.
For the DBB Liberty server in DBB v1.x:
For performance concerns with DBB API accessing the DBB server (com.ibm.dbb.repository.RepositoryClient), these items can be collected.
 
1) Add to the server.xml file, located under <DBB install dir>/wlp/usr/servers/dbb/:
<server description="new server">
        <featureManager>
...
                <feature>eventLogging-1.0</feature>
                <feature>requestTiming-1.0</feature>
        </featureManager>
...
</server>
2) To trace activities taking more than 20s, add also the <eventLogging> and <requestTiming> tags in file server.xml:
<server description="new server">
...
        <eventLogging minDuration="20s"/>
        <requestTiming slowRequestThreshold="1m" hungRequestThreshold="10m">
          <servletTiming appName="com.ibm.dbb.web" servletName="com.ibm.dbb.web.services.AbstractDbbService" slowRequestThreshold="2
0s"/>
        </requestTiming>
...
</server>
The tag, eventLogging, shows request URLs and JDBC statement taking more than 20 seconds.
The tag, requestTiming, shows the stack of the DBB threads taking more than 20 seconds.
3) Collect all files under <DBB install dir>/wlp/usr/servers/dbb/logs.
For the zAppBuild framework:
The zAppBuild framework is provided as-is and is not supported through IBM Support cases. 
See https://github.com/IBM/dbb-zappbuild/blob/development/LICENSE.
Questions and issues on the zAppBuild Groovy scripts can be directly reported on its GitHub repository at https://github.com/IBM/dbb-zappbuild/issues
However, if you suspect an issue with the DBB APIs used by zAppBuild, enable the verbose mode to add traces to standard out ( See the Build.md file).

[{"Type":"MASTER","Line of Business":{"code":"LOB70","label":"Z TPS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS6T76","label":"IBM Dependency Based Build"},"ARM Category":[{"code":"a8m0z00000009OZAAY","label":"DBB (Dependency Based Build)"}],"ARM Case Number":"","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"2.0.0"},{"Type":"MASTER","Line of Business":{"code":"LOB70","label":"Z TPS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS6T76","label":"IBM Dependency Based Build"},"ARM Category":[{"code":"a8m0z00000009OZAAY","label":"DBB (Dependency Based Build)"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Product Synonym

DBB

Document Information

Modified date:
30 April 2024

UID

ibm16415115