Author |
|
alberto007 Intermediate
Joined: February 04 2014 Location: Spain Posts: 13
|
Posted: February 10 2014 at 7:56am | IP Logged
|
|
|
Hello,
I've set up my centrex proxy to use a mysql database as
registrar db, instead of the memory cache.
But when I do this, clients can no longer register, I get
a '400 Bad request' response.
I use the following connection string:
Driver={MySQL ODBC 5.2 ANSI Driver};
Server=localhost;
Database=registrardatabase;
User=mydbuser;
Password=mydbpassword;
Option=4;
The DB works, because I click the "Test connection"
button and I get: "The connection to the DB succeeded".
If I go back to Memory Cache registrar DB, clients
register successfully again.
Do you know what could be happening?
Thank you very much. Best regards,
Alberto
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: February 11 2014 at 9:06am | IP Logged
|
|
|
Hi Alberto,
Not sure why you are seeing a 400 SIP response. I tested here using ODBC driver 3.51 and I have no issues. I used a similar connect string:
Code:
Driver={MySQL ODBC 3.51 Driver};
Server=localhost;
Database=registrardatabase;
User=myusername;
Password= mypassword;
Option=4;
|
|
|
Strange... if the DB connection test passed you should be OK.
Event though you are getting a 400 SIP response, have you looked at the MySQL registrar database table to see if the registration occurred? I am curious.
Try to register again. You will get your 400 response. Then look at the registrar table named registereduseragents in the DB named registrardatabase.
Issue the following MySQL command to see what registrar entries are in your table:
Code:
select * from `registrardatabase`.`registereduseragents` limit 0, 5000
|
|
|
If I remember, your install is using a “Custom Plug In” DLL. Is this correct? If you are, maybe there is something in the DLL that may be causing the register to fail.
RJ
|
Back to Top |
|
|
alberto007 Intermediate
Joined: February 04 2014 Location: Spain Posts: 13
|
Posted: February 11 2014 at 9:37am | IP Logged
|
|
|
Hi,
In this moment we have the custom plugin disabled.
I did what you say and the table is empty.
I used the included script to create the table, this one:
Code:
CREATE TABLE 'registereduseragents' (
'RegistrationName' CHAR(50) NOT NULL DEFAULT '',
'IpAddressStr' CHAR(16) DEFAULT NULL,
'Port' INT(11) DEFAULT NULL,
'ExpireTimeSeconds' INT(11) UNSIGNED DEFAULT NULL,
'IsNated' INT(11) DEFAULT NULL,
'UserAgent' CHAR(255) NOT NULL DEFAULT '',
'DomainName' CHAR(255) NOT NULL DEFAULT '',
'ProxyServerPort' INT(11) DEFAULT NULL,
PRIMARY KEY ('RegistrationName')
) ENGINE=INNODB DEFAULT CHARSET=latin1;
|
|
|
Maybe this is not the correct table structure and the query to insert users is failing...
Does the proxy have logs to see this?
I'm using mysql server 5.6 on Windows. Do you know where can I find it's logs for error queries?
Thank you! Regards,
Alberto
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: February 11 2014 at 1:20pm | IP Logged
|
|
|
Alberto,
1)
Check the version of the following DLL:
RegistrarDatabaseDriver.dll v2.6.2.4
It is located here (your path may be slightly different):
“C:\Program Files\LanScape\Centrex Proxy Server Enterprise\Database Driver”
Let me know if you have some other version. I will assume you have the above version.
2)
You may already know the following information but I will go over it anyway…
See this install directory (your path may be slightly different):
“C:\Program Files\LanScape\Centrex Proxy Server Enterprise\Database Driver\Empty Registrar Databases\MySQL”
This directory holds the MySQL stuff we need.
CreateRegDb.bat
You can run this batch file to create a new MySQL empty database for the proxy server.
The batch file uses the “Empty_MySQL_registrardatabase.sql” file for database creation.
A database field may be missing from your *.sql file. Edit your *.sql file to add the “ExternalDomainName” line below:
Code:
DROP TABLE IF EXISTS `registereduseragents`;
CREATE TABLE `registereduseragents` (
`RegistrationName` char(50) NOT NULL default '',
`IpAddressStr` char(16) default NULL,
`Port` int(11) default NULL,
`ExpireTimeSeconds` int(11) unsigned default NULL,
`IsNated` int(11) default NULL,
`UserAgent` char(255) NOT NULL default '',
`DomainName` char(255) NOT NULL default '',
`ExternalDomainName` char(255) NOT NULL default '',
`ProxyServerPort` int(11) default NULL,
PRIMARY KEY (`RegistrationName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
Once you make the change to the *.sql file, run the batch file and retry your registrations.
Let me know if this fixes the issue.
Thanks,
RJ
|
Back to Top |
|
|
alberto007 Intermediate
Joined: February 04 2014 Location: Spain Posts: 13
|
Posted: February 12 2014 at 9:43am | IP Logged
|
|
|
Great!
The field
`ExternalDomainName` char(255) NOT NULL default '',
was missing. Now, clients register successfully.
Thank you very much!!
Alberto
|
Back to Top |
|
|
|
|