Hi,
In connection to my previous mails, still i have the postgresql problem.I could'nt 
find the reason for this...
The following changes i have made in the sql.conf and radiusd.conf
 
sql.conf
sql sql_postgresql
{

      driver = "rlm_sql_postgresql"
      server = "localhost"
      login = "root"
      password = "pwd"
      radius_db = "radius"
      etc.....  
 
 
}
 
radiusd.conf
modules {
 $INCLUDE  ${confdir}/sql.conf
 
}
 
authorize {
        preprocess
#       counter
#       attr_filter
        suffix
        files
        sql_postgresql
}
authenticate {
#       pam
#       unix
        sql_postgresql
}
 
 
 authtype SQL {
          sql_postgresql
          sql2
 }
 
I have also created the tables as mentioned in db_postgresql.
 
I want the necessary details, to get the successful connection between postgresql & 
freeradius..So whoever have worked on this..help.
Thanks in advance.
Bharani
 
The output is as follows:
 
Starting - reading configuration files ...
reread_config:  reading radiusd.conf
...............................etc

Module: Loaded SQL
 sql: driver = "rlm_sql_postgresql"
 sql: server = "localhost"
 sql: port = ""
 sql: login = "root"
 sql: password = "mascon"
 sql: radius_db = "radius"
 sql: acct_table = "radacct"
 sql: acct_table2 = "radacct"
 sql: authcheck_table = "radcheck"
 sql: authreply_table = "radreply"
 sql: groupcheck_table = "radgroupcheck"
 sql: groupreply_table = "radgroupreply"
 sql: usergroup_table = "usergroup"
 sql: nas_table = "nas"
 sql: dict_table = "dictionary"
 sql: sqltrace = yes
 sql: sqltracefile = "/usr/local/var/log/radius/sqltrace.sql"
 sql: deletestalesessions = yes
 sql: num_sql_socks = 5
........................etc.............
.............................
 
 sql: sql_user_name = "%{User-Name}"
 sql: accounting_stop_query_alt = "INSERT into radacct (RadAcctId, AcctSessionId
, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStart
Time, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectIn
fo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, A
cctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay,
 AcctStopDelay) values('', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%
{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port
-Type}', '0', '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-
Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}',
 '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Frame
d-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')"
 sql: connect_failure_retry_delay = 60
rlm_sql: Driver rlm_sql_postgresql loaded and linked
rlm_sql: Attempting to connect to root@localhost:/radius
rlm_sql:  Connected new DB handle, #0
rlm_sql:  Connected new DB handle, #1
rlm_sql:  Connected new DB handle, #2
rlm_sql:  Connected new DB handle, #3
rlm_sql:  Connected new DB handle, #4
Module: Instantiated sql (sql_postgresql)
Module: Loaded preprocess
 preprocess: huntgroups = "/usr/local/etc/raddb/huntgroups"
 preprocess: hints = "/usr/local/etc/raddb/hints"
 preprocess: with_ascend_hack = no
 preprocess: ascend_channels_per_line = 23
 preprocess: with_ntdomain_hack = no
 preprocess: with_specialix_jetstream_hack = no
 preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
 realm: format = "suffix"
 realm: delimiter = "@"
Module: Instantiated realm (suffix)
Module: Loaded files
 files: usersfile = "/usr/local/etc/raddb/users"
 files: acctusersfile = "/usr/local/etc/raddb/acct_users"
 files: compat = "no"
Module: Instantiated files (files)
Module: Loaded detail
 detail: detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/de
tail"
 detail: detailperm = 384
 detail: dirperm = 493
Module: Instantiated detail (detail)
Module: Loaded System
 unix: cache = no
 unix: passwd = "/etc/passwd"
 unix: shadow = "(null)"
 unix: group = "/etc/group"
 unix: radwtmp = "/usr/local/var/log/radius/radwtmp"
 unix: usegroup = no
Module: Instantiated unix (unix)
Module: Loaded radutmp
 radutmp: filename = "/usr/local/var/log/radius/radutmp"
 radutmp: perm = 384
 radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
 main: smux_password = ""
 main: snmp_write_access = no
SMUX connect try 1
Can't connect to SNMP agent with SMUX: Connection refused
Listening on IP address *, ports 1812/udp and 1813/udp, with proxy on 1814/udp.
Ready to process requests.
rad_recv: Access-Request packet from host 192.192.1.252:1024, id=125, length=56
        User-Name = "bharani"
        Password = "<gZe)\025v\211\314\351*\240\322\265\276O"
        NAS-IP-Address = 255.255.255.255
        NAS-Port-Id = "0"
modcall: entering group authorize
  modcall[authorize]: module "preprocess" returns ok
  modcall[authorize]: module "suffix" returns ok
    users: Matched bharani at 72
  modcall[authorize]: module "files" returns ok
rlm_sql: Reserving sql socket id: 4
radius_xlat:  'bharani'
sql_escape in:  'bharani'
sql_escape out:  'bharani'
sql_set_user:  escaped user --> 'bharani'
radius_xlat:  'SELECT id,UserName,Attribute,Value FROM radcheck WHERE Username =
 'bharani' ORDER BY id'
query: SELECT id,UserName,Attribute,Value FROM radcheck WHERE Username = 'bharan
i' ORDER BY id
Backend message type 0x45 arrived while idle
PostgreSQL Query failed Error: PQsendQuery() -- There is no connection to the ba
ckend.
rlm_sql_getvpdata: database query error
rlm_sql:  SQL query error; rejecting user
rlm_sql: Released sql socket id: 4
  modcall[authorize]: module "sql_postgresql" returns invalid
modcall: group authorize returns invalid
Sending Access-Reject of id 125 to 192.192.1.252:1024
        Reply-Message = "hai bharani from sql"
Finished request 0
Going to the next request
SMUX connect try 2
Can't connect to SNMP agent with SMUX: Connection refused
--- Walking the entire request list ---
Waking up in 6 seconds...
SMUX connect try 3
Can't connect to SNMP agent with SMUX: Connection refused
--- Walking the entire request list ---
Cleaning up request 0 ID 125 with timestamp 3c1db10f
Nothing to do.  Sleeping until we see a request. 


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to