ошибка запуска freeradius (код=выход, статус=1/FAILURE)

Я новичок в фрирадиусе. Я установил freeradius на centos-7 и планировал управлять им с помощью daloradius. После установки freeradius он работал нормально и нормально запускался с помощью «systemctl start radiusd». но после установки и настройки MariaDB не запускается freeradius при работе с "radiusd -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.

Пожалуйста, помогите мне разобраться в этом вопросе. Любая помощь будет оценена.


person Farasat Ali    schedule 01.03.2017    source источник


Ответы (2)


Вероятно, это проблема с разрешениями. -X запускает процесс как текущий пользователь, тогда как -C изменится на настроенного пользователя/группу.

Вы можете использовать этот вызов для проверки конфигурации с записью отладочной информации в стандартный вывод.

/usr/sbin/radiusd -C -lstdout -xxx
  • -C проверка конфигурации
  • -lstdout переопределяет настроенное место назначения ведения журнала и устанавливается на стандартный вывод.
  • -xxx установить отладку на уровень 3. Должен показывать любой полезный вывод.

Сообщите о выводе, если он не имеет для вас смысла, и я буду интерпретировать.

person Arran Cudbard-Bell    schedule 01.03.2017

Я совпадаю с той же проблемой после проверки командой Аррана, которая сообщит вам причину, но предложит вам включить радиус с помощью «радиуса -X» в корневой среде, что даст вам основную причину, как следует из моей проблемы:

В пользовательской среде:

[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

После исправления конфигурации от root, затем перезапустите или перезагрузите компьютер, затем снова проверьте под пользователем:

[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
person frank    schedule 16.05.2017