FreeSWITCH Core DB with Postgres
Hello all, Recently I tried to build a new server with FreeSWITCH 1.8.7 and PostgreSQL 11. The installation went well, but error occurred when I tried to run fs with: /usr/local/freeswitch/bin/freeswitch -u freeswitch -g freeswitch And core-db-dsn is set as: <param name="core-db-dsn" value="pgsql://host=localhost dbname=freeswitch user=freeswitch password='freeswitch' options='-c client_min_messages=NOTICE' application_name='freeswitch' sslmode=disable" /> I had created an empty db named “freeswitch” in postgres, and I got lots of error like: 2020-06-01 11:58:16.760201 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "detailed_calls" does not exist LINE 1: select * from detailed_calls where sent_callee_name='' ^ 2020-06-01 11:58:16.760258 [DEBUG] switch_pgsql.c:439 Query (DROP VIEW detailed_calls) returned PGRES_FATAL_ERROR 2020-06-01 11:58:16.760285 [ERR] switch_pgsql.c:680 Error executing query: ERROR: view "detailed_calls" does not exist 2020-06-01 11:58:16.764675 [DEBUG] switch_pgsql.c:439 Query (select ikey from interfaces) returned PGRES_FATAL_ERROR 2020-06-01 11:58:16.764688 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "interfaces" does not exist LINE 1: select ikey from interfaces ^ 2020-06-01 11:58:16.764801 [DEBUG] switch_pgsql.c:439 Query (DROP TABLE interfaces) returned PGRES_FATAL_ERROR 2020-06-01 11:58:16.764814 [ERR] switch_pgsql.c:680 Error executing query: ERROR: table "interfaces" does not exist 2020-06-01 11:58:16.770480 [DEBUG] switch_pgsql.c:439 Query (select task_id, task_desc, task_group, task_runtime, task_sql_manager, hostname from tasks) returned PGRES_FATAL_ERROR 2020-06-01 11:58:16.770512 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "tasks" does not exist LINE 1: ...k_group, task_runtime, task_sql_manager, hostname from tasks ^ 2020-06-01 11:58:16.770567 [DEBUG] switch_pgsql.c:439 Query (DROP TABLE tasks) returned PGRES_FATAL_ERROR 2020-06-01 11:58:16.770595 [ERR] switch_pgsql.c:680 Error executing query: ERROR: table "tasks" does not exist ... Actually freeswitch had created its core table in postgresql at this time, and I confirmed the table exists via psql. However, the different error occured in 2nd try: 2020-06-01 12:03:47.362395 [DEBUG] switch_pgsql.c:439 Query (create index uuindex on channels (uuid, hostname)) returned PGRES_FATAL_ERROR 2020-06-01 12:03:47.362434 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "uuindex" already exists 2020-06-01 12:03:47.362681 [DEBUG] switch_pgsql.c:439 Query (create index uuindex2 on channels (call_uuid)) returned PGRES_FATAL_ERROR 2020-06-01 12:03:47.362744 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "uuindex2" already exists 2020-06-01 12:03:47.363019 [DEBUG] switch_pgsql.c:439 Query (create index callsidx1 on calls (hostname)) returned PGRES_FATAL_ERROR 2020-06-01 12:03:47.363058 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "callsidx1" already exists 2020-06-01 12:03:47.363303 [DEBUG] switch_pgsql.c:439 Query (create index eruuindex on calls (caller_uuid, hostname)) returned PGRES_FATAL_ERROR 2020-06-01 12:03:47.363348 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "eruuindex" already exists 2020-06-01 12:03:47.363649 [DEBUG] switch_pgsql.c:439 Query (create index eeuuindex on calls (callee_uuid)) returned PGRES_FATAL_ERROR 2020-06-01 12:03:47.363690 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "eeuuindex" already exists 2020-06-01 12:03:47.363949 [DEBUG] switch_pgsql.c:439 Query (create index eeuuindex2 on calls (call_uuid)) returned PGRES_FATAL_ERROR 2020-06-01 12:03:47.363987 [ERR] switch_pgsql.c:680 Error executing query: ERROR: relation "eeuuindex2" already exists It seems that freeswitch is trying to create same index again in postgresql. All SQL execute is done by freeswitch, so I wonder if there is a bug in freeswitch or I got a broken installation. Any suggestion would be appreciated. Regards. —————————————————— 王聡 cong.wang.itsherpa@gmail.com 〒810−0073 福岡市中央区舞鶴2-3-6 赤坂プライムビル 2F 株式会社アイティーシェルパ
participants (1)
-
王聡