Skip to content

Debugging Scan Failures

Jonathan Beakley edited this page Feb 19, 2019 · 2 revisions

Debugging Scan Failures on Kubernetes and OpenShift

There are various reasons a scan can fail - most of which have an easy fix.

Jobrunners can't connect to the KB

If you haven't set your HUB_PROXY_HOST, HUB_PROXY_PORT, and HUB_PROXY_SCHEME=https (usually) variables for the Black Duck jobrunner, webapp, registration, and authentication containers, then you may have connectivity issues to the Black Duck KB (Knowledge Base).

You'll be able to see these errors in the jobrunner logs (And you'll see error notices in the scans page as well).

500 status code errors

You see errors with status code 500 when you run Black Duck Detect, iScan, or the OpsSight Connector.

500 errors typically mean that the scan was able to hit the hub-nginx service, but that the scan wasn't able to be picked up by the hub-scan services. If your Black Duck instance is healthy, and you get a 500 scan error, make sure that your hub-scan pods are healthy. Sometimes, this can be caused by an overaggressive liveness check, which isn't properly tuned for your cluster.

Liveness and readiness

In Kubernetes, liveness checks in the Black Duck containers can cause containers to prematurely restart. This is often the case on oversubscribed clusters, where it might take a while for scan containers to come up. To remedy this, set the initialization time for your liveness checks to something lenient, i.e. 480 seconds.

Hub scan or jobrunner pods stuck in pending state

In this case, it is likely that there simply aren't enough resources on your cluster to run Black Duck. You need at least one functioning hub-scan and jobrunner pod in order to complete an end-to-end scan, so ask your administrator to increase your cluster's memory/CPU bandwidth, and or to taint a node for Black Duck, so that you don't have to compete with other apps in the same cluster.

External database passwords and secrets

If at any time the credentials to your Postgres instance change, you'll need to make sure to update all the (two) secrets for it. You will see lots of error logs in the webapp, jobrunner, and hub-scan services mentioning that JDBC failures to connect have occurred. Updating the secrets should automatically fix the problem once the containers restart. (See Black Duck Installation Parameters for help here.)