V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
foru17
V2EX  ›  问与答

VPN管理系统freeradius奇怪问题

  •  
  •   foru17 · 2013-04-25 17:33:41 +08:00 · 5250 次点击
    这是一个创建于 4229 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这几天在给新买的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

    求各位朋友提点一下。
    7 条回复    1970-01-01 08:00:00 +08:00
    sNullp
        1
    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
        2
    sNullp  
       2013-04-25 18:04:05 +08:00
    跟sql模块没关系,是你的数据库结构被破坏了
    foru17
        3
    foru17  
    OP
       2013-04-25 18:05:14 +08:00
    @sNullp 厄,这点倒没有看到,那这个可能是什么原因造成的呢?
    jiangle
        4
    jiangle  
       2013-04-25 18:20:11 +08:00
    用navicat 或phpmyadmin 修复试试?
    feilaoda
        5
    feilaoda  
       2013-04-25 18:26:41 +08:00 via Android
    Server字段不存在
    foru17
        6
    foru17  
    OP
       2013-04-25 18:50:31 +08:00   ❤️ 1
    @sNullp
    @feilaoda
    多谢,刚刚手动在数据库的nas里添加一个server字段就搞定了(这个server字段无实际作用),算是有点蛋疼的bug。
    sNullp
        7
    sNullp  
       2013-04-25 18:57:59 +08:00
    @foru17 这就是为什么我一般不用daloRADIUS的原因。。数据难免会不一致的。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2531 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 01:36 · PVG 09:36 · LAX 17:36 · JFK 20:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.