VPN管理系统freeradius奇怪问题

2013-04-25 17:33:41 +08:00
 foru17
这几天在给新买的linode部署服务器,弄了VPN(pptp+L2TP),为了方便管理,弄了FreeRADIUS+daloRADIUS.

目前的状况是
1.VPN:PPTP和L2TP均正常
2.设置了一个二级域名做为daloRADIUS web管理页面
已经可以登录并且可以添加新用户,添加新user后,在数据库(Mysql)的userinfo也有显示
3.但是bug就是
调用radiusd -X 始终无法运行,提示的是

rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
rlm_sql (sql): Attempting to connect to radius@localhost:/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
rlm_sql_mysql: Starting connect to MySQL server for #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql (sql): starting 1
rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
rlm_sql_mysql: Starting connect to MySQL server for #1
rlm_sql (sql): Connected new DB handle, #1
rlm_sql (sql): starting 2
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
rlm_sql_mysql: Starting connect to MySQL server for #2
rlm_sql (sql): Connected new DB handle, #2
rlm_sql (sql): starting 3
rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
rlm_sql_mysql: Starting connect to MySQL server for #3
rlm_sql (sql): Connected new DB handle, #3
rlm_sql (sql): starting 4
rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
rlm_sql_mysql: Starting connect to MySQL server for #4
rlm_sql (sql): Connected new DB handle, #4
rlm_sql (sql): Processing generate_sql_clients
rlm_sql (sql) in generate_sql_clients: query is SELECT id, nasname, shortname, type, secret, server FROM nas
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql_mysql: MYSQL check_error: 1054 received
rlm_sql (sql): database query error, SELECT id, nasname, shortname, type, secret, server FROM nas: Unknown column 'server' in 'field list'
rlm_sql (sql): Released sql socket id: 4
Failed to load clients from SQL.
rlm_sql (sql): Closing sqlsocket 4
rlm_sql (sql): Closing sqlsocket 3
rlm_sql (sql): Closing sqlsocket 2
rlm_sql (sql): Closing sqlsocket 1
rlm_sql (sql): Closing sqlsocket 0
/etc/raddb/sql.conf[22]: Instantiation failed for module "sql"
/etc/raddb/sites-enabled/default[177]: Failed to load module "sql".
/etc/raddb/sites-enabled/default[69]: Errors parsing authorize section.

意思就是sql的模块没有加载,本来这个是可以在/etc/raddb/radiusd.conf通过
取消注释 $INCLUDE sql.conf 可以修正,可是现在时已经修正了,依旧显示这个问题。
服务器reboot也试过了还是显示这个问题。
现在真的是郁闷了找不到是哪里的问题了,搜索相关关键字,英文中文资料都翻遍了,大概就是这几个方案
1.取消注释 $INCLUDE sql.conf (排除)
2.重新编译Mysql (我是通过yum安装,后来又重新yum安装了freeradiusmysql

求各位朋友提点一下。
5273 次点击
所在节点    问与答
7 条回复
sNullp
2013-04-25 18:03:41 +08:00
MYSQL check_error: 1054 received
rlm_sql (sql): database query error, SELECT id, nasname, shortname, type, secret, server FROM nas: Unknown column 'server' in 'field list'
sNullp
2013-04-25 18:04:05 +08:00
跟sql模块没关系,是你的数据库结构被破坏了
foru17
2013-04-25 18:05:14 +08:00
@sNullp 厄,这点倒没有看到,那这个可能是什么原因造成的呢?
jiangle
2013-04-25 18:20:11 +08:00
用navicat 或phpmyadmin 修复试试?
feilaoda
2013-04-25 18:26:41 +08:00
Server字段不存在
foru17
2013-04-25 18:50:31 +08:00
@sNullp
@feilaoda
多谢,刚刚手动在数据库的nas里添加一个server字段就搞定了(这个server字段无实际作用),算是有点蛋疼的bug。
sNullp
2013-04-25 18:57:59 +08:00
@foru17 这就是为什么我一般不用daloRADIUS的原因。。数据难免会不一致的。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/66969

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX