Hello. I cannot connect freeradius with postgres in openwrt system. Please help me with this issue. Debug log: Sun Feb 15 18:23:12 2015 : Info: radiusd: FreeRADIUS Version 2.2.5, for host mips-openwrt-linux-gnu, built on Jan 9 2015 at 20:34:50 Sun Feb 15 18:23:12 2015 : Debug: Server was built with: Sun Feb 15 18:23:12 2015 : Debug: accounting Sun Feb 15 18:23:12 2015 : Debug: authentication Sun Feb 15 18:23:12 2015 : Debug: WITH_DHCP Sun Feb 15 18:23:12 2015 : Debug: WITH_VMPS Sun Feb 15 18:23:12 2015 : Debug: Server core libs: Sun Feb 15 18:23:12 2015 : Debug: ssl: OpenSSL 1.0.1k 8 Jan 2015 Sun Feb 15 18:23:12 2015 : Info: Copyright (C) 1999-2013 The FreeRADIUS server project and contributors. Sun Feb 15 18:23:12 2015 : Info: There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A Sun Feb 15 18:23:12 2015 : Info: PARTICULAR PURPOSE. Sun Feb 15 18:23:12 2015 : Info: You may redistribute copies of FreeRADIUS under the terms of the Sun Feb 15 18:23:12 2015 : Info: GNU General Public License. Sun Feb 15 18:23:12 2015 : Info: For more information about these matters, see the file named COPYRIGHT. Sun Feb 15 18:23:12 2015 : Info: Starting - reading configuration files ... Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/radiusd.conf Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/clients.conf Sun Feb 15 18:23:12 2015 : Debug: including files in directory /etc/freeradius2/modules/ Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/always Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/attr_filter Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/attr_rewrite Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/chap Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/detail Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/mschap Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/exec Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/echo Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/expiration Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/expr Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/files Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/logintime Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/pap Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/passwd Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/preprocess Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/radutmp Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/sradutmp Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/inner-eap Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/modules/realm Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/eap.conf Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/sql.conf Sun Feb 15 18:23:12 2015 : Debug: including configuration file /etc/freeradius2/sql/postgresql/dialup.conf Sun Feb 15 18:23:12 2015 : Debug: WARNING: No such configuration item nas_table Sun Feb 15 18:23:12 2015 : Error: /etc/freeradius2/sql/postgresql/dialup.conf[66]: Reference "SELECT id, nasname, shortname, type, secret, server FROM ${nas_table}" not found Sun Feb 15 18:23:12 2015 : Error: Errors reading or parsing /etc/freeradius2/radiusd.conf dialup.conf file is the copy of https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/raddb/sql/postgr... sql.conf: sql { database = 'postgresql' driver = "rlm_sql_${database}" server = "localhost" login = "freeradius" password = "password" radius_db = "radius" $INCLUDE sql/${database}/dialup.conf } postgresql is installed and running, database exists, all tables from schema.sql are imported Installed packages: opkg list-installed | grep freeradius freeradius2 - 2.2.5-2 freeradius2-common - 2.2.5-2 freeradius2-mod-always - 2.2.5-2 freeradius2-mod-attr-filter - 2.2.5-2 freeradius2-mod-attr-rewrite - 2.2.5-2 freeradius2-mod-chap - 2.2.5-2 freeradius2-mod-detail - 2.2.5-2 freeradius2-mod-eap - 2.2.5-2 freeradius2-mod-eap-gtc - 2.2.5-2 freeradius2-mod-eap-md5 - 2.2.5-2 freeradius2-mod-eap-mschapv2 - 2.2.5-2 freeradius2-mod-eap-peap - 2.2.5-2 freeradius2-mod-eap-tls - 2.2.5-2 freeradius2-mod-eap-ttls - 2.2.5-2 freeradius2-mod-exec - 2.2.5-2 freeradius2-mod-expiration - 2.2.5-2 freeradius2-mod-expr - 2.2.5-2 freeradius2-mod-files - 2.2.5-2 freeradius2-mod-logintime - 2.2.5-2 freeradius2-mod-mschap - 2.2.5-2 freeradius2-mod-pap - 2.2.5-2 freeradius2-mod-passwd - 2.2.5-2 freeradius2-mod-preprocess - 2.2.5-2 freeradius2-mod-radutmp - 2.2.5-2 freeradius2-mod-realm - 2.2.5-2 freeradius2-mod-sql - 2.2.5-2 freeradius2-mod-sql-pgsql - 2.2.5-2 freeradius2-mod-sql-sqlite - 2.2.5-2 freeradius2-mod-sqlcounter - 2.2.5-2 freeradius2-mod-sqllog - 2.2.5-2 freeradius2-utils - 2.2.5-2 OpenWrt 14.07, r42625 Nikita.
On Feb 16, 2015, at 3:26 AM, qnick@qnick.ru wrote:
I cannot connect freeradius with postgres in openwrt system. Please help me with this issue.
You’ve edited the configuration and broken it. Don’t do that.
dialup.conf file is the copy of https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/raddb/sql/postgr...
That’s nice. You broke sql.conf.
sql.conf: sql { database = 'postgresql'
driver = "rlm_sql_${database}" server = "localhost" login = "freeradius" password = "password" radius_db = "radius" $INCLUDE sql/${database}/dialup.conf }
Add “nas_table” back to that entry. It’s in the default sql.conf file. Did you try reading that? Alan DeKok.
Thank you, now it works =) 16.02.2015, 17:03, "Alan DeKok" <aland@deployingradius.com>:
On Feb 16, 2015, at 3:26 AM, qnick@qnick.ru wrote:
I cannot connect freeradius with postgres in openwrt system. Please help me with this issue.
You’ve edited the configuration and broken it. Don’t do that.
dialup.conf file is the copy of https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/raddb/sql/postgr...
That’s nice. You broke sql.conf.
sql.conf: sql { database = 'postgresql'
driver = "rlm_sql_${database}" server = "localhost" login = "freeradius" password = "password" radius_db = "radius" $INCLUDE sql/${database}/dialup.conf }
Add “nas_table” back to that entry. It’s in the default sql.conf file. Did you try reading that?
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
qnick@qnick.ru