immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
360 stars 102 forks source link

sql_exec failures during startup #13

Closed Crankinator closed 3 years ago

Crankinator commented 4 years ago

Unsure if you were aware, but it seems that during spin-up of the container, PQexec runs into an error with sql_exec. See log file below:

md manage: INFO:2020-09-16 17h50.09 utc:679: Updating user OVAL definitions. md manage: INFO:2020-09-16 17h50.09 utc:679: Updating CVSS scores and CVE counts for CPEs md manage: INFO:2020-09-16 17h50.37 utc:679: Updating CVSS scores for OVAL definitions md manage: INFO:2020-09-16 17h50.39 utc:679: Updating placeholder CPEs md manage: INFO:2020-09-16 17h50.46 utc:679: update_scap: Updating SCAP info succeeded md manage:WARNING:2020-09-16 17h50.46 utc:679: sql_exec_internal: PQexec failed: ERROR: relation "cert_bund_advs" does not exist LINE 1: SELECT EXISTS (SELECT FROM cert_bundadvs WHERE creation... ^ (7) md manage:WARNING:2020-09-16 17h50.46 utc:679: sql_exec_internal: SQL: SELECT EXISTS (SELECT FROM cert_bund_advs WHERE creation_time > coalesce (CAST ((SELECT value FROM meta WHERE name = 'cert_check_time') AS INTEGER), 0)); md manage:WARNING:2020-09-16 17h50.46 utc:679: sql_x_internal: sql_exec_internal failed

Any ideas?

immauss commented 4 years ago

I'm not seeing this error in my test environment or my production server. Can you describe how you are starting the container? Does the container continue to run after these errors? How old is your DB? Did you upgrade it from a previous version?

I ask all of these questions, but it looks like it maybe a more localized problem with your DB that you may want to look for answers on the openvas community forums. I don't see any references there at the moment, but I did see one elsewhere. Unforutnately, there was no solution provided where I found the reference.

If you find a solution elsewhere, please let me know.

traubas commented 3 years ago

Hi @Crankinator i have this error as well. did you fix it somehow?

immauss commented 3 years ago

So I did eventually run across this error. Unfortunately in my case, it ended up being from a corrupt postgresql database.