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

Can't access web UI: Empty reply from server #120

Closed teisho closed 3 years ago

teisho commented 3 years ago

Describe the bug I can't access the web UI even if I'm in the container.

root@a4f0c38f5a9c:/# curl localhost:9390
curl: (52) Empty reply from server
root_gvm_1
  UID       PID    PPID    C   STIME   TTY     TIME                                               CMD
-----------------------------------------------------------------------------------------------------------------------------------------------
root       98639   98622   0   17:10   ?     00:00:00   /bin/sh -c '/start.sh'
root       98694   98639   0   17:10   ?     00:00:00   bash /start.sh
root       98699   98639   1   17:10   ?     00:00:15   redis-server 0.0.0.0:6379
systemd+   98710   98639   0   17:10   ?     00:00:00   /usr/lib/postgresql/12/bin/postgres -D /data/database
systemd+   98712   98710   0   17:10   ?     00:00:00   postgres: checkpointer
systemd+   98713   98710   0   17:10   ?     00:00:00   postgres: background writer
systemd+   98714   98710   0   17:10   ?     00:00:00   postgres: walwriter
systemd+   98715   98710   0   17:10   ?     00:00:00   postgres: autovacuum launcher
systemd+   98716   98710   0   17:10   ?     00:00:00   postgres: stats collector
systemd+   98717   98710   0   17:10   ?     00:00:00   postgres: logical replication launcher
root       99650   98639   0   17:11   ?     00:00:00   /usr/lib/postfix/sbin/master
systemd+   99652   99650   0   17:11   ?     00:00:00   pickup -l -t unix -u -c
systemd+   99653   99650   0   17:11   ?     00:00:00   qmgr -l -t unix -u
root       99659   98639   1   17:11   ?     00:00:16   /usr/bin/python3 /usr/local/bin/ospd-openvas --log-file /usr/local/var/log/gvm/ospd-
                                                        openvas.log --unix-socket /var/run/ospd/ospd.sock --log-level INFO
root       99661   99659   0   17:11   ?     00:00:00   /usr/bin/python3 /usr/local/bin/ospd-openvas --log-file /usr/local/var/log/gvm/ospd-
                                                        openvas.log --unix-socket /var/run/ospd/ospd.sock --log-level INFO
geops      99672   98639   0   17:11   ?     00:00:02   gvmd: Waiting for incoming connections
systemd+   99698   98710   0   17:12   ?     00:00:01   postgres: gvm gvmd [local] idle
geops      99715   98639   0   17:12   ?     00:00:00   gsad --verbose --http-only --timeout=15 --no-redirect --mlisten=127.0.0.1 --mport=9390
                                                        --port=9392
root       99718   98694   0   17:12   ?     00:00:00   tail -F /usr/local/var/log/gvm/gsad.log /usr/local/var/log/gvm/gvmd.log
                                                        /usr/local/var/log/gvm/ospd-openvas.log
gvm_1  | Starting Postfix for report delivery by email
gvm_1  |  * Starting Postfix Mail Transport Agent postfix
gvm_1  |    ...done.
gvm_1  | Starting Open Scanner Protocol daemon for OpenVAS...
gvm_1  | Creating OSPd socket link from old location...
gvm_1  | Starting Greenbone Vulnerability Manager...
gvm_1  | Waiting for Greenbone Vulnerability Manager to finish startup...
gvm_1  | admin
gvm_1  | Starting Greenbone Security Assistant...
gvm_1  | Oops, secure memory pool already initialized
gvm_1  | ++++++++++++++++++++++++++++++++++++++++++++++
gvm_1  | + Your GVM 20.04 container is now ready to use! +
gvm_1  | ++++++++++++++++++++++++++++++++++++++++++++++
gvm_1  |
gvm_1  | -----------------------------------------------------------
gvm_1  | Server Public key: ssh-ed25519 fooooooo root@d26c84789095
gvm_1  | -----------------------------------------------------------
gvm_1  |
gvm_1  | ++++++++++++++++
gvm_1  | + Tailing logs +
gvm_1  | ++++++++++++++++
gvm_1  | ==> /usr/local/var/log/gvm/gsad.log <==
gvm_1  | gsad main:MESSAGE:2020-12-03 16h12.03 utc:915: Starting GSAD version 20.08.0
gvm_1  |
gvm_1  | ==> /usr/local/var/log/gvm/gvmd.log <==
gvm_1  | md   main:MESSAGE:2020-12-03 16h10.59 utc:51:    Greenbone Vulnerability Manager version 20.08.0 (DB revision 233)
gvm_1  | md   main:   INFO:2020-12-03 16h10.59 utc:51:    Migrating database.
gvm_1  | md   main:WARNING:2020-12-03 16h10.59 utc:51: gvmd: databases are already at the supported version
gvm_1  | md   main:MESSAGE:2020-12-03 16h12.00 utc:871:    Greenbone Vulnerability Manager version 20.08.0 (DB revision 233)
gvm_1  | md   main:MESSAGE:2020-12-03 16h12.00 utc:877:    Greenbone Vulnerability Manager version 20.08.0 (DB revision 233)
gvm_1  | md   main:WARNING:2020-12-03 16h12.00 utc:877: gvmd: Another process is busy starting up
gvm_1  | md   main:MESSAGE:2020-12-03 16h12.01 utc:897:    Greenbone Vulnerability Manager version 20.08.0 (DB revision 233)
gvm_1  | md   main:WARNING:2020-12-03 16h12.01 utc:897: gvmd: Another process is busy starting up
gvm_1  | md   main:MESSAGE:2020-12-03 16h12.02 utc:910:    Greenbone Vulnerability Manager version 20.08.0 (DB revision 233)
gvm_1  | md manage:   INFO:2020-12-03 16h12.02 utc:910:    Getting users.
gvm_1  |
gvm_1  | ==> /usr/local/var/log/gvm/ospd-openvas.log <==
gvm_1  | OSPD[855] 2020-12-03 16:12:00,547: INFO: (ospd.main) Starting OSPd OpenVAS version 20.8.1.
disarmm commented 3 years ago

it uses https so you'd need to use curl https://localhost:9392

you're also using port 9390 which isn't the webUI. Assuming you've setup the port mapping 9392:9392 then you need to use https://IPAddress:9392 to access the webUI

teisho commented 3 years ago

Thanks! Although I was actually turning off HTTPS, I must have confused the ports. Now it runs perfectly with Nginx as reverse proxy.

C1ph3R-s commented 3 years ago

HI @teisho could you give me here an example for your nginx config? Because I would like to use this container, but unfortunately, I had no luck with that.

Thanks,