[OpenSIPS-Users] OpenSIPS db schema on PostgreSQL

Razvan Crainea razvancrainea at opensips.org
Mon Aug 22 16:13:05 CEST 2011


Hi Ryan,

I've just committed a fix for this issue on trunk. Please update your 
sources and try again. Let us know if your problem was solved.

Regards

Razvan Crainea
OpenSIPS Developer


On 11.08.2011 21:34, Ryan Revels wrote:
> Bogdan,
>
> This is a brand new install so no tables exist. Here is the complete 
> output with verbose=1:
>
> # opensipsdbctl create
> -e database engine 'postgres' loaded
> -e \E[37;33mINFO: creating database opensips ...
> -e Creating core table: standard
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "version_t_name_idx" for table "version"
> -e Creating core table: acc
> NOTICE:  CREATE TABLE will create implicit sequence "acc_id_seq" for 
> serial column "acc.id <http://acc.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "acc_pkey" for table "acc"
> NOTICE:  CREATE TABLE will create implicit sequence 
> "missed_calls_id_seq" for serial column "missed_calls.id 
> <http://missed_calls.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "missed_calls_pkey" for table "missed_calls"
> -e Creating core table: domain
> NOTICE:  CREATE TABLE will create implicit sequence "domain_id_seq" 
> for serial column "domain.id <http://domain.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "domain_pkey" for table "domain"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "domain_domain_idx" for table "domain"
> -e Creating core table: group
> NOTICE:  CREATE TABLE will create implicit sequence "grp_id_seq" for 
> serial column "grp.id <http://grp.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "grp_pkey" for table "grp"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "grp_account_group_idx" for table "grp"
> NOTICE:  CREATE TABLE will create implicit sequence "re_grp_id_seq" 
> for serial column "re_grp.id <http://re_grp.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "re_grp_pkey" for table "re_grp"
> -e Creating core table: permissions
> NOTICE:  CREATE TABLE will create implicit sequence "address_id_seq" 
> for serial column "address.id <http://address.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "address_pkey" for table "address"
> -e Creating core table: registrar
> NOTICE:  CREATE TABLE will create implicit sequence "aliases_id_seq" 
> for serial column "aliases.id <http://aliases.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "aliases_pkey" for table "aliases"
> -e Creating core table: usrloc
> NOTICE:  CREATE TABLE will create implicit sequence "location_id_seq" 
> for serial column "location.id <http://location.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "location_pkey" for table "location"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "location_account_contact_idx" for table "location"
> -e Creating core table: msilo
> NOTICE:  CREATE TABLE will create implicit sequence "silo_id_seq" for 
> serial column "silo.id <http://silo.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "silo_pkey" for table "silo"
> -e Creating core table: alias_db
> NOTICE:  CREATE TABLE will create implicit sequence "dbaliases_id_seq" 
> for serial column "dbaliases.id <http://dbaliases.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dbaliases_pkey" for table "dbaliases"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "dbaliases_alias_idx" for table "dbaliases"
> -e Creating core table: uri_db
> NOTICE:  CREATE TABLE will create implicit sequence "uri_id_seq" for 
> serial column "uri.id <http://uri.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "uri_pkey" for table "uri"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "uri_account_idx" for table "uri"
> -e Creating core table: nathelper
> NOTICE:  CREATE TABLE will create implicit sequence 
> "nh_sockets_id_seq" for serial column "nh_sockets.id 
> <http://nh_sockets.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "nh_sockets_pkey" for table "nh_sockets"
> -e Creating core table: speeddial
> NOTICE:  CREATE TABLE will create implicit sequence 
> "speed_dial_id_seq" for serial column "speed_dial.id 
> <http://speed_dial.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "speed_dial_pkey" for table "speed_dial"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "speed_dial_speed_dial_idx" for table "speed_dial"
> -e Creating core table: avpops
> NOTICE:  CREATE TABLE will create implicit sequence 
> "usr_preferences_id_seq" for serial column "usr_preferences.id 
> <http://usr_preferences.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "usr_preferences_pkey" for table "usr_preferences"
> -e Creating core table: auth_db
> NOTICE:  CREATE TABLE will create implicit sequence 
> "subscriber_id_seq" for serial column "subscriber.id 
> <http://subscriber.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "subscriber_pkey" for table "subscriber"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "subscriber_account_idx" for table "subscriber"
> -e Creating core table: pdt
> NOTICE:  CREATE TABLE will create implicit sequence "pdt_id_seq" for 
> serial column "pdt.id <http://pdt.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "pdt_pkey" for table "pdt"
> NOTICE:  CREATE TABLE / UNIQUE will create implicit index 
> "pdt_sdomain_prefix_idx" for table "pdt"
> -e Creating core table: dialog
> NOTICE:  CREATE TABLE will create implicit sequence "dialog_id_seq" 
> for serial column "dialog.id <http://dialog.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dialog_pkey" for table "dialog"
> -e Creating core table: dispatcher
> NOTICE:  CREATE TABLE will create implicit sequence 
> "dispatcher_id_seq" for serial column "dispatcher.id 
> <http://dispatcher.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dispatcher_pkey" for table "dispatcher"
> -e Creating core table: dialplan
> NOTICE:  CREATE TABLE will create implicit sequence "dialplan_id_seq" 
> for serial column "dialplan.id <http://dialplan.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dialplan_pkey" for table "dialplan"
> -e Creating core table: drouting
> NOTICE:  CREATE TABLE will create implicit sequence 
> "dr_gateways_gwid_seq" for serial column "dr_gateways.gwid"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dr_gateways_pkey" for table "dr_gateways"
> NOTICE:  CREATE TABLE will create implicit sequence 
> "dr_rules_ruleid_seq" for serial column "dr_rules.ruleid"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dr_rules_pkey" for table "dr_rules"
> NOTICE:  CREATE TABLE will create implicit sequence 
> "dr_gw_lists_id_seq" for serial column "dr_gw_lists.id 
> <http://dr_gw_lists.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dr_gw_lists_pkey" for table "dr_gw_lists"
> NOTICE:  CREATE TABLE will create implicit sequence "dr_groups_id_seq" 
> for serial column "dr_groups.id <http://dr_groups.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "dr_groups_pkey" for table "dr_groups"
> -e Creating core table: load_balancer
> NOTICE:  CREATE TABLE will create implicit sequence 
> "load_balancer_id_seq" for serial column "load_balancer.id 
> <http://load_balancer.id>"
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
> "load_balancer_pkey" for table "load_balancer"
> ERROR:  role "postgres" already exists
> -e \E[37;32mWARNING: Create user in database failed, perhaps they 
> already exist? Try to continue..
> [: 300: acc: unexpected operator
>                    List of relations
>  Schema |          Name          |   Type   |  Owner
> --------+------------------------+----------+----------
>  public | acc                    | table    | postgres
>  public | acc_id_seq             | sequence | postgres
> [: 300: acc: unexpected operator
> [: 300: dbaliases: unexpected operator
> [: 300: dbaliases: unexpected operator
> [: 300: domain: unexpected operator
> [: 300: domain: unexpected operator
> [: 300: grp: unexpected operator
> [: 300: grp: unexpected operator
> [: 300: uri: unexpected operator
> [: 300: uri: unexpected operator
> [: 300: speed_dial: unexpected operator
> [: 300: speed_dial: unexpected operator
> [: 300: pdt: unexpected operator
> [: 300: pdt: unexpected operator
> [: 300: subscriber: unexpected operator
> [: 300: subscriber: unexpected operator
> [: 300: location: unexpected operator
> [: 300: location: unexpected operator
> [: 300: re_grp: unexpected operator
> [: 300: re_grp: unexpected operator
> [: 300: address: unexpected operator
> [: 300: address: unexpected operator
> [: 300: address: unexpected operator
> [: 300: address: unexpected operator
> [: 300: missed_calls: unexpected operator
> [: 300: missed_calls: unexpected operator
> [: 300: usr_preferences: unexpected operator
> [: 300: usr_preferences: unexpected operator
> [: 300: aliases: unexpected operator
> [: 300: aliases: unexpected operator
> [: 300: silo: unexpected operator
> [: 300: silo: unexpected operator
> [: 300: dialog: unexpected operator
> [: 300: dialog: unexpected operator
> [: 300: dispatcher: unexpected operator
> [: 300: dispatcher: unexpected operator
> [: 300: dialplan: unexpected operator
> [: 300: dialplan: unexpected operator
> [: 300: dr_gateways: unexpected operator
> [: 300: dr_gateways: unexpected operator
> ERROR:  relation "dr_gateways_id_seq" does not exist
> -e \E[37;31mERROR: Grant privileges to standard tables failed!
>
> Thanks,
> Ryan
>
> On Tue, Aug 9, 2011 at 10:39 AM, Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Ryan,
>
>     Is the table "dr_gateway" already created in DB ?
>
>     Also try to set VERBOSE to 1 in opensipcctlrc and run the script again
>
>     Regards,
>     Bogdan
>
>
>     On 07/26/2011 08:21 PM, Ryan Revels wrote:
>>     I am attempting to install OpenSIPS 1.7 using PostgreSQL as the
>>     DB. I'm using the latest OpenSIPS 1.7 subversion on Debian
>>     Squeeze and postgresql-9.0.
>>
>>     After configuring opensipsctlrc, I first encounter this error:
>>     root at core-dev:~# opensipsdbctl create
>>     -e \E[37;31mERROR: ~./pgpass does not exist, please create this
>>     file and support proper credentials for user postgres.
>>
>>     This (~./pgpass) is obviously a typo. Nonetheless, for some
>>     reason opensipsdbctl needs a file at ~/.pgpass before it will
>>     attempt to run. I have yet to figure out what this file is
>>     actually used for...
>>
>>     Then, I am repeatedly prompted for the DB root user's password as
>>     opensipsdbctl creates the schema:
>>     root at core-dev:~# opensipsdbctl create
>>     -e \E[37;33mINFO: creating database opensips ...
>>     Password for user postgres:
>>     Password for user postgres:
>>     Password for user postgres:
>>     NOTICE:  CREATE TABLE / UNIQUE will create implicit index
>>     "version_t_name_idx" for table "version"
>>     Password for user postgres:
>>
>>     Finally, it spits out the following error and fails:
>>     ERROR:  relation "dr_gateways_id_seq" does not exist
>>     -e \E[37;31mERROR: Grant privileges to standard tables failed!
>>
>>     What am I doing incorrectly?
>>
>>     Thanks,
>>     Ryan
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>     -- 
>     Bogdan-Andrei Iancu
>     OpenSIPS eBootcamp - 19th of September 2011
>     OpenSIPS solutions and "know-how"
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110822/dfc10b59/attachment-0001.htm>


More information about the Users mailing list