mikesplain / openvas-docker

A Docker container for Openvas
MIT License
762 stars 302 forks source link

OpenVAS startup errors when run via docker-java API automation #165

Closed christiangustafson closed 6 years ago

christiangustafson commented 6 years ago

I am working on a TaaS project automating FOSS test tools behind a RESTful service façade, using docker-java control APIs. I'm seeing an error when I start the container with these APIs, versus the same request from a command-line call to Docker.

The OpenVAS container is happy to run from the command-line: docker run --rm -p 8151:9390 -p 8150:443 openvas:latest

Redis not yet ready...
Redis ready.
Checking for empty volume
Restarting services
 * Restarting openvas-scanner openvassd
   ...done.
 * Restarting openvas-manager openvasmd
   ...done.
 * Restarting openvas-gsa gsad
   ...done.
Reloading NVTs
Rebuilding NVT cache... done. ...

But when I automate this same operation with docker-java, it fails early, on restarting the services:

Redis not yet ready...
Redis ready.
Checking for empty volume
Restarting services
Failed to restart openvas-scanner.service: Unit not found.
Failed to restart openvas-manager.service: Unit not found.
Failed to restart openvas-gsa.service: Unit not found.
Reloading NVTs
Rebuilding NVT cache... failed.

The internal services all fail with "Unit not found". If I leave the container up and attach to it, I see the same errors from ./start and the diagnostic script.

It's puzzling, since I would expect the container to give us consistent behavior.

Q. based on these errors, can you suggest any avenues for investigation?

When OpenVAS does run, we can have multiple service clients talking to it via the XML interfaces, it works like a charm, makes for a great demo of our work. TY

mikesplain commented 6 years ago

@christiangustafson That is very odd behavior. Sorry for the delay, have you had any success? I would suggest poking around services to see why they're missing...

fredairic[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

fredairic[bot] commented 6 years ago

This issue has been automatically closed because it has not had recent activity. Issue creator may reopen if the issue still exists. Thank you for your contributions.