Centos freeradius启动错误(代码=退出,状态=1/失败)

Centos freeradius启动错误(代码=退出,状态=1/失败),centos,mariadb,freeradius,Centos,Mariadb,Freeradius,我是新来的自由半径。我已经在centos-7上安装了freeradius,并计划使用daloradius进行管理。 安装freeradius后,它工作正常,并通过“systemctl start Radius”正常启动。 但是在安装和配置MariaDB之后,freeradius并没有启动,而“Radius-X”正在工作。 以下是错误消息: [root@radiusx1 ~]# systemctl start radiusd Warning: radiusd.service ch

我是新来的自由半径。我已经在centos-7上安装了freeradius,并计划使用daloradius进行管理。 安装freeradius后,它工作正常,并通过“systemctl start Radius”正常启动。 但是在安装和配置MariaDB之后,freeradius并没有启动,而“Radius-X”正在工作。 以下是错误消息:

     [root@radiusx1 ~]# systemctl start radiusd
    Warning: radiusd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
    Job for radiusd.service failed because the control process exited with error code. See "systemctl status radiusd.service" and "journalctl -xe" for details.


    [root@radiusx1 ~]# systemctl status radiusd
● radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-03-02 17:21:00 PKT; 10s ago
  Process: 26712 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=1/FAILURE)
  Process: 26708 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)

Mar 02 17:20:59 radiusx1.xoultech.com systemd[1]: Starting FreeRADIUS high performance RADIUS server....
Mar 02 17:21:00 radiusx1.xoultech.com systemd[1]: radiusd.service: control process exited, code=exited status=1
Mar 02 17:21:00 radiusx1.xoultech.com systemd[1]: Failed to start FreeRADIUS high performance RADIUS server..
Mar 02 17:21:00 radiusx1.xoultech.com systemd[1]: Unit radiusd.service entered failed state.
Mar 02 17:21:00 radiusx1.xoultech.com systemd[1]: radiusd.service failed.
请帮我解决这个问题。
任何帮助都将不胜感激。

这可能是权限问题
-X
以当前用户身份运行流程,而
-C
将更改为配置的用户/组

您可以使用此调用执行配置检查,并将调试信息写入标准输出

/usr/sbin/radiusd -C -lstdout -xxx
  • -C
    配置检查
  • -lstdout
    覆盖配置的日志记录目标并设置为stdout
  • -xxx
    将调试设置为3级。应该显示任何有用的输出

如果输出对您没有意义,请返回报告,我将进行解释。

这可能是权限问题
-X
以当前用户身份运行流程,而
-C
将更改为配置的用户/组

您可以使用此调用执行配置检查,并将调试信息写入标准输出

/usr/sbin/radiusd -C -lstdout -xxx
  • -C
    配置检查
  • -lstdout
    覆盖配置的日志记录目标并设置为stdout
  • -xxx
    将调试设置为3级。应该显示任何有用的输出

如果输出对您没有意义,请返回报告,我将进行解释。

在Arran的命令检查后,我匹配相同的问题,该命令将让您知道原因,但建议您在根环境下通过“radius-X”启用radius,这将为您提供根本原因,如下所示:

在用户环境下:

[cisco@frank ~]$ /usr/sbin/radiusd -C -lstdout -xxx
Wed May 17 04:47:36 2017 : Info: radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Wed May 17 04:47:36 2017 : Debug: Server was built with: 
Wed May 17 04:47:36 2017 : Debug:   accounting
Wed May 17 04:47:36 2017 : Debug:   authentication
Wed May 17 04:47:36 2017 : Debug:   ascend binary attributes
Wed May 17 04:47:36 2017 : Debug:   coa
Wed May 17 04:47:36 2017 : Debug:   control-socket
Wed May 17 04:47:36 2017 : Debug:   detail
Wed May 17 04:47:36 2017 : Debug:   dhcp
Wed May 17 04:47:36 2017 : Debug:   dynamic clients
Wed May 17 04:47:36 2017 : Debug:   proxy
Wed May 17 04:47:36 2017 : Debug:   regex-pcre
Wed May 17 04:47:36 2017 : Debug:   session-management
Wed May 17 04:47:36 2017 : Debug:   stats
Wed May 17 04:47:36 2017 : Debug:   tcp
Wed May 17 04:47:36 2017 : Debug:   threads
Wed May 17 04:47:36 2017 : Debug:   tls
Wed May 17 04:47:36 2017 : Debug:   unlang
Wed May 17 04:47:36 2017 : Debug:   vmps
Wed May 17 04:47:36 2017 : Debug: Server core libs:
Wed May 17 04:47:36 2017 : Debug:   talloc : 2.0.*
Wed May 17 04:47:36 2017 : Debug:   ssl    : OpenSSL 1.0.1e-fips 11 Feb 2013
Wed May 17 04:47:36 2017 : Info: Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
Wed May 17 04:47:36 2017 : Info: There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Wed May 17 04:47:36 2017 : Info: PARTICULAR PURPOSE
Wed May 17 04:47:36 2017 : Info: You may redistribute copies of FreeRADIUS under the terms of the
Wed May 17 04:47:36 2017 : Info: GNU General Public License
Wed May 17 04:47:36 2017 : Info: For more information about these matters, see the file named COPYRIGHT
Wed May 17 04:47:36 2017 : Info: Starting - reading configuration files ...
Wed May 17 04:47:36 2017 : Debug: including dictionary file /etc/raddb/dictionary
Wed May 17 04:47:36 2017 : Debug: including configuration file /etc/raddb/radiusd.conf
Wed May 17 04:47:36 2017 : Error: Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Wed May 17 04:47:36 2017 : Error: Errors reading or parsing /etc/raddb/radiusd.conf

[cisco@frank ~]$ radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Errors reading or parsing /etc/raddb/radiusd.conf
[root@frank ~]# radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
including configuration file /etc/raddb/proxy.conf
including configuration file /etc/raddb/clients.conf
......
 client 10.75.13.13 {
    require_message_authenticator = no
    secret = "cisco"
    shortname = "asr9006-3"
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
Failed to add duplicate client asr9006-3
/etc/raddb/clients.conf[297]: Failed to add client 10.75.13.13
在根环境下:

[cisco@frank ~]$ /usr/sbin/radiusd -C -lstdout -xxx
Wed May 17 04:47:36 2017 : Info: radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Wed May 17 04:47:36 2017 : Debug: Server was built with: 
Wed May 17 04:47:36 2017 : Debug:   accounting
Wed May 17 04:47:36 2017 : Debug:   authentication
Wed May 17 04:47:36 2017 : Debug:   ascend binary attributes
Wed May 17 04:47:36 2017 : Debug:   coa
Wed May 17 04:47:36 2017 : Debug:   control-socket
Wed May 17 04:47:36 2017 : Debug:   detail
Wed May 17 04:47:36 2017 : Debug:   dhcp
Wed May 17 04:47:36 2017 : Debug:   dynamic clients
Wed May 17 04:47:36 2017 : Debug:   proxy
Wed May 17 04:47:36 2017 : Debug:   regex-pcre
Wed May 17 04:47:36 2017 : Debug:   session-management
Wed May 17 04:47:36 2017 : Debug:   stats
Wed May 17 04:47:36 2017 : Debug:   tcp
Wed May 17 04:47:36 2017 : Debug:   threads
Wed May 17 04:47:36 2017 : Debug:   tls
Wed May 17 04:47:36 2017 : Debug:   unlang
Wed May 17 04:47:36 2017 : Debug:   vmps
Wed May 17 04:47:36 2017 : Debug: Server core libs:
Wed May 17 04:47:36 2017 : Debug:   talloc : 2.0.*
Wed May 17 04:47:36 2017 : Debug:   ssl    : OpenSSL 1.0.1e-fips 11 Feb 2013
Wed May 17 04:47:36 2017 : Info: Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
Wed May 17 04:47:36 2017 : Info: There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Wed May 17 04:47:36 2017 : Info: PARTICULAR PURPOSE
Wed May 17 04:47:36 2017 : Info: You may redistribute copies of FreeRADIUS under the terms of the
Wed May 17 04:47:36 2017 : Info: GNU General Public License
Wed May 17 04:47:36 2017 : Info: For more information about these matters, see the file named COPYRIGHT
Wed May 17 04:47:36 2017 : Info: Starting - reading configuration files ...
Wed May 17 04:47:36 2017 : Debug: including dictionary file /etc/raddb/dictionary
Wed May 17 04:47:36 2017 : Debug: including configuration file /etc/raddb/radiusd.conf
Wed May 17 04:47:36 2017 : Error: Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Wed May 17 04:47:36 2017 : Error: Errors reading or parsing /etc/raddb/radiusd.conf

[cisco@frank ~]$ radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Errors reading or parsing /etc/raddb/radiusd.conf
[root@frank ~]# radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
including configuration file /etc/raddb/proxy.conf
including configuration file /etc/raddb/clients.conf
......
 client 10.75.13.13 {
    require_message_authenticator = no
    secret = "cisco"
    shortname = "asr9006-3"
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
Failed to add duplicate client asr9006-3
/etc/raddb/clients.conf[297]: Failed to add client 10.75.13.13
根用户更正配置问题后,重新启动或重新启动,然后在用户下再次检查:

[cisco@frank ~]$ systemctl status radiusd
radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled)
   Active: active (running) since Wed 2017-05-17 05:10:15 CST; 10min ago
  Process: 2438 ExecStart=/usr/sbin/radiusd -d /etc/raddb (code=exited, status=0/SUCCESS)
  Process: 1956 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=0/SUCCESS)
  Process: 1951 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)
 Main PID: 2439 (radiusd)
   CGroup: /system.slice/radiusd.service
           └─2439 /usr/sbin/radiusd -d /etc/raddb

在Arran命令检查后,我匹配了相同的问题,该命令将让您知道原因,但建议您在根环境下通过“radius-X”启用radius,这将为您提供根本原因,如下所示:

在用户环境下:

[cisco@frank ~]$ /usr/sbin/radiusd -C -lstdout -xxx
Wed May 17 04:47:36 2017 : Info: radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Wed May 17 04:47:36 2017 : Debug: Server was built with: 
Wed May 17 04:47:36 2017 : Debug:   accounting
Wed May 17 04:47:36 2017 : Debug:   authentication
Wed May 17 04:47:36 2017 : Debug:   ascend binary attributes
Wed May 17 04:47:36 2017 : Debug:   coa
Wed May 17 04:47:36 2017 : Debug:   control-socket
Wed May 17 04:47:36 2017 : Debug:   detail
Wed May 17 04:47:36 2017 : Debug:   dhcp
Wed May 17 04:47:36 2017 : Debug:   dynamic clients
Wed May 17 04:47:36 2017 : Debug:   proxy
Wed May 17 04:47:36 2017 : Debug:   regex-pcre
Wed May 17 04:47:36 2017 : Debug:   session-management
Wed May 17 04:47:36 2017 : Debug:   stats
Wed May 17 04:47:36 2017 : Debug:   tcp
Wed May 17 04:47:36 2017 : Debug:   threads
Wed May 17 04:47:36 2017 : Debug:   tls
Wed May 17 04:47:36 2017 : Debug:   unlang
Wed May 17 04:47:36 2017 : Debug:   vmps
Wed May 17 04:47:36 2017 : Debug: Server core libs:
Wed May 17 04:47:36 2017 : Debug:   talloc : 2.0.*
Wed May 17 04:47:36 2017 : Debug:   ssl    : OpenSSL 1.0.1e-fips 11 Feb 2013
Wed May 17 04:47:36 2017 : Info: Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
Wed May 17 04:47:36 2017 : Info: There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Wed May 17 04:47:36 2017 : Info: PARTICULAR PURPOSE
Wed May 17 04:47:36 2017 : Info: You may redistribute copies of FreeRADIUS under the terms of the
Wed May 17 04:47:36 2017 : Info: GNU General Public License
Wed May 17 04:47:36 2017 : Info: For more information about these matters, see the file named COPYRIGHT
Wed May 17 04:47:36 2017 : Info: Starting - reading configuration files ...
Wed May 17 04:47:36 2017 : Debug: including dictionary file /etc/raddb/dictionary
Wed May 17 04:47:36 2017 : Debug: including configuration file /etc/raddb/radiusd.conf
Wed May 17 04:47:36 2017 : Error: Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Wed May 17 04:47:36 2017 : Error: Errors reading or parsing /etc/raddb/radiusd.conf

[cisco@frank ~]$ radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Errors reading or parsing /etc/raddb/radiusd.conf
[root@frank ~]# radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
including configuration file /etc/raddb/proxy.conf
including configuration file /etc/raddb/clients.conf
......
 client 10.75.13.13 {
    require_message_authenticator = no
    secret = "cisco"
    shortname = "asr9006-3"
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
Failed to add duplicate client asr9006-3
/etc/raddb/clients.conf[297]: Failed to add client 10.75.13.13
在根环境下:

[cisco@frank ~]$ /usr/sbin/radiusd -C -lstdout -xxx
Wed May 17 04:47:36 2017 : Info: radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Wed May 17 04:47:36 2017 : Debug: Server was built with: 
Wed May 17 04:47:36 2017 : Debug:   accounting
Wed May 17 04:47:36 2017 : Debug:   authentication
Wed May 17 04:47:36 2017 : Debug:   ascend binary attributes
Wed May 17 04:47:36 2017 : Debug:   coa
Wed May 17 04:47:36 2017 : Debug:   control-socket
Wed May 17 04:47:36 2017 : Debug:   detail
Wed May 17 04:47:36 2017 : Debug:   dhcp
Wed May 17 04:47:36 2017 : Debug:   dynamic clients
Wed May 17 04:47:36 2017 : Debug:   proxy
Wed May 17 04:47:36 2017 : Debug:   regex-pcre
Wed May 17 04:47:36 2017 : Debug:   session-management
Wed May 17 04:47:36 2017 : Debug:   stats
Wed May 17 04:47:36 2017 : Debug:   tcp
Wed May 17 04:47:36 2017 : Debug:   threads
Wed May 17 04:47:36 2017 : Debug:   tls
Wed May 17 04:47:36 2017 : Debug:   unlang
Wed May 17 04:47:36 2017 : Debug:   vmps
Wed May 17 04:47:36 2017 : Debug: Server core libs:
Wed May 17 04:47:36 2017 : Debug:   talloc : 2.0.*
Wed May 17 04:47:36 2017 : Debug:   ssl    : OpenSSL 1.0.1e-fips 11 Feb 2013
Wed May 17 04:47:36 2017 : Info: Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
Wed May 17 04:47:36 2017 : Info: There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Wed May 17 04:47:36 2017 : Info: PARTICULAR PURPOSE
Wed May 17 04:47:36 2017 : Info: You may redistribute copies of FreeRADIUS under the terms of the
Wed May 17 04:47:36 2017 : Info: GNU General Public License
Wed May 17 04:47:36 2017 : Info: For more information about these matters, see the file named COPYRIGHT
Wed May 17 04:47:36 2017 : Info: Starting - reading configuration files ...
Wed May 17 04:47:36 2017 : Debug: including dictionary file /etc/raddb/dictionary
Wed May 17 04:47:36 2017 : Debug: including configuration file /etc/raddb/radiusd.conf
Wed May 17 04:47:36 2017 : Error: Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Wed May 17 04:47:36 2017 : Error: Errors reading or parsing /etc/raddb/radiusd.conf

[cisco@frank ~]$ radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
Unable to open file "/etc/raddb/radiusd.conf": Permission denied
Errors reading or parsing /etc/raddb/radiusd.conf
[root@frank ~]# radiusd -X
radiusd: FreeRADIUS Version 3.0.1, for host x86_64-redhat-linux-gnu, built on Mar  5 2014 at 05:31:12
Copyright (C) 1999-2014 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /etc/raddb/dictionary
including configuration file /etc/raddb/radiusd.conf
including configuration file /etc/raddb/proxy.conf
including configuration file /etc/raddb/clients.conf
......
 client 10.75.13.13 {
    require_message_authenticator = no
    secret = "cisco"
    shortname = "asr9006-3"
  limit {
    max_connections = 16
    lifetime = 0
    idle_timeout = 30
  }
 }
Failed to add duplicate client asr9006-3
/etc/raddb/clients.conf[297]: Failed to add client 10.75.13.13
根用户更正配置问题后,重新启动或重新启动,然后在用户下再次检查:

[cisco@frank ~]$ systemctl status radiusd
radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled)
   Active: active (running) since Wed 2017-05-17 05:10:15 CST; 10min ago
  Process: 2438 ExecStart=/usr/sbin/radiusd -d /etc/raddb (code=exited, status=0/SUCCESS)
  Process: 1956 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=0/SUCCESS)
  Process: 1951 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)
 Main PID: 2439 (radiusd)
   CGroup: /system.slice/radiusd.service
           └─2439 /usr/sbin/radiusd -d /etc/raddb