Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 3:16 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject:
PostPosted: Sun Dec 30, 2007 3:00 pm 
Offline

Joined: Sun Feb 25, 2007 3:10 am
Posts: 190
Location: Philadelphia, PA
I am having problems verifying postgres on a new server just installed. I have a2billing 1.3.1 running. I noticed we still using a2billing-pgsql-schema-v1.3.0.sql; could this be the problem.

This is what I get when I verify and have dropped user/db and re-installed but still same problem.

a2billing=> SELECT * FROM cc_ui_authen;
ERROR: relation "cc_ui_authen" does not exist


Any help greatly appreciated.

Added after 2 hours 28 minutes:

Just wanted to add this note Querying SQL Server System Tables is what is giving me problems. I beleive the postgres is installed and running but not able to query the system tables.

a2billing=> SELECT * FROM cc_ui_authen;
ERROR: relation "cc_ui_authen" does not exist


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 04, 2008 1:16 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Is this still causing you problems?
broadbandvoice wrote:
I noticed we still using a2billing-pgsql-schema-v1.3.0.sql; could this be the problem.
To install the schema for a fresh v1.3.1 you first need to pass that v1.3.0 schema to your DB server, then also pass it the UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql update script.
Quote:
a2billing=> SELECT * FROM cc_ui_authen;
ERROR: relation "cc_ui_authen" does not exist
You need to install the schemae using the a2billing user too, otherwise they won't be visible to it.
Quote:
Querying SQL Server System Tables is what is giving me problems. I beleive the postgres is installed and running but not able to query the system tables.

a2billing=> SELECT * FROM cc_ui_authen;
ERROR: relation "cc_ui_authen" does not exist
That's not what that error message is saying I think. It's simply complaining that the A2B table cc_ui_authen hasn't yet been created by the current Postgres user.

The whole procedure should look like (you may need to substitute 'postgres' with you Postgres super user account name, often 'root'):
Code:
$ createuser -d -P -E -U postgres -W a2billing
Enter password for new role: $a2bpass
Enter it again: $a2bpass
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Password: $postgrespass
CREATE ROLE

$ createdb -U a2billing -W a2billingdb
Password: $a2bpass
CREATE DATABASE

$ psql -d a2billingdb -U a2billing -W -f DataBase/psql/a2billing-pgsql-schema-v1.3.0.sql
Password for user a2billing: $a2bpass

$ psql -d a2billingdb -U a2billing -W -f asterisk2billing/branches/1.3/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql
Password for user a2billing: $a2bpass

$ psql -d a2billingdb -U a2billing -W -c 'SELECT * from cc_ui_authen;'
Password for user a2billing: $a2bpass
userid | login |  password  | groupid | perms | confaddcust | name | direction | zipcode | state | phone | fax |        datecreation
--------+-------+------------+---------+-------+-------------+------+-----------+---------+-------+-------+-----+----------------------------
      2 | admin | mypassword |       0 | 32767 |             |      |           |         |       |       |     | 2005-02-26 21:14:05.391501
      1 | root  | myroot     |       0 | 32767 |             |      |           |         |       |       |     | 2005-02-26 20:33:27.691314
(2 rows)
You'll get some warnings about duplicate keys from the v1.3.1 upgrade. These are the footprints of a tired Stavros hacking on the schema some time ago and not thinking clearly. :oops: They are harmless though, I promise.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 9:58 am 
Offline

Joined: Sun Feb 25, 2007 3:10 am
Posts: 190
Location: Philadelphia, PA
Thanks for your help. Everything has been fixed already except the update from 1.3.0 to 1.3.1 schema. This is done now to complete see results below.


[root@fc7234153 psql]# psql -d a2billing -U a2billinguser -W -f /usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql
Password for user a2billinguser:
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:13: ERROR: duplicate key violates unique constraint "cons_cc_templatemail_mailtype"
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 0
UPDATE 1
UPDATE 1
UPDATE 1
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:30: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:31: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:32: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:33: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:34: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:35: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:36: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:37: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:38: ERROR: duplicate key violates unique constraint "cc_country_pkey"
psql:/usr/src/a2billing/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.3.1-pgsql.sql:39: ERROR: duplicate key violates unique constraint "cc_country_pkey"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 10:04 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
So now when you logon to the SQL server manually and run that query it shows the users and passwords?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 06, 2008 10:45 am 
Offline

Joined: Sun Feb 25, 2007 3:10 am
Posts: 190
Location: Philadelphia, PA
Yes.

a2billing=# SELECT * FROM cc_ui_authen;
userid | login | password | groupid | perms | confaddcust | name | direction | zipcode | state | phone | fax | datecreation
--------+--------+------------+---------+-------+-------------+------+-----------+---------+-------+-------+-----+----------------------------
1 | root | xxxxxxxxxx | 0 | 1023 | | | | | | | | 2005-02-26 20:33:27.691314
2 | admin | xxxxxxxxxx | 0 | 1023 | | | | | | | | 2005-02-26 21:14:05.391501
4 | yyyy | xxxxxxxxxx | 1 | 17 | | | | | | | | 2007-12-30 21:22:57.831099
6 | yyyy | xxxxxxxxxx | 1 | 17 | | | | | | | | 2008-01-03 16:56:28.42171


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group