Farasat Ali
Farasat Ali

Reputation: 21

freeradius startup error (code=exited, status=1/FAILURE)

I am new to freeradius. I have installed freeradius on centos-7 and planned to manage it using daloradius. After installing freeradius it was working fine and started normally by "systemctl start radiusd". but after installing and configuring MariaDB, freeradius is not starting while working with "radiusd -X" is working. following is the error message:

     [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.

Please help me to sort out this issue. Any help will be appreciated.

Upvotes: 2

Views: 47296

Answers (2)

frank
frank

Reputation: 53

I match same issue, after check by Arran's command that will let you know reason, but suggest you to enable radius by "radius -X" under root environment, that will give you root cause, as follow my issue:

Under user environment:

[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

Under root environment:

[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

After correct config issue by root, then restart or reboot, then check again under user:

[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

Upvotes: 0

Arran Cudbard-Bell
Arran Cudbard-Bell

Reputation: 6065

That's likely a permissions issue. -X runs the process as the current user, whereas -C will change to the configured user/group.

You can use this invocation to perform a config check with debugging info written to stdout.

/usr/sbin/radiusd -C -lstdout -xxx
  • -C config check
  • -lstdout override configured logging destination and set to stdout.
  • -xxx set debugging to level 3. Should show any useful output.

Report back with the output if it doesn't make sense to you, and i'll interpret.

Upvotes: 6

Related Questions