Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sun Aug 25, 2019 7:50 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: HELP!!! : Connection failed - error
PostPosted: Fri Apr 06, 2007 7:34 am 
Offline

Joined: Fri Apr 06, 2007 7:28 am
Posts: 23
Hello

I'm TB2.0 user and just installed A2Billing for first time.
I used Postgres as DB and follow every step indicated in wiki.
Everything was ok, and I can see the usernames on DB query, but when I try to Login, i see the message " Connection failed"

Anyone can help me what is wrong?
My a2billing.conf file is ok
[database]
hostname=localhost
port=5432
user=a2billinguser
password=XXXXX
dbname=a2billing
dbtype=postgres
;dbtype=mysql


Any one can help me?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 7:40 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
First (in a series of) question:
does Postgres listen on the tcp port? Many distros have that disabled by default.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 8:16 am 
Offline

Joined: Fri Apr 06, 2007 7:28 am
Posts: 23
Yes.. I double checked the configuration file

/var/lib/pgsql/data/postgresql.conf

and it contains...

tcpip_socket = True
port = 5432


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 8:21 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
.. then, try to connect manually. Use:
psql -U a2billinguser a2billing

And see if it connects. (w/o hostname, that would use the unix socket).
Then, try specifying the hostname like:

psql -U a2billinguser -h localhost a2billing


If psql is successful, try the other thing: does the apache user have rights to enter the /etc/asterisk dir and read the a2billing.conf file?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 8:32 am 
Offline

Joined: Fri Apr 06, 2007 7:28 am
Posts: 23
the connection works OK.
In both cases I can see "a2billing =>" prompt

In your question... does the apache user have rights to enter the /etc/asterisk dir and read the a2billing.conf file?
How can I check it??

your help is very appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 8:38 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
ls -ld /etc/asterisk
(assuming a2billing.conf is there - the default)
and then ls -l /etc/asterisk/a2billing.conf

The first must be x-able by the apache user, the second must be readable.


<moaning on>
Please learn Linux!
Sooner or later you'll need the knowledge.
</moaning>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 8:44 am 
Offline

Joined: Fri Apr 06, 2007 7:28 am
Posts: 23
they are -rwxrwxrwx.... (chmod 777)

now...? :cry:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 8:58 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
.. now look at /var/log/httpd/error_log (or whatever it's called)

apache will dump any php errors there. Sometimes you may even be missing the php-pgsql etc. packages..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 9:08 am 
Offline

Joined: Fri Apr 06, 2007 7:28 am
Posts: 23
Nothing anormal...
I can't see any error refering A2Billing in the error logs...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 2:30 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
You said you're using Trixbox .... it uses MySQL by default.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 6:13 pm 
Offline

Joined: Fri Apr 06, 2007 7:28 am
Posts: 23
I reinstalled A2Billing using MySQL and everything is working fine!

Thank you for everyone!!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 06, 2007 6:16 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
It has to be something in error log - just post last lines for us to see. If you get connection failed when trying to connect it should be posted in error_log.


Top
 Profile  
 
 Post subject: Might be this.
PostPosted: Thu May 15, 2008 3:35 am 
Offline

Joined: Thu May 15, 2008 3:26 am
Posts: 1
error-log was

[Wed May 14 22:05:26 2008] [error] [client 192.168.1.11] PHP Warning: pg_connect() [<a href='function.pg-connect'>function.pg-connect</a>]: Unable to connect to PostgreSQL server: could not translate host name &quot;localhost&quot; to address: Name or service not known in /var/www/html/A2Billing_UI/lib/adodb/drivers/adodb-postgres64.inc.php on line 686, referer: http://192.168.1.11/A2Billing_UI/Public/index.php

a2billing.conf

[database]
hostname = localhost ; Change localhost to IP ADDRESS.
port = 5432
user = a2billinguser
password = xxxxxxx
dbname = a2billing
dbtype = postgres
;dbtype = mysql

then it connects to DB.


Top
 Profile  
 
 Post subject: Re: Might be this.
PostPosted: Thu May 15, 2008 3:40 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
secure3w wrote:
could not translate host name &quot;localhost&quot; to address: Name or service not known
Indicates a problem in /etc/resolv.conf and/or /etc/hosts rather than a problem with A2Billing.


Top
 Profile  
 
 Post subject: postgre install - connection refused
PostPosted: Mon Oct 06, 2008 9:06 pm 
Offline

Joined: Tue Feb 05, 2008 12:10 pm
Posts: 16
Location: South Africa
My setup is as above but still get this error! Any ideas please

PHP Warning: pg_connect() [<a href='function.pg-connect'>function.pg-connect</a>]: Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host &quot;127.0.0.1&quot;, user &quot;shaunw&quot;, database &quot;a2billing&quot;, SSL off in /home/shaunw/html/A2Billing_UI/lib/adodb/drivers/adodb-postgres64.inc.php on line 686, referer: http://www.ecommunicate.co.za/voip/Public/index.php


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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