{"id":5566,"date":"2023-12-26T12:37:28","date_gmt":"2023-12-26T18:37:28","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=5566"},"modified":"2023-12-26T12:37:28","modified_gmt":"2023-12-26T18:37:28","slug":"how-to-fix-openvas-error-the-default-postgresql-version-14-is-not-16-that-is-required-libgvmd","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-fix-openvas-error-the-default-postgresql-version-14-is-not-16-that-is-required-libgvmd\/","title":{"rendered":"How to Fix OpenVAS &#8220;ERROR: The default PostgreSQL version (14) is not 16 that is required libgvmd&#8221;"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"142\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image.png\" alt=\"\" class=\"wp-image-5568\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image.png 695w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-300x61.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-500x102.png 500w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/a><\/figure>\n\n\n\n<p>Currently OpenVAS needs PostgreSQL 16 on port 5432.  If you have multiple versions of PostgreSQL, the lowest version will typically run on port 5432, and then they&#8217;ll increment from there.  For example, if you have PostgreSQL 14, 15, and 16, 14 will run on port 5432, 15 on 5433, and 16 on 5434. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The quick fix is to edit the PostgreSQL config files, change the port numbers, restart PostgreSQL, and rerun gvm-setup.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/etc\/postgresql\/16\/main\/postgresql.conf<\/pre>\n\n\n\n<p>Change port number from 5434 to 5432<\/p>\n\n\n\n<p><em>You will need to remove\/disable\/change the port for PostgreSQL 14<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt remove postgresql-14<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart postgresql@16-main.service<\/pre>\n\n\n\n<p>We can verify that PostgreSQL is running with netstat.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -tulpn<\/pre>\n\n\n\n<p>We can see that the ports 5432 (PostgreSQL 16) and 5433 (PostgreSQL 15) are both running.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"251\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-2.png\" alt=\"\" class=\"wp-image-5570\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-2.png 793w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-2-300x95.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-2-768x243.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/12\/image-2-500x158.png 500w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/a><\/figure>\n\n\n\n<p>Rerun gvm-setup<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo gvm-setup<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Currently OpenVAS needs PostgreSQL 16 on port 5432. If you have multiple versions of PostgreSQL, the lowest version will typically run on port 5432, and then they&#8217;ll increment from there. For example, if you have PostgreSQL 14, 15, and 16, &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-fix-openvas-error-the-default-postgresql-version-14-is-not-16-that-is-required-libgvmd\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[573],"tags":[1630,1632,268,7,690,1631,1297,704],"class_list":["post-5566","post","type-post","status-publish","format-standard","hentry","category-security","tag-gvm","tag-gvm-setup","tag-kali","tag-linux-2","tag-openvas","tag-openvas-setup","tag-postgresql","tag-scanning"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=5566"}],"version-history":[{"count":1,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5566\/revisions"}],"predecessor-version":[{"id":5571,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5566\/revisions\/5571"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=5566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=5566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=5566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}