Results 1 to 3 of 3

Thread: OpenVas error

  1. #1
    Join Date
    2023-Jul
    Posts
    2

    Question OpenVas error

    Hello, Iam new to security community. ihave been trying to install gvm openvas ..i ran following command to set up
    sudo gvm-setup..
    This is the error i got first ..
    -------------------------------------------------------------------------------------------------------------------------
    Step 5: Checking Postgresql DB and user ...
    OK: Postgresql version and default port are OK.
    WARNING: database "postgres" has a collation version mismatch
    DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.37.
    HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
    ERROR: The Postgresql DB does not exist.
    FIX: Run 'sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database'

    ERROR: Your GVM-22.5.0 installation is not yet complete!

    Please follow the instructions marked with FIX above and run this
    script again.

    -----------------------------------------------------------------------
    Then i ran the FIX command ... And i got this error...
    could not change directory to "/home/kali": Permission denied
    WARNING: database "postgres" has a collation version mismatch
    DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.37.
    HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
    [i] User _gvm already exists in PostgreSQL
    could not change directory to "/home/kali": Permission denied
    WARNING: database "postgres" has a collation version mismatch
    DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.37.
    HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.[*] Creating database
    could not change directory to "/home/kali": Permission denied
    WARNING: database "postgres" has a collation version mismatch
    DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.37.
    HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
    createdb: error: database creation failed: ERROR: template database "template1" has a collation version mismatch
    DETAIL: The template database was created using collation version 2.36, but the operating system provides version 2.37.
    HINT: Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
    could not change directory to "/home/kali": Permission denied
    WARNING: database "postgres" has a collation version mismatch
    DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.37.
    HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.[*] Creating permissions
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist[*] Applying permissions
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist[*] Creating extension uuid-ossp
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist[*] Creating extension pgcrypto
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist[*] Creating extension pg-gvm
    could not change directory to "/home/kali": Permission denied
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "gvmd" does not exist

    -------------------------------------
    Can someone help me to fix this issue

  2. #2
    Join Date
    2023-May
    Posts
    3
    I had the same problem and here is how I solved it:


    sudo -u postgres psql -d postgres -c 'ALTER DATABASE postgres REFRESH COLLATION VERSION;'
    sudo su
    /usr/share/gvm/create-postgresql-database
    sudo -u postgres psql
    ALTER DATABASE template1 REFRESH COLLATION VERSION;
    \q
    exit
    sudo -u postgres /usr/share/gvm/create-postgresql-database
    sudo gvm-check-setup


    I hope this stape will help you

  3. #3
    Join Date
    2023-Aug
    Posts
    1
    Please follow the below steps in the order:


    1. Warning Message Explanation: The warning indicates a collation version mismatch in the PostgreSQL database. The database was created with version 2.36, while the operating system provides version 2.37.


    2. Resolution Steps:

    a. Rebuild Objects: Rebuild all objects in the database that use the default collation. Run the following command:


    sudo -u postgres psql -d postgres -c "COLLATE "C""


    b. Refresh Collation Version: Run the following command to refresh the collation version:


    sudo -u postgres psql -d postgres -c "ALTER DATABASE postgres REFRESH COLLATION VERSION"


    c. Update PostgreSQL:
    If the issue persists, you might need to rebuild PostgreSQL with the correct library version. However, this step is more complex and may require additional research.


    d. Missing Database Error: The "ERROR: The PostgreSQL DB does not exist" error can be resolved by running the following command:

    sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database


    e. Incomplete Installation:
    The final "ERROR: Your GVM-22.5.0 installation is not yet complete!" error indicates that the setup is not finished. Re-run the "gvm-setup" and see if you get the errors or not.

Similar Threads

  1. OPENVAS error
    By xerxes in forum General Archive
    Replies: 3
    Last Post: 2016-10-05, 11:40
  2. Authenication error in openvas
    By Snoopy in forum General Archive
    Replies: 3
    Last Post: 2015-06-10, 07:47
  3. OpenVas install error
    By masteroc in forum Installing NetHunter
    Replies: 5
    Last Post: 2015-03-09, 14:38

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •