reconnecting to mysql

Edgars Makņa edgarz at dtg.lv
Tue Sep 17 19:22:02 CEST 2013


Hello, 

I just setup 2.2.0 from freebsd ports. In the testing environment it looks okey except this error: 
rlm_sql_mysql: MYSQL check_error: 2006, returning SQL_DOWN 
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1 
rlm_sql_mysql: Starting connect to MySQL server for #1 
rlm_sql (sql): Connected new DB handle, #1 

It appears on every second authorization attempt. Ping to mysql server runs fine, another db's works without any clue. 
Google didnt give me any answers about this problem. 

rad_recv: Access-Request packet from host 127.0.0.1 port 27983, id=47, length=50 
User-Name = "2-40" 
User-Password = "PjTKX2Ln" 
Framed-Protocol = PPP 
# Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default 
+- entering group authorize {...} 
++[preprocess] returns ok 
++[chap] returns noop 
++[mschap] returns noop 
++[digest] returns noop 
[suffix] No '@' in User-Name = "2-40", looking up realm NULL 
[suffix] No such realm "NULL" 
++[suffix] returns noop 
[eap] No EAP-Message, not doing EAP 
++[eap] returns noop 
[sql] expand: %{User-Name} -> 2-40 
[sql] sql_set_user escaped user --> '2-40' 
rlm_sql (sql): Reserving sql socket id: 2 
[sql] expand: SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribu 
rlm_sql_mysql: MYSQL check_error: 2006, returning SQL_DOWN 
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2 
rlm_sql_mysql: Starting connect to MySQL server for #2 
rlm_sql (sql): Connected new DB handle, #2 
[sql] User found in radcheck table 
[sql] expand: SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribu 
[sql] expand: SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT groupname FROM radusergrou 
[sql] expand: SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, grou 
[sql] User found in group Plaza20 
[sql] expand: SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id -> SELECT id, grou 
rlm_sql (sql): Released sql socket id: 2 
++[sql] returns ok 
++[expiration] returns noop 
++[logintime] returns noop 
[pap] WARNING: Auth-Type already set. Not setting to PAP 
++[pap] returns noop 
Found Auth-Type = PAP 
# Executing group from file /usr/local/etc/raddb/sites-enabled/default 
+- entering group PAP {...} 
[pap] login attempt with password "PjTKX2Ln" 
[pap] Using CRYPT password "PCA82A.D836/k" 
[pap] User authenticated successfully 
++[pap] returns ok 
Login OK: [2-40/PjTKX2Ln] (from client localhost port 0) 
# Executing section post-auth from file /usr/local/etc/raddb/sites-enabled/default 
+- entering group post-auth {...} 
[sql] expand: %{User-Name} -> 2-40 
[sql] sql_set_user escaped user --> '2-40' 
[sql] expand: %{User-Password} -> PjTKX2Ln 
[sql] expand: INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{User-Name}', 
rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( 
rlm_sql (sql): Reserving sql socket id: 1 
rlm_sql_mysql: MYSQL check_error: 2006, returning SQL_DOWN 
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1 
rlm_sql_mysql: Starting connect to MySQL server for #1 
rlm_sql (sql): Connected new DB handle, #1 
rlm_sql (sql): Released sql socket id: 1 
++[sql] returns ok 
++[exec] returns noop 
Sending Access-Accept of id 47 to 127.0.0.1 port 27983 
Finished request 1. 
Going to the next request 
Waking up in 4.9 seconds. 
Cleaning up request 1 ID 47 with timestamp +51 
Ready to process requests. 


Thanks. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130917/3b46bdd4/attachment.html>


More information about the Freeradius-Users mailing list