rlm_sql: Failed to create the pair: Failed to find IP address

Ilya ilya at bwc.ru
Thu Feb 26 09:44:56 CET 2009


Hello!

Please help!

I’ve got the following situation:

In radcheck I’ve got:
_______________________________________
|Username|ATTRIBUTE          |OP|VALUE|
|test    |Cleartext-Password |:=|test |
---------------------------------------
in radreply:
______________________________________________
|Username|ATTRIBUTE        |OP|VALUE          |
|test    |Framed-IP-Address|:=|081.018.118.238|
-----------------------------------------------
And if I do

radtest test test 127.0.0.1 0 testing123

 Radius –X returns me reject:

rad_recv: Access-Request packet from host 127.0.0.1 port 33157, id=32, length=56
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 0
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
[suffix] No '@' in User-Name = "test", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
[sql]   expand: %{User-Name} -> test
[sql] sql_set_user escaped user --> 'test'
rlm_sql (sql): Reserving sql socket id: 4
[sql]   expand: SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'test' ORDER BY id
[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,Attribute,Value,op FROM radreply WHERE Username = 'test' ORDER BY id
rlm_sql: Failed to create the pair: Failed to find IP address for 081.018.118.238
rlm_sql (sql): Error getting data from database
[sql] SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 4
++[sql] returns fail
Invalid user: [test/test] (from client localhost port 0)
Using Post-Auth-Type Reject
+- entering group REJECT {...}
[attr_filter.access_reject]     expand: %{User-Name} -> test
 attr_filter: Matched entry DEFAULT at line 11
++[attr_filter.access_reject] returns updated
Delaying reject of request 0 for 1 seconds
Going to the next request
Waking up in 0.9 seconds.
Sending delayed reject for request 0
Sending Access-Reject of id 32 to 127.0.0.1 port 33157
Waking up in 4.9 seconds.
Cleaning up request 0 ID 32 with timestamp +437
Ready to process requests.


But if I, just for fun, replace this ip=081.018.118.238 for someone like 81.18.11.23:

radcheck:

_______________________________________
|Username|ATTRIBUTE          |OP|VALUE|
|test    |Cleartext-Password |:=|test |
---------------------------------------
in radreply:
______________________________________________
|Username|ATTRIBUTE        |OP|VALUE          |
|test    |Framed-IP-Address|:=|81.18.11.23    |
-----------------------------------------------

Everything works fine and I get accept:

rad_recv: Access-Request packet from host 127.0.0.1 port 33162, id=112, length=56
        User-Name = "test"
        User-Password = "test"
        NAS-IP-Address = 127.0.0.1
        NAS-Port = 0
+- entering group authorize {...}
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
[suffix] No '@' in User-Name = "test", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
[sql]   expand: %{User-Name} -> test
[sql] sql_set_user escaped user --> 'test'
rlm_sql (sql): Reserving sql socket id: 4
[sql]   expand: SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'test' ORDER BY id
[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,Attribute,Value,op FROM radreply WHERE Username = 'test' ORDER BY id
[sql]   expand: SELECT GroupName FROM radusergroup WHERE UserName='%{SQL-User-Name}' -> SELECT GroupName FROM radusergroup WHERE UserName='test'
rlm_sql (sql): Released sql socket id: 4
++[sql] returns ok
++[expiration] returns noop
++[logintime] returns noop
++[pap] returns updated
Found Auth-Type = PAP
+- entering group PAP {...}
[pap] login attempt with password "test"
[pap] Using clear text password "test"
[pap] User authenticated successfully
++[pap] returns ok
Login OK: [test] (from client localhost port 0)
+- entering group post-auth {...}
++[exec] returns noop
Sending Access-Accept of id 112 to 127.0.0.1 port 33162
        Framed-IP-Address := 81.18.11.23
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 112 with timestamp +3
Ready to process requests.

Please help me to resolve this problem. Thanks in advance.

P.S. freeRADIUS v. 2.1.3

have a good day,
ilya







More information about the Freeradius-Users mailing list