Re: Re: SQLAilasAuth problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The problem is with sample ini files - they contain incorrect
"User" entry for username. It should be "Username" (as with SQLConfig).
I'll correct the error. Fortunatelly, the manual contains the correct
information, so please take a look at the manual too.

----- Original Message ----- 
From: "AP MUTHU" <apmuthu@xxxxxxx>
Sent: Sunday, April 11, 2004 10:02 AM


If in the gatekeeper.ini file:-

[Gatekeeper::Auth]
SQLAliasAuth=sufficient;RRQ,ARQ
default=allow

[SQLAliasAuth]
Driver=MySQL
Host=localhost
Database=gkcontrol
User=gnugk1 ## separate user / password was used for SQLAliasAuth and
SQLConfig when same user failed
Password=secret1
CacheTimeout=300
# Query=SELECT CONCAT('sigip:',host,':',port) as authrule FROM users WHERE
alias = '%1' AND GatekeeperId = '%2' AND active
Query=SELECT authcond from users ## authcond has either allow or deny for now
default=deny ## This is not in the manual is it meaningful to be done?

[SQLConfig]
Driver=MySQL
Host=localhost
Database=gkcontrol
Username=gnugk
Password=secret
RewriteE164Query=SELECT rkey, rvalue FROM rewriterule WHERE GatekeeperId =
'%1'


The relevant extract from the trace log is:-

gksql.cxx(117) SQLCONF Database connection pool created:
gnugk@localhost[gkcontrol]
Toolkit.cxx(554) GK SQL config connection established
Toolkit.cxx(561) GK Loading rewrite rules from SQL database
Toolkit.cxx(576) GK 4 rewrite rules loaded from SQL database
Toolkit.cxx(660) GK SQL config connection closed

gkauth.cxx(444) GkAuth Add default rule with flag ff
gkauth.cxx(444) GkAuth Add SQLAliasAuth rule with flag a
gksql_mysql.cxx(389) SQLAliasAuth MySQL connection to @localhost[gkcontrol]
failed (mysql_real_connect failed): Access denied for user: 'ODBC@localhost'
(Using password: YES)
gksql.cxx(112) SQLAliasAuth Database connection failed: @localhost[gkcontrol]
gkauth.cxx(1321) SQLAliasAuth Module creation failed: could not connect to the
database


It appears that the culprit may be in 
gksql.cxx :-

#define GKSQL_DEFAULT_MIN_POOL_SIZE 1
#define GKSQL_DEFAULT_MAX_POOL_SIZE 1
#define GKSQL_CLEANUP_TIMEOUT 5000

Although the Release version is compiled with 'Maximise Speed'
 without individually choosing 'Favor Fast Code',
 the database connection does not appear to have been closed 'fully'
 after loading in the SQLConfig entries for RewriteE164 values,
 and hence the connection for SQLAliasAuth fails.


Why is the code different for SQLConfig in Toolkit.cxx when compared to the
real_mysql_connect
 of gk_mysql.cxx used for SQLAliasAuth and SQLPasswordAuth ?

Regards,
Ap.Muthu



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux