I had a few problems getting freeradius 0.3 to compile, but other than that I have never encountered any problems.  What is happening is for some reason it is closing the connection to the pgsql database.  Whether that is because of freeradius or because of pgsql i do not know.
Some tips to help you solve your problem:
1. How long between when radius initialises and when you get the error? If it is a long length of time, perhaps you are getting timeout issues.
2. I notice you are connecting to postgres@linuxbackup:5432/radius.  I assume that means that your postgres server is a different computer - perhaps the problem you are having is in the network link between the two - perhaps you are losing connectivity or something.
3. if you can start another terminal session to the postgres server, from a bash prompt run "watch "ps ax | grep post".  This will list all the postmaster connection tasks, it may help you see what is going wrong.
4. start your postgres server as a foreground task (instead of a daemon) with the -D and then 1, 2, 3, or 4 for the debug level (eg postmaster -i -D2) and watch the output - it may help you determine why it is losing the connection.
5. I also notice you are running an old version of pgsql - I would suggest you download the latest from www.postgresql.org - the current version is 7.1.3
 
As I say, I haven't encountered any problems with the database link, so I'm just flying blind here with suggestions.  My test server was running RH7.1, Freeradius 0.3 and pgsql 7.1.3.  My production server is running an old version of SuSE linux (kernel 2.0.something), Freeradius 0.3 and pgsql 7.1.3.  Once I sorted out the compile issues, I have not encountered any problems whatsoever.
 
PS:  I would prefer you email the list rather than me personally.
----- Original Message -----
From: bharani
Sent: Friday, December 21, 2001 8:25 PM
Subject: Radius & Postgres --Problem...

Hi,
I got your mail id from the mailing list. I want to know whether postgresql & freeradius happens without any error. I did'nt get it. So if any clue you have help me. What all i have done is...

1.Created radius user and installed radius.
2.created all tables as mentioned in db_postgresql
3.Modified sql.conf as rlm_sql_postgresql, server,username,password.
4.Modified authorize and authenticate and accouting for using sql.
5.Did'nt add anything in users file.
 
 
I am working in
Linux 6.2
postgresql6.5.3
freeradius0.3
 
This is the output i am receiving. So help me ...
Thanks in advance.
Bharani
 

reread_config:  reading radiusd.conf
Config:   including file: /usr/local/etc/raddb/proxy.conf
Config:   including file: /usr/local/etc/raddb/clients.conf
Config:   including file: /usr/local/etc/raddb/snmp.conf
Config:   including file: /usr/local/etc/raddb/sql.conf
Config:   including file: /usr/local/etc/raddb/sql.conf
 
etc.....etc......
 
 
 
 
 
rlm_sql: Driver rlm_sql_postgresql loaded and linked
rlm_sql: Attempting to connect to postgres@linuxbackup:5432/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)
radiusd.conf[646] authtype SQL already configured - skipping
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
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:1054, id=242, length=56
        User-Name = "bharani"
        Password = ": \251o\217\241'a\305\325\311\203M\317Cf"
        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
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
PostgreSQL Query failed Error: PQsendQuery() -- There is no connection to the backend.
rlm_sql_getvpdata: database query error
rlm_sql:  SQL query error; rejecting user
rlm_sql: Released sql socket id: 4
  modcall[authorize]: module "sql" returns invalid
modcall: group authorize returns invalid
Sending Access-Reject of id 242 to 192.192.1.252:1054
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 242 with timestamp 3a40c5d1
Nothing to do.  Sleeping until we see a request.

Reply via email to