-
Notifications
You must be signed in to change notification settings - Fork 93
Debugging a Black Duck Deployment
Jonathan Beakley edited this page Jan 29, 2019
·
1 revision
The following shows how to debug a Black Duck deployment. If you have any doubt that your cluster is working properly, go through these steps and see where the divergence has occurred.
Find all the pods that are running; They all should be alive:
ubuntu@ip-10-0-22-242:~$ kubectl get pods
NAME READY STATUS RESTARTS AGE
cfssl-258485687-m3szc 1/1 Running 0 3h
jobrunner-1397244634-xgcn2 1/1 Running 2 26m
nginx-webapp-2564656559-6fbq8 2/2 Running 0 26m
postgres-1794201949-tt4gj 1/1 Running 0 3h
registration-2718034894-7brjv 1/1 Running 0 26m
solr-1180309881-sscsl 1/1 Running 0 26m
zookeeper-3368690434-rnz3m 1/1 Running 0 26m
...
Now jot those pods down; we will exec into them to confirm they are functioning properly.
Check the logs for the webapp. They should be active over time.
kubectl logs nginx-webapp-2564656559-6fbq8 -c webapp
2017-07-12 18:13:12,064 [http-nio-8080-exec-4] INFO com.blackducksoftware.core.regupdate.impl.RegistrationApi - Executing registration action [Action: check | Registration id: null | URL: http://registration:8080/registration/HubRegistration | Registration request: RegistrationRequest{attributeValues={MANAGED_CODEBASE_BYTES_NEW=0, CODE_LOCATION_BYTES_LIMIT=0, CUSTOM_PROJECT_LIMIT=0, USER_LIMIT=1, PROJECT_RELEASE_LIMIT=0, CODE_LOCATION_LIMIT=0, CODEBASE_MANAGED_LINES_OF_CODE=0}, dateTimeStatistics={}, longStatistics={scanCount=0}}]
2017-07-12 18:13:12,071 [http-nio-8080-exec-4] ERROR com.blackducksoftware.core.regupdate.impl.RegistrationApi - Unable to execute remote registration request [Action: check | Registration id: null | URL: http://registration:8080/registration/HubRegistration]: I/O error on POST request for "http://registration:8080/registration/HubRegistration?bdscode=1499883192064&action=check":registration: Name does not resolve; nested exception is java.net.UnknownHostException: registration: Name does not resolve
2017-07-12 18:25:42,596 [http-nio-8080-exec-1] INFO com.blackducksoftware.usermgmt.sso.impl.BdsSAMLEntryPoint - Single Sign On is disabled by administrator.
2017-07-12 18:27:52,670 [scanProcessorTaskScheduler-1] INFO com.blackducksoftware.scan.bom.scheduler.ScanPurgeJobMonitorSchedulingService - Skipping scan purge job, previous job is still in progress
2017-07-12 18:30:00,059 [job.engine-0] WARN com.blackducksoftware.job.integration.handler.KbCacheUpdater - KB project update job will not be scheduled because a KB project, release, or vulnerability update job currently is scheduled or running.
If your web app is working, but you can't see it from outside the cluster, check that your load balancer works, after finding its pod, like so:
kubectl exec -t -i webserver-fj3882 cat /var/log/nginx/nginx-access.log
You should see something like this (assuming you used chrome, curl, and so on to try to access the site).
192.168.21.128 - - [12/Jul/2017:18:13:12 +0000] "GET /api/v1/registrations?summary=true&_=1499883191824 HTTP/1.1" 200 295 "https://a0145b939671d11e7a6ff12207729cdd-587604034.us-east-1.elb.amazonaws.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" "-"
192.168.21.128 - - [12/Jul/2017:18:13:12 +0000] "GET /api/internal/logo.png HTTP/1.1" 200 7634 "https://a0145b939671d11e7a6ff12207729cdd-587604034.us-east-1.elb.amazonaws.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" "-"
10.0.25.32 - - [12/Jul/2017:18:25:42 +0000] "GET / HTTP/1.1" 200 21384 "-" "curl/7.47.0" "-"