sipcapture / homer

HOMER - 100% Open-Source SIP, VoIP, RTC Packet Capture & Monitoring
https://sipcapture.org
GNU Affero General Public License v3.0
1.61k stars 240 forks source link

New install can't create config #557

Closed davidcsi closed 1 year ago

davidcsi commented 1 year ago

hello, i installed manually, postgres is in the localhost. I was able to execute

homer-app -create-config-db -database-root-user=postgres -database-host=localhost -database-root-password=postgres -database-homer-user=homer_user
homer-app -create-data-db -database-root-user=postgres -database-host=localhost -database-root-password=postgres -database-homer-user=homer_user

and that works fine:

CONNECT to DB ROOT STRING: [host=localhost user=postgres dbname=postgres sslmode=disable port=5432 password=MYPASS]

HOMER - create db [homer_data] with [name=homer_user]

(/app/migration/migration.go:85)
[2022-09-09 23:58:00]  [263.29ms]  CREATE DATABASE homer_data OWNER homer_user
[0 rows affected or returned ]

DONE

HOMER - show users
    Role name   |   Attributes
------------------------------------------------
    homer_su    |   superuser, create database
    homer_user  |   superuser, create database
    postgres    |   superuser, create database
    role_superuser  |   superuser

DONE

and show db users:

# homer-app -show-db-users -database-root-user=postgres -database-host=localhost -database-root-password=MYPASS -database-homer-user=homer_user -database-homer-password=MYPASS

CONNECT to DB ROOT STRING: [host=localhost user=postgres dbname=postgres sslmode=disable port=5432 password=MYPASS]

HOMER - show users
    Role name   |   Attributes
------------------------------------------------
    homer_su    |   superuser, create database
    homer_user  |   superuser, create database
    postgres    |   superuser, create database
    role_superuser  |   superuser

DONE

but can't create config, homer-app complains it can't connect to the db:

# homer-app -show-current-config
panic: failed to connect database

goroutine 1 [running]:
main.getConfigDBSession(0xcc0800)
    /app/main.go:1187 +0xa65
main.main()
    /app/main.go:236 +0xeb
root@homer-1:/home/david.villasmil# homer-app -show-db-users

CONNECT to DB ROOT STRING: [host=localhost user=postgres dbname=postgres sslmode=disable port=5432]

panic: pq: password authentication failed for user "postgres"

goroutine 1 [running]:
main.checkAdminFlags()
    /app/main.go:1753 +0xf72
main.main()
    /app/main.go:223 +0xc5
github-actions[bot] commented 1 year ago

Please star this repository to motivate the developers and to get higher priority! :star:

davidcsi commented 1 year ago

one needs to set the correct password in

/usr/local/homer/etc/webapp_config.json

that's it