<div>All,</div> <div>The PostgreSQL database that I want my freeradius-1.1.7 to connect to is running on a port different from the default 5432 and beacause of this, Freeradius is not not able to connect to the database.</div> <div>How do I change my fFreeradius configuration to instruct it to to the postgresql database on a port say 5490? It is the rlm_sql_postgresql driver that fails in doing this connection.</div> <div>Thanks for any suggestions.</div> <div> </div> <div>Below is the debug:</div> <div> </div> <div><A href="mailto:root@dev-radius">root@dev-radius</A>:~# /opt/freeradius/sbin/radiusd -X<BR>Starting - reading configuration files ...<BR>reread_config: reading radiusd.conf<BR>Config: including file: /opt/freeradius/etc/raddb/proxy.conf<BR>Config: including file: /opt/freeradius/etc/raddb/clients.conf<BR>Config: including file: /opt/freeradius/etc/raddb/snmp.conf<BR>Config: including file:
/opt/freeradius/etc/raddb/eap.conf<BR>Config: including file: /opt/freeradius/etc/raddb/postgresql.conf<BR> main: prefix = "/opt/freeradius"<BR> main: localstatedir = "/opt/freeradius/var"<BR> main: logdir = "/opt/freeradius/var/log/radius"<BR> main: libdir = "/opt/freeradius/lib"<BR> main: radacctdir = "/opt/freeradius/var/log/radius/radacct"<BR> main: hostname_lookups = no<BR> main: max_request_time = 30<BR> main: cleanup_delay = 5<BR> main: max_requests = 1024<BR> main: delete_blocked_requests = 0<BR> main: port = 0<BR> main: allow_core_dumps = no<BR> main: log_stripped_names = no<BR> main: log_file = "/opt/freeradius/var/log/radius/radius.log"<BR> main: log_auth = no<BR> main: log_auth_badpass = no<BR> main: log_auth_goodpass = no<BR> main: pidfile = "/opt/freeradius/var/run/radiusd/radiusd.pid"<BR> main: user = "(null)"<BR> main: group =
"(null)"<BR> main: usercollide = no<BR> main: lower_user = "no"<BR> main: lower_pass = "no"<BR> main: nospace_user = "no"<BR> main: nospace_pass = "no"<BR> main: checkrad = "/opt/freeradius/sbin/checkrad"<BR> main: proxy_requests = yes<BR> proxy: retry_delay = 5<BR> proxy: retry_count = 3<BR> proxy: synchronous = no<BR> proxy: default_fallback = yes<BR> proxy: dead_time = 120<BR> proxy: post_proxy_authorize = no<BR> proxy: wake_all_if_all_dead = no<BR> security: max_attributes = 200<BR> security: reject_delay = 1<BR> security: status_server = no<BR> main: debug_level = 0<BR>read_config_files: reading dictionary<BR>read_config_files: reading naslist<BR>Using deprecated naslist file. Support for this will go away soon.<BR>read_config_files: reading clients<BR>read_config_files: reading realms<BR>radiusd: entering modules setup<BR>Module: Library
search path is /opt/freeradius/lib<BR>Module: Loaded exec <BR> exec: wait = yes<BR> exec: program = "(null)"<BR> exec: input_pairs = "request"<BR> exec: output_pairs = "(null)"<BR> exec: packet_type = "(null)"<BR>rlm_exec: Wait=yes but no output defined. Did you mean output=none?<BR>Module: Instantiated exec (exec) <BR>Module: Loaded expr <BR>Module: Instantiated expr (expr) <BR>Module: Loaded PAP <BR> pap: encryption_scheme = "crypt"<BR> pap: auto_header = yes<BR>Module: Instantiated pap (pap) <BR>Module: Loaded CHAP <BR>Module: Instantiated chap (chap) <BR>Module: Loaded MS-CHAP <BR> mschap: use_mppe = yes<BR> mschap: require_encryption = no<BR> mschap: require_strong = no<BR> mschap: with_ntdomain_hack = no<BR> mschap: passwd = "(null)"<BR> mschap: ntlm_auth = "(null)"<BR>Module: Instantiated mschap (mschap) <BR>Module: Loaded System <BR> unix: cache = no<BR> unix: passwd =
"(null)"<BR> unix: shadow = "(null)"<BR> unix: group = "(null)"<BR> unix: radwtmp = "/opt/freeradius/var/log/radius/radwtmp"<BR> unix: usegroup = no<BR> unix: cache_reload = 600<BR>Module: Instantiated unix (unix) <BR>Module: Loaded eap <BR> eap: default_eap_type = "md5"<BR> eap: timer_expire = 60<BR> eap: ignore_unknown_eap_types = no<BR> eap: cisco_accounting_username_bug = no<BR>rlm_eap: Loaded and initialized type md5<BR>rlm_eap: Loaded and initialized type leap<BR> gtc: challenge = "Password: "<BR> gtc: auth_type = "PAP"<BR>rlm_eap: Loaded and initialized type gtc<BR> mschapv2: with_ntdomain_hack = no<BR>rlm_eap: Loaded and initialized type mschapv2<BR>Module: Instantiated eap (eap) <BR>Module: Loaded preprocess <BR> preprocess: huntgroups = "/opt/freeradius/etc/raddb/huntgroups"<BR> preprocess: hints = "/opt/freeradius/etc/raddb/hints"<BR> preprocess: with_ascend_hack = no<BR> preprocess:
ascend_channels_per_line = 23<BR> preprocess: with_ntdomain_hack = no<BR> preprocess: with_specialix_jetstream_hack = no<BR> preprocess: with_cisco_vsa_hack = yes<BR> preprocess: with_alvarion_vsa_hack = no<BR>Module: Instantiated preprocess (preprocess) <BR>Module: Loaded realm <BR> realm: format = "suffix"<BR> realm: delimiter = "@"<BR> realm: ignore_default = no<BR> realm: ignore_null = no<BR>Module: Instantiated realm (suffix) <BR>Module: Loaded SQL <BR> sql: driver = "rlm_sql_postgresql"<BR> sql: server = "localhost"<BR> sql: port = ""<BR> sql: login = "postgres"<BR> sql: password = ""<BR> sql: radius_db = "radiusdb"<BR> sql: nas_table = "nas"<BR> sql: sqltrace = yes<BR> sql: sqltracefile = "/opt/freeradius/var/log/radius/sqltrace.sql"<BR> sql: readclients = yes<BR> sql: deletestalesessions = yes<BR> sql: num_sql_socks = 25<BR> sql: sql_user_name =
"%{User-Name}"<BR> sql: default_user_profile = ""<BR> sql: query_on_not_found = no<BR> sql: authorize_check_query = "SELECT id, UserName, Attribute, Value, Op ??FROM radcheck ??WHERE Username = '%{SQL-User-Name}' ??ORDER BY id"<BR> sql: authorize_reply_query = "SELECT id, UserName, Attribute, Value, Op ??FROM radreply ??WHERE Username = '%{SQL-User-Name}' ??ORDER BY id"<BR> sql: authorize_group_check_query = "SELECT radgroupcheck.id, radgroupcheck.GroupName, ??radgroupcheck.Attribute, radgroupcheck.Value,radgroupcheck.Op ??FROM radgroupcheck, usergroup ??WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName ??ORDER BY radgroupcheck.id"<BR> sql: authorize_group_reply_query = "SELECT radgroupreply.id, radgroupreply.GroupName, radgroupreply.Attribute, ??radgroupreply.Value, radgroupreply.Op ??FROM radgroupreply,usergroup ??WHERE usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName =
radgroupreply.GroupName ??ORDER BY radgroupreply.id"<BR> sql: accounting_onoff_query = "UPDATE radacct SET AcctStopTime = ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), AcctSessionTime = (EXTRACT(EPOCH FROM('%S'::timestamp with time zone - AcctStartTime::timestamp with time zone - '%{Acct-Delay-Time:-0}'::interval)))::BIGINT, AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = 0 WHERE AcctSessionTime IS NULL AND AcctStopTime IS NULL AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'::timestamp"<BR> sql: accounting_update_query = "UPDATE radacct SET FramedIPAddress =
NULLIF('%{Framed-IP-Address}', '')::inet, AcctSessionTime = (EXTRACT(EPOCH FROM('%S'::timestamp with time zone - AcctStartTime::timestamp with time zone - '%{Acct-Delay-Time:-0}'::interval)))::BIGINT, AcctInputOctets = (('%{Acct-Input-Gigawords:-0}'::bigint << 32) + '%{Acct-Input-Octets:-0}'::bigint), AcctOutputOctets = (('%{Acct-Output-Gigawords:-0}'::bigint << 32) + '%{Acct-Output-Octets:-0}'::bigint) WHERE AcctSessionId =
'%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStopTime IS NULL"<BR> sql: accounting_update_query_alt = "INSERT into radacct (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctSessionTime, AcctAuthentic, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ??ServiceType, FramedProtocol, FramedIPAddress, XAscendSessionSvrKey) ??values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', ??'%{NAS-Port}', '%{NAS-Port-Type}', ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval - '%{Acct-Session-Time:-0}'::interval), ??'%{Acct-Session-Time}', '%{Acct-Authentic}', ??(('%{Acct-Input-Gigawords:-0}'::bigint << 32) +
'%{Acct-Input-Octets:-0}'::bigint), ??(('%{Acct-Output-Gigawords:-0}'::bigint << 32) + '%{Acct-Output-Octets:-0}'::bigint), '%{Called-Station-Id}', ??'%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', ??NULLIF('%{Framed-IP-Address}', '')::inet, '%{X-Ascend-Session-Svr-Key}')"<BR> sql: accounting_start_query = "INSERT into radacct ??(AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctAuthentic, ??ConnectInfo_start, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, XAscendSessionSvrKey) ??values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', ??'%{NAS-Port}', '%{NAS-Port-Type}', ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), '%{Acct-Authentic}', '%{Connect-Info}', ??'%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', ??NULLIF('%{Framed-IP-Address}',
'')::inet, 0, '%{X-Ascend-Session-Svr-Key}')"<BR> sql: accounting_start_query_alt = "UPDATE radacct ??SET AcctStartTime = ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), AcctStartDelay = 0, ??ConnectInfo_start = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' ??AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime IS NULL"<BR> sql: accounting_stop_query = "UPDATE radacct ??SET AcctStopTime = ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), ??AcctSessionTime = NULLIF('%{Acct-Session-Time}', '')::bigint, ??AcctInputOctets = (('%{Acct-Input-Gigawords:-0}'::bigint << 32) + '%{Acct-Input-Octets:-0}'::bigint), ??AcctOutputOctets = (('%{Acct-Output-Gigawords:-0}'::bigint << 32) + '%{Acct-Output-Octets:-0}'::bigint), ??AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = 0, ??FramedIPAddress = NULLIF('%{Framed-IP-Address}', '')::inet, ConnectInfo_stop = '%{Connect-Info}' ??WHERE
AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' ??AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime IS NULL"<BR> sql: accounting_stop_query_alt = "INSERT into radacct ??(AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, ??AcctSessionTime, AcctAuthentic, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, ??AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStopDelay) ??values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', ??'%{NAS-Port}', '%{NAS-Port-Type}', ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval - '%{Acct-Session-Time:-0}'::interval), ??('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), NULLIF('%{Acct-Session-Time}', '')::bigint, ??'%{Acct-Authentic}', '%{Connect-Info}', ??(('%{Acct-Input-Gigawords:-0}'::bigint << 32) +
'%{Acct-Input-Octets:-0}'::bigint), ??(('%{Acct-Output-Gigawords:-0}'::bigint << 32) + '%{Acct-Output-Octets:-0}'::bigint), '%{Called-Station-Id}', ??'%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', ??NULLIF('%{Framed-IP-Address}', '')::inet, 0)"<BR> sql: group_membership_query = "SELECT GroupName FROM usergroup WHERE UserName='%{SQL-User-Name}'"<BR> sql: connect_failure_retry_delay = 60<BR> sql: simul_count_query = ""<BR> sql: simul_verify_query = ""<BR> sql: postauth_query = "INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ('%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())"<BR> sql: safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"<BR>rlm_sql (sql): Driver rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked<BR>rlm_sql (sql): Attempting to connect to <A
href="mailto:postgres@localhost:/radiusdb">postgres@localhost:/radiusdb</A><BR>rlm_sql (sql): starting 0<BR>rlm_sql (sql): Attempting to connect rlm_sql_postgresql #0<BR>rlm_sql_postgresql: Couldn't connect socket to PostgreSQL server <A href="mailto:postgres@localhost:radiusdb">postgres@localhost:radiusdb</A><BR><STRONG>rlm_sql_postgresql: Postgresql error 'could not connect to server: Connection refused ?Is the server running on host "localhost" and accepting ?TCP/IP connections on port 5432? '<BR>rlm_sql (sql): Failed to connect DB handle #0<BR></STRONG>rlm_sql (sql): starting 1<BR>rlm_sql (sql): starting 2<BR>rlm_sql (sql): starting 3<BR>rlm_sql (sql): starting 4<BR>rlm_sql (sql): starting 5<BR>rlm_sql (sql): starting 6<BR>rlm_sql (sql): starting 7<BR>rlm_sql (sql): starting 8<BR>rlm_sql (sql): starting 9<BR>rlm_sql (sql): starting 10<BR>rlm_sql (sql): starting 11<BR>rlm_sql (sql): starting 12<BR>rlm_sql (sql): starting 13<BR>rlm_sql (sql): starting 14<BR>rlm_sql
(sql): starting 15<BR>rlm_sql (sql): starting 16<BR>rlm_sql (sql): starting 17<BR>rlm_sql (sql): starting 18<BR>rlm_sql (sql): starting 19<BR>rlm_sql (sql): starting 20<BR>rlm_sql (sql): starting 21<BR>rlm_sql (sql): starting 22<BR>rlm_sql (sql): starting 23<BR>rlm_sql (sql): starting 24<BR>rlm_sql (sql): Failed to connect to any SQL server.<BR>rlm_sql (sql): - generate_sql_clients<BR>rlm_sql (sql): Query: SELECT * FROM nas<BR>rlm_sql (sql): Ignoring unconnected handle 24..<BR>rlm_sql (sql): Ignoring unconnected handle 23..<BR>rlm_sql (sql): Ignoring unconnected handle 22..<BR>rlm_sql (sql): Ignoring unconnected handle 21..<BR>rlm_sql (sql): Ignoring unconnected handle 20..<BR>rlm_sql (sql): Ignoring unconnected handle 19..<BR>rlm_sql (sql): Ignoring unconnected handle 18..<BR>rlm_sql (sql): Ignoring unconnected handle 17..<BR>rlm_sql (sql): Ignoring unconnected handle 16..<BR>rlm_sql (sql): Ignoring unconnected handle 15..<BR>rlm_sql (sql): Ignoring unconnected handle
14..<BR>rlm_sql (sql): Ignoring unconnected handle 13..<BR>rlm_sql (sql): Ignoring unconnected handle 12..<BR>rlm_sql (sql): Ignoring unconnected handle 11..<BR>rlm_sql (sql): Ignoring unconnected handle 10..<BR>rlm_sql (sql): Ignoring unconnected handle 9..<BR>rlm_sql (sql): Ignoring unconnected handle 8..<BR>rlm_sql (sql): Ignoring unconnected handle 7..<BR>rlm_sql (sql): Ignoring unconnected handle 6..<BR>rlm_sql (sql): Ignoring unconnected handle 5..<BR>rlm_sql (sql): Ignoring unconnected handle 4..<BR>rlm_sql (sql): Ignoring unconnected handle 3..<BR>rlm_sql (sql): Ignoring unconnected handle 2..<BR>rlm_sql (sql): Ignoring unconnected handle 1..<BR>rlm_sql (sql): Ignoring unconnected handle 0..<BR>rlm_sql (sql): There are no DB handles to use! skipped 25, tried to connect 0<BR>rlm_sql (sql): generate_sql_clients() returned error<BR>rlm_sql (sql): Closing sqlsocket 24<BR>rlm_sql (sql): Closing sqlsocket 23<BR>rlm_sql (sql): Closing sqlsocket 22<BR>rlm_sql (sql):
Closing sqlsocket 21<BR>rlm_sql (sql): Closing sqlsocket 20<BR>rlm_sql (sql): Closing sqlsocket 19<BR>rlm_sql (sql): Closing sqlsocket 18<BR>rlm_sql (sql): Closing sqlsocket 17<BR>rlm_sql (sql): Closing sqlsocket 16<BR>rlm_sql (sql): Closing sqlsocket 15<BR>rlm_sql (sql): Closing sqlsocket 14<BR>rlm_sql (sql): Closing sqlsocket 13<BR>rlm_sql (sql): Closing sqlsocket 12<BR>rlm_sql (sql): Closing sqlsocket 11<BR>rlm_sql (sql): Closing sqlsocket 10<BR>rlm_sql (sql): Closing sqlsocket 9<BR>rlm_sql (sql): Closing sqlsocket 8<BR>rlm_sql (sql): Closing sqlsocket 7<BR>rlm_sql (sql): Closing sqlsocket 6<BR>rlm_sql (sql): Closing sqlsocket 5<BR>rlm_sql (sql): Closing sqlsocket 4<BR>rlm_sql (sql): Closing sqlsocket 3<BR>rlm_sql (sql): Closing sqlsocket 2<BR>rlm_sql (sql): Closing sqlsocket 1<BR>rlm_sql (sql): Closing sqlsocket 0<BR></div><p>
<hr size=1>Boardwalk for $500? In 2007? Ha! <br><a href="http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow">Play Monopoly Here and Now</a> (it's updated for today's economy) at Yahoo! Games.