Support A2Billing :

provided by Star2Billing S.L.

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


All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: CONNECTION FAILED | Please help
PostPosted: Sun Sep 16, 2007 3:42 am 
Offline

Joined: Mon Sep 04, 2006 2:40 pm
Posts: 9
Installed a2billing and as matter of fac i have installed this atleast 6 times with no problems but this installation is some how not working. Just gives me error "connection failed"

a2billing conf is fine, checked all the DB's, drop the databse and tried it atleast 3 times but NO luck.

check the log and it says something "a2billing Access denied adodb-mysql.inc.php"

I am using centos with mysql

Any help would be very appreciated


Top
 Profile  
 
 Post subject: Please HELP
PostPosted: Sun Sep 16, 2007 6:40 pm 
Offline

Joined: Mon Sep 04, 2006 2:40 pm
Posts: 9
Folks, need somebody to help me as i m really stuck


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 16, 2007 6:48 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Sounds like a permissions problem.

The files in /var/www/ need to be owned by the user your Apache server runs as. This is usually apache:apache

Code:
chown -R apache:apache /var/www


Top
 Profile  
 
 Post subject: tried that but no help
PostPosted: Sun Sep 16, 2007 7:51 pm 
Offline

Joined: Mon Sep 04, 2006 2:40 pm
Posts: 9
i tried that as well but no help... any other thoughts


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 16, 2007 7:57 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
ADODB refers to the database interface used. Posting the full error message would be helpful.

Perhaps check the credentials used to connect to the database server in a2billing.conf.


Top
 Profile  
 
 Post subject: error log
PostPosted: Sun Sep 16, 2007 8:10 pm 
Offline

Joined: Mon Sep 04, 2006 2:40 pm
Posts: 9
first of all thanks for taking time and helping me

I have couple of errors on my apache log

it says:
PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'mya2billing'@'localhost' (using password: YES) in /var/www/html/A2Billing_UI/lib/adodb/drivers/adodb-mysql.inc.php on line 355, referer: http://localhost/A2Billing_UI/Public/index.php

ALSO its also has some php warnings like the following

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/msql.so' - /usr/lib/php/modules/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0


Top
 Profile  
 
 Post subject: Re: error log
PostPosted: Sun Sep 16, 2007 8:19 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
techcon wrote:
PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'mya2billing'@'localhost' (using password: YES)
Have you verified using the MySQL command line client that you can connect to the database using the 'mya2billing' username?

Quote:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/msql.so' - /usr/lib/php/modules/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have a feeling this is the cause of your problem. It doesn't look like the database modules for PHP are even installed.
On Centos don't you have to install a package called php-mysql (or php-pgsql)?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 16, 2007 8:27 pm 
Offline

Joined: Mon Sep 04, 2006 2:40 pm
Posts: 9
yes, i itried conecting the db and it works fine form command prompt. I can query any table..

the php packages are also installed, here is the output form

rpm -qa | grep php


php-pear-1.4.11-1.el4s1.1
php-common-5.1.6-3.el4s1.7
php-cli-5.1.6-3.el4s1.7
php-5.1.6-3.el4s1.7
php-pdo-5.1.6-3.el4s1.7
php-mysql-5.1.6-3.el4s1.7
php-gd-5.1.6-3.el4s1.7


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 16, 2007 8:53 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
It looks like you've installed the right stuff. It's strange that PHP still can't find the relevant modules.

Have you checked the files referenced actually exist, and if so in which folder do they reside?

Check your php.ini (there may be more than one on some distros) to verify that 'extension_dir =' contains the folder mentioned above.

Correct configuration of apache/php/mysql is best answered by the documentation/forums for CentOS. The A2B forums really aren't the place for distribution specific help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 11:25 am 
Offline

Joined: Mon Sep 04, 2006 2:40 pm
Posts: 9
I kind of make sure that my installation works fine. I dont know whats wrong. I must be missing some DB permission step in a2billing installation....

Even i tried installating 2nd instance on a server where the first instance iw working fine and it gives me the same error "connection failed"

i can login to the command prompt and can connect to the db fine and can query any table i want. Verified the a2billing.conf settings, everything is correct.

No idea where to go from where. my apache access log does not show any any thing

it says "12.123.12.123 - - [17/Sep/2007:07:19:31 -0400] "GET /a2billing2/ HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"


12.123.12.123 - - [17/Sep/2007:07:19:38 -0400] "POST /a2billing2/Public/index2.php HTTP/1.1" 200 17"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 7:34 pm 
Offline

Joined: Wed Mar 15, 2006 11:58 pm
Posts: 325
I think I have a simpler problem. I have a question though. What should be set for manager password here in a2billing.conf:

; MANAGER CONNECTION PARAMETERS
manager_host = localhost
manager_username = myasterisk
manager_secret = mycode



And if anything is set here then should manager.conf be set with a password too and how?

Here is what my manager.conf looks like:
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects = yes

[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

#include manager_additional.conf
#include manager_custom.conf

[myasterisk]
secret = rootme
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user



As for as [database] goes for a2billing.conf, this is what I have:

[database]
hostname = localhost
port = 5432
user = a2billinguser
password = ******* (This is the password that I used to create db user)
dbname = mya2billing
dbtype = postgres
;dbtype = mysql


Added after 8 minutes:

By the way my error log shows:

[Wed Oct 24 14:26:00 2007] [error] [client 192.168.0.20] PHP Notice: Undefined index: admin_id in /var/www/html/A2Billing_UI/lib/defines.php on line 237


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 11:38 pm 
Offline

Joined: Wed Mar 15, 2006 11:58 pm
Posts: 325
I still can't access this.

My console does not show a request from a2billing.conf for authentication on a reload:



== Parsing '/etc/asterisk/sip.conf': Found
== Parsing '/etc/asterisk/sip_nat.conf': Found
== Parsing '/etc/asterisk/sip_registrations.conf': Found
== Parsing '/etc/asterisk/sip_additional.conf': Found
== Parsing '/etc/asterisk/users.conf': Found
== Parsing '/etc/asterisk/sip_notify.conf': Found
== Manager 'phpconfig' logged off from 127.0.0.1
== Parsing '/etc/asterisk/manager.conf': Found
== Parsing '/etc/asterisk/manager_additional.conf': Found
== Parsing '/etc/asterisk/manager_custom.conf': Found
== Parsing '/etc/asterisk/a2billing.conf': Found
== Manager 'admin' logged on from 127.0.0.1




However, I have also created manager_additional.conf too and this is my settings:


a2billing.conf
; MANAGER CONNECTION PARAMETERS
manager_host = localhost
manager_username = myasterisk
manager_secret = mycode


Could the "manager_host=localhost" be the problem? How can I debug this?




manager.conf:
;
; Asterisk Call Management support
;


[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects = yes

[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

[myasterisk]
secret = mycode
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

#include manager_additional.conf
#include manager_custom.conf




And finally, my manager_additional.conf includes:

#include a2billing.conf

[myasterisk]
secret=mycode
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user




I still get : Connection failed


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 25, 2007 12:42 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I previously suggested you search for 'connection failed', yet you haven't described following any of the advice in any of the threads related to your question. Your Apache log files may well give you a clue as to where your problem really lies. I'm guessing the database credentials are wrong.

bruce wrote:
My console does not show a request from a2billing.conf for authentication on a reload
The section of the debug log you quoted shows that a reload had just taken place (Parsing xxx...) and that two different users had just been using the AMI (admin and phpconfig). Surely one of these users is used by your A2B install?

I notice you're defining the user 'myasterisk' in both manager.conf and manager_additional.conf which certainly won't be helping. You claim your manager_additional.conf includes the line "#include a2billing.conf" which would definately cause problems. You either need to spend some time educating yourself (primarily from voip-info.org) or be much more careful with your configuration changes.

bruce wrote:
I still get : Connection failed
This is unrelated to being able to logon to the AMI.

bruce wrote:
Funny thing is that A2BCustomer_UI works fine even though it is using the same parametere that are set for both A2Billing_UI and A2BCustomer_UI in a2billing.conf.
The customer UI doesn't use the AMI at all. There are only two situations (that I'm aware of) in which A2B needs to use AMI: the admin UI uses it to issue a 'reload' command when you've updated SIP/IAX friends, and the AGI uses it for callback calls. In other words you've been looking in the wrong place.

If you're considering using A2B as more than a hobby or toy I strongly suggest you employ someone who knows what they're doing.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 25, 2007 1:49 am 
Offline

Joined: Wed Mar 15, 2006 11:58 pm
Posts: 325
Just because I did not write that I searched and I couldn't end up anywhere does not mean that I did not.

Also, adding a2billing.conf in two places was just to make sure it loads and that it authenticates.

Anyhow, I guess I will go the mysql way now since no one seems to have a solution for it.

Thanks though.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 25, 2007 1:53 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
bruce wrote:
Also, adding a2billing.conf in two places was just to make sure it loads and that it authenticates.
a2billing.conf will only cause problems if you #include it anywhere. It's not parseable by Asterisk at all. It's read by A2B alone, and it can find it without needing any #includes.

For what it's worth Postgres is working fine on every A2B installation that I'm responsible for.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 12 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group