Existing docker-compose.yml returning 404 while hitting /admin page
Expected Behavior
The exact steps for composing docker and volume should give access to http://WEBSERVER_IP:8000/admin/ or http://WEBSERVER_IP:8000/admin
Actual Behavior
While hitting http://WEBSERVER_IP:8000/admin/ or http://WEBSERVER_IP:8000/admin, it is returning 404.
Steps to Reproduce the Problem
- follow the instructions as per https://docs.opencve.io/installation/docker/
- Do appropriate modification
- Hit http://WEBSERVER_IP:8000/admin/
Specifications
- OpenCVE version: 1.4.1
- Python version: 3.8
- Platform: Ubuntu [Debian]
Screenshots (optional)
It will do that if you haven't created the admin user yet, and if you are not the admin https://docs.opencve.io/installation/docker/#create-an-admin
I confirm what @MarkDeckert said, did you create and admin user?
I have the same problem reported by Userbmer. These are the details:
- I am using a Debian 12 VM under VirtualBox. I allocated 6 GB RAM for this VM.
- The Docker version in this VM is 20.10.24; the Docker-Compose version is 1.29.2.
- I followed the steps in https://docs.opencve.io/installation/docker EXACTLY as specified, in the order specified, with one proviso: I had to do everything as root, for, otherwise, the installation steps would fail due to insufficient permissions.
- ALL of the steps completed successfully.
- I tried to access the web interface only after I had completed all the steps in the page above.
- I tried with "server_name = <my_ip_address>:8000" and just "server_name =" in opencve.cfg, but it made no difference. Any suggestions on what else to try?
- There certainly is something listening on port 8000 - when I do "telnet localhost 8000" (or even "telnet <my_ip_address> 8000" from a different system) I get the following:
telnet <my_ip_address> 8000
Trying <my_ip_address>...
Connected to <my_ip_address>.
Escape character is '^]'.
1111
HTTP/1.1 400 Bad Request
Connection: close
Content-Type: text/html
Content-Length: 197
<html>
<head>
<title>Bad Request</title>
</head>
<body>
<h1><p>Bad Request</p></h1>
Invalid Request Line 'Invalid HTTP request line: '1111''
</body>
</html>
Connection closed by foreign host.
What is the exact meaning of "creating an admin user and being the admin" in this context? I created the admin user with "docker exec -it webserver opencve create-user xyz <my_email_address> --admin". How is this related to the errors that I am getting when trying to access https://localhost:8000, or https://<my_ip_address>:8000 from a remote host? I am not even given the chance to supply any credentials.
Finally, it is not clear to me whether anything is to be done to launch the docker app when rebooting the system. It would seem that nothing is required for, on rebooting, the container is clearly running and, like I said, something is listening on port 8000. Still, some clarification on this would be welcome.
Closing this issue as it has been inactive for a long time.