Can't connect to DB

kaz

New Member
Hello

I have a weird situation my FusionPBX was working fine last night but this morning I noticed no sip peers were registered, on checking logs I have discovered that
the db is not connecting.

I observe the following:

2019-08-14 12:29:41.776541 [ERR] switch_core_db.c:223 SQL ERR [unable to open database file]
2019-08-14 12:29:41.776561 [CRIT] switch_core_sqldb.c:622 Failure to connect to CORE_DB pgsql://hostaddr=xxx.xxx.xxx.xxx port=5432 dbname=fusionpbx user=xxxxxx password=xxxxxxxxxxxxxxxxxxxxxx options=''!

xxxx's used for security reasons

Nothing has changed on my system since last night so not sure what has gone wrong, hoping someone can help me understand why freeswitch can connect to db in postgres.

Thanks
Kaz.
 

kaz

New Member
Yes Postgres is running

● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2019-08-14 12:29:39 NZST; 2h 25min ago
Process: 890 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 890 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/postgresql.service

Aug 14 12:29:39 xxxxx.xx.xx.xx systemd[1]: Starting PostgreSQL RDBMS...
Aug 14 12:29:39 xxxx.xx.xx.xx systemd[1]: Started PostgreSQL RDBMS.
 
I have this problem too after a debian upgrade on Wednesday. I'm on Debian 9 and my freeswitch version is
FreeSWITCH version: 1.10.0-release-11-7a921c608b~64bit (-release-11-7a921c608b 64bit)

I can connect to the database from the command line using
# psql -h 127.0.0.1 -U fusionpbx fusionpbx
and the xxxxxx password from the error message in the log.

This is only thread that comes up in a search with this problem, though there is another one on this board talking about 1.10 needing buster.
 
I am wondering why 1.10 was installed into debian 9 when it is not compatible. I do have backports enabled to allow installation of bacula, do you think this is why 1.10 was installed? I will be upgrading to Deb 10 buster, do you think freeswitch 1.10 will work from it's current state after the upgrade or reinstall required? thanks
 
If you are using FreeSWITCH 1.10.x they made changes to how lua works and we had to make changes to the code.
If you upgrade to latest 4.4 or Master branch then Lua will work better with the database.
Already on 4.4

System Information Version4.4.7Git InformationBranch: 4.4
Commit: 455b498c03136e92ad469044ad3efe2bc674831d
Origin: https://github.com/fusionpbx/fusionpbx
Status: Your branch is behind 'origin/4.4' by 44 commits, and can be fast-forwarded. +34 days ago
Project Path/var/www/fusionpbxSwitch Version1.10.0 (64bit)


makes no difference still getting connection errors with lua scripts
 
I have this problem too after a debian upgrade on Wednesday. I'm on Debian 9 and my freeswitch version is
FreeSWITCH version: 1.10.0-release-11-7a921c608b~64bit (-release-11-7a921c608b 64bit)

I can connect to the database from the command line using
# psql -h 127.0.0.1 -U fusionpbx fusionpbx
and the xxxxxx password from the error message in the log.

This is only thread that comes up in a search with this problem, though there is another one on this board talking about 1.10 needing buster.
Like you can also do the same

I can connect to the database from the command line using # psql -h 127.0.0.1 -U fusionpbx fusionpbx and the xxxxxx password from the error message in the log.