Secure-Compliance-Solutions-LLC / GVM-Docker

Greenbone Vulnerability Management Docker Image with OpenVAS
https://securecompliance.gitbook.io/projects/
MIT License
248 stars 91 forks source link

Question: Unable to access GSA after container is ready for use #43

Closed syafsss closed 3 years ago

syafsss commented 4 years ago

Describe the bug Unable to access GSA after container is ready for use

To Reproduce Steps to reproduce the behavior:

  1. Run docker run --detach --publish 3033:9392 --env PASSWORD=XXXX --volume /usr/local/var/jenkins/gvm-data:/data --name gvm securecompliance/gvm:11.0.1-r2
  2. Wait until text + Your GVM 11 container is now ready to use! + displayed
  3. Try to access GSA in http://localhost:3033/
  4. But only blank page displayed
  5. Wait until NVT finished loading (Updating VTs in database ... done (60027 VTs).), then try to access GSA again.
  6. Browser still display blank page

Actual behavior User cannot access GSA as browser display blank page.

Expected behavior User should be able to access GSA.

Screenshots N/A

Additional context Below error encountered:

Updating NVTs...
Updating CERT data...
Updating SCAP data...
Starting Open Scanner Protocol daemon for OpenVAS...
Starting Greenbone Vulnerability Manager...
2020-06-15 07:09:32.832 UTC [765] ERROR: relation "public.meta" does not exist at character 19
2020-06-15 07:09:32.832 UTC [765] STATEMENT: SELECT value FROM public.meta WHERE name = 'database_version';
Creating Greenbone Vulnerability Manager admin user
User created.
Starting Greenbone Security Assistant...
Oops, secure memory pool already initialized
++++++++++++++++++++++++++++++++++++++++++++++
+ Your GVM 11 container is now ready to use! +
++++++++++++++++++++++++++++++++++++++++++++++
pixelsquared commented 4 years ago

I noticed you are connecting with http. The newer versions of this container use https so could you try connecting with https?

syafsss commented 4 years ago

Yes, GSA successfully accessed using https.

Unfortunately, I encountered another issue when trying to run scan using my python script. It's related to the gvmd.sock path not found (previously when using older image version, this script works fine). Error: An error occurred Socket /usr/local/var/run/gvmd.sock does not exist.

The script use path = '/usr/local/var/run/gvmd.sock'. Could you advice which path we should use now?

pixelsquared commented 4 years ago

We changed the GVM to listen to a port so that it could be connected to from outside the container if someone wanted to. The GVM listens on port 9390

mrod23 commented 4 years ago

Ran into that issue also , you need to update your connection to something like the below

    connection = TLSConnection(hostname='127.0.0.1')
    transform = EtreeTransform()

    with Gmp(connection, transform=transform) as gmp:
        try:
            version = gmp.get_version()
dicksnel commented 3 years ago

@mrod23 does this work with self-signed certificates? Your code snippet results in a handshake error for me.