Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 26, 2024 12:08 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: A2billing page showing Connection failed after login - Help
PostPosted: Wed Dec 08, 2010 5:17 pm 
Offline

Joined: Wed Dec 08, 2010 4:58 pm
Posts: 6
Hi,

I am using the following versions

Centos 5.5

mysql-5.0.77-4.el5_5.4

php-5.2.10-1.el5

I have successfully installed asterisk and a2b. The admin page is opening at http://server-ip/a2billing/admin After entering the login and passwd, its shows "Connection failed" ( Not only admin but also agent and customer show the same )

/etc/a2billing.conf contains

[database]
hostname = <server-ip>
; port for postgres is 5432 by default
port = 3306
user = a2billinguser
password = a2billing
dbname = mya2billing
; dbtype setting can either be mysql or postgres
dbtype = mysql

and its permission is -rw-rw-rw- 1 root root 1

I can login to the database using a2billinguser/a2billing. Database mya2billing ands its tables are created

I set permission to all the files and directories as specified in the help files

Please help me to fix this issue.

thanks
[email protected]


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Wed Dec 08, 2010 9:24 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
sipglobe wrote:
[database]
hostname = <server-ip>
Are you sure MySQL is actually listening on that IP that you're trying to connect to? I believe recent MySQL releases have 'skip-networking' in the default configuration, so they don't listen at all on IP. Instead they listen only on a UNIX domain socket (which is preferable as it's far more secure than listening on your public IP). Try setting "hostname = localhost" instead which, IIRC, should cause A2B to use the UNIX socket rather than an IP socket.


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Thu Dec 09, 2010 2:49 am 
Offline

Joined: Wed Dec 08, 2010 4:58 pm
Posts: 6
Hi,

I changed it to localhost and rebooted the server. Still same prob

And I noticed some errors..

[root@sipglobe ~]# netstat -tap | grep mysql
getnameinfo failed
tcp 0 0 *:mysql *:* LISTEN 4850/mysqld


[root@sipglobe ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for sipglobe
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]



what it means ? it may be a prob ?

thanks


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Thu Dec 09, 2010 7:07 am 
Offline

Joined: Wed Dec 08, 2010 4:58 pm
Posts: 6
Hi,

I changed server hostname to localhost and there is no error with httpd now.

But still mysql showing " getnameinfo failed "

I am getting Connection Failed due to this ??

please help, thanks in advance


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Thu Dec 09, 2010 3:30 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
That sounds like DNS resolution problems. I doubt it is preventing you from logging in.

Have you allowed access to 'a2billinguser' using MySQL's GRANT PRIVILEGES command?


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Thu Dec 09, 2010 5:04 pm 
Offline

Joined: Sat May 10, 2008 4:19 pm
Posts: 132
Location: Wilmington, DE
Stavros,
I must say: "It's great to see you active again on the forum. I had to make a few "double takes" to make sure my eyes were not playing tricks on me.

Anyhow, I've had that problem many times lately on new installs and a fix was posted.
Code:
chown -R asterisk:asterisk /var/lib/php/session/

That worked it for me every time.

RobinA.


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Thu Dec 09, 2010 5:13 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

this is almost certainly a database connection issue, rather than session variables. Test with

mysql -ua2billinguser -pa2billing -hlocalhost

then

use a2billing14;

If all that comes up OK, then you should be good to go.

Joe


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Sat Dec 11, 2010 1:17 pm 
Offline

Joined: Wed Dec 08, 2010 4:58 pm
Posts: 6
Dear Stavros, I created the db using the script "a2billing-createdb-user.sql " It allows user a2billinguser using GRANT PRIVILEGE command

Dear Robin, I executed the command and still same prob

[root@localhost ~]# chown -R asterisk:asterisk /var/lib/php/session/
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ls -la /var/lib/php/
total 20
drwxr-xr-x 3 root root 4096 Nov 13 2009 .
drwxr-xr-x 29 root root 4096 Dec 11 03:16 ..
drwxrwx--- 2 asterisk asterisk 4096 Nov 13 2009 session
[root@localhost ~]#



Dear jroper, i can connect to mya2billing with a2billinguser and a2billing pass

[root@localhost ~]# mysql -ua2billinguser -pa2billing -hlocalhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mya2billing;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>


Thanks


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Mon Dec 13, 2010 12:30 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Another possibility is that your PHP installation is missing mysqli support. Check with
Code:
php -m | grep mysql
I believe you're looking for 'mysqli' in the output.


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Thu Dec 16, 2010 4:53 am 
Offline

Joined: Wed Dec 08, 2010 4:58 pm
Posts: 6
Dear stavros,

it was not showing mysqli and I installed php-mysql and now the result is

[root@localhost ~]# php -m | grep mysql
PHP Warning: Module 'pgsql' already loaded in Unknown on line 0
mysql
mysqli
pdo_mysql
[root@localhost ~]#


Now after login to the page i am getting " Error : cannot load conf : load_conf_db "

thanks


Top
 Profile  
 
 Post subject: Re: A2billing page showing Connection failed after login - Help
PostPosted: Tue Dec 21, 2010 6:44 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I'm not sure this will help, but you could try reverting the owner of /var/lib/php/session to 'apache'; I very much doubt you're actually running Apache as the user 'asterisk' on a default CentOS install.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 67 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