Just installed BlackDuck and the containers aren't appearing in with the 'docker ps' command

I have installed Docker, initiated swarm and set up hub. After that I installed BlackDuck, but now when I do a ‘docker ps’ command I am not getting a list of the BlackDuck containers.

Running on Ubuntu 20.04.x

Any ideas?

Thank you
Wayne Pfeffer

Yes: we need more information :slight_smile:

Please share the output of docker stack ls and docker service ls.

Maybe also

docker ps -a

to see stopped containers. And if you find any, then

docker logs containername
hub       17
ID             NAME                    MODE         REPLICAS   IMAGE                                                  PORTS
vzwrwogzg9p7   hub_authentication      replicated   0/1        blackducksoftware/blackduck-authentication:2024.1.1
ljty9b7huh3c   hub_bomengine           replicated   0/1        blackducksoftware/blackduck-bomengine:2024.1.1
bf36891luoee   hub_cfssl               replicated   0/1        blackducksoftware/blackduck-cfssl:1.0.25
2th708uep85c   hub_documentation       replicated   0/1        blackducksoftware/blackduck-documentation:2024.1.1
tmkr4gw9fix6   hub_jobrunner           replicated   0/1        blackducksoftware/blackduck-jobrunner:2024.1.1
kerz5evzs3tp   hub_logstash            replicated   0/1        blackducksoftware/blackduck-logstash:1.0.35
j5cor2ppd0xq   hub_matchengine         replicated   0/2        blackducksoftware/blackduck-matchengine:2024.1.1
4ae7x6txyuh0   hub_postgres            replicated   0/1        blackducksoftware/blackduck-postgres:14-1.21           *:55436->5432/tcp
lx5l753n3hon   hub_postgres-upgrader   replicated   0/1        blackducksoftware/blackduck-postgres-upgrader:14-1.4
o0qv5a83f9no   hub_rabbitmq            replicated   0/1        blackducksoftware/rabbitmq:1.2.36
gjpdo167dddz   hub_redis               replicated   0/1        blackducksoftware/blackduck-redis:2024.1.1
t9eq7xs4c8gg   hub_registration        replicated   0/1        blackducksoftware/blackduck-registration:2024.1.1
gkpe0yp6fk3z   hub_scan                replicated   0/1        blackducksoftware/blackduck-scan:2024.1.1
ozm06cr61v4a   hub_storage             replicated   0/1        blackducksoftware/blackduck-storage:2024.1.1
66grh4vvi5nh   hub_webapp              replicated   0/1        blackducksoftware/blackduck-webapp:2024.1.1
xrhieg72vgem   hub_webserver           replicated   0/1        blackducksoftware/blackduck-nginx:2.0.66               *:443->8443/tcp
t2xsxrz90c7e   hub_webui               replicated   0/1        blackducksoftware/blackduck-webui:2024.1.1

the first one is ‘docker stack ls’ and the second one is ‘docker service ls’. it appears as though the containers are there, is that correct?

after doing a ‘docker ps -a’ there aren’t any containers listed.

The first command shows that the stack named hub is deployed.
The second command shows that the services that are deployed from the stack, but have 0 replicas (~= containers) running.

You need to find out why all the services have 0 replicas. This could be either caused by placement constraints on the services that can’t be satisfied, or something entirely different.

Please check docker service ps hub_authentication --no-trunc to see the current state of the service.
of course, you can use any service that has 0 replicas instead.

I backed up and tried to perform a clean install. Now I’m receiving the error “open docker-compose.yml: no such file or directory” when I enter the command from root: “docker stack deploy -c docker-compose.yml hub”. From inside the directory: /opt/blackduck/hub-2024.1.1/docker-swarm/. The file does exist and it appears to be formatted correctly.

Thanks again for the help and further assistance you are able to give.

… please make sure your posts always cover the answer to the question: “what does someone, who doesn’t know all bits and pieces of my setup, need to know about it to actually understand my post?”

You last post does not answer that question, instead if just informs us something should work, but doesn’t.

1 Like

Thank you, my apologies.

The setup
OS: Ubuntu 20.04.x
Machine: Azure VM 4 cores, 16 GB RAM
The final result: To have Synopsy BlackDuck containers running in docker on this machine.
BlackDuck Version: 2024.1.1
Docker Version: 24.0.5 build ced0996
Black Duck Install Directory: /opt/blackduck/
Docker Swarm Dir for BlackDuck: /opt/blackduck/hub-2024.1.1/docker-swarm/

The Documentation
I have installed Docker on this machine and initialized swarm. I am now trying to install BlackDuck on the machine. BlackDuck, when installed, executes from within multiple docker containers. I have downloaded the BlackDuck .tar.gz file and exanpded it in the /opt/blackduck/ directory. When I try to deploy the BlackDuck files to docker using the command: docker stack deploy -c docker-compose.yml hub, I receive the error: open docker-compose.yml: no such file or directory. I am doing all this as root in Ubuntu and from within the docker swarm directory for BlackDuck, where all of the .yml files are located to install BlackDuck. The permissions set on the .yml file are: -rw-rw-r–.

The Ask
What I’m asking is, why am I receiving a “no such file or directory” from Docker when I attempt to install BlackDuck when I can clearly see that the file exists in the directory that I am performing the “docker stack deploy” from? I have tried adding ‘./’ the file name, it didn’t help.

At this point, I’m unsure if this is a Docker problem or a BlackDuck problem.

Thank you again for any help that you are able to give. Again, I apologize for not being clearer in my previous post.

Judged on the information you shared: it should work. You could try if it makes a difference if you use an absolute path for the value of the -c argument.

I completely missed the swarm part. Even after trying to look for it in the message when I read @meyay recommending docker stack ls. Looks like I was more tired than I thought :slight_smile:

A valuable information would have been the link to the installation instructions: https://www.synopsys.com/blogs/software-security/installing-black-duck-hub.html

It mentions the commands you high likely used, and a link to the download source of the tar.gz that was downloaded.

Tried to use absolute pathing, it didn’t help.

The instruction in the README.md and the 96 pages Installing Black Duck using Docker Swarm document are pointing to a more complex deployment than a simple docker stack deploy -c docker-compose.yml.

Please share all exact commands you used, including an output of the dir listing with ls -la of the directory where you extracted the tar,gz into.

Please change to the directory where you extracted the .tar.gz file before giving the docker stack deploy command. There are multiple. Even if you only use the docker-compose.yml file, it references several other files (such as hub-webserver.env, blackduck-config.env), which the docker cli expects to find in the directory where the command is run.

There are 17 services defined, each with health checks and long startup times. So it will take a while before you start seeing containers. Give it about two and a half minutes (that’s about how long their own health check gives).