Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1126725

Summary: radiusd silently fails when start_servers is higher than max_servers
Product: Red Hat Enterprise Linux 7 Reporter: David Spurek <dspurek>
Component: freeradiusAssignee: Nikolai Kondrashov <nikolai.kondrashov>
Status: CLOSED ERRATA QA Contact: Eduard Benes <ebenes>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.0CC: dpal, ebenes, pkis
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freeradius-3.0.4-0.1.rc2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1146828 (view as bug list) Environment:
Last Closed: 2015-03-05 10:20:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1120234    
Bug Blocks: 1146828    

Description David Spurek 2014-08-05 07:22:48 UTC
Description of problem:
radiusd silently fails when start_servers is higher than max_servers

systemctl status radiusd.service -l
radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; disabled)
   Active: failed (Result: exit-code) since Tue 2014-08-05 09:12:31 CEST; 3min 34s ago
  Process: 29218 ExecStart=/usr/sbin/radiusd -d /etc/raddb (code=exited, status=1/FAILURE)
  Process: 29215 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=0/SUCCESS)
  Process: 29213 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)

Aug 05 09:12:31 x86-64-v02.lab.eng.brq.redhat.com systemd[1]: radiusd.service: control process exited, code=exited status=1
Aug 05 09:12:31 x86-64-v02.lab.eng.brq.redhat.com systemd[1]: Failed to start FreeRADIUS high performance RADIUS server..
Aug 05 09:12:31 x86-64-v02.lab.eng.brq.redhat.com systemd[1]: Unit radiusd.service entered failed state.


/var/log/radius/radius.log doesn't contain useful information, it ends with:
....
Tue Aug  5 09:16:49 2014 : Info: Loaded virtual server <default>
Tue Aug  5 09:16:49 2014 : Info: Loaded virtual server default
Tue Aug  5 09:16:49 2014 : Info: Loaded virtual server inner-tunnel


If I increase debug level, it doesn't help (add 'debug_level = 2' at the end of radiusd.conf.

/var/log/radius/radius.log contains only following log
...
} # server inner-tunnel
 thread pool {
        start_servers = 6
        max_servers = 4
        min_spare_servers = 3
        max_spare_servers = 10
        max_requests_per_server = 0
        cleanup_delay = 5
        max_queue_size = 65536
        auto_limit_acct = no
 }
Thread spawned new child 1. Total threads in pool: 1
Thread 1 waiting to be assigned a request
Thread spawned new child 2. Total threads in pool: 2
Thread 2 waiting to be assigned a request
Thread spawned new child 3. Total threads in pool: 3
Thread 3 waiting to be assigned a request
Thread spawned new child 4. Total threads in pool: 4
Thread spawn failed.  Maximum number of threads (4) already running.
Thread 4 waiting to be assigned a request


Version-Release number of selected component (if applicable):
freeradius-3.0.1-6.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
radiusd fails but we don't know the reason

Expected results:
systemctl status radiusd.service or at least /var/log/radius/radius.log contain the reason of the fail

Additional info:

Comment 1 David Spurek 2014-08-05 07:29:05 UTC
If I run 'radiusd -X' then server is started, this is strange. 
Should it fail too?
Are checks processed differently when I run 'radiusd -X' or 'service radiusd start'?

Comment 2 Nikolai Kondrashov 2014-08-06 13:15:25 UTC
"radiusd -X" starts successfully, because it doesn't attempt to start any threads, by design, to make debugging easier.

A check for start_servers < max_servers was added in a commit included into v3.0.2 release: https://github.com/FreeRADIUS/freeradius-server/commit/f12f98d98365bc23a96ef1fe643d19cb28837827

Comment 3 Nikolai Kondrashov 2014-08-06 13:18:08 UTC
It should say "start_servers <= max_servers" in Comment #2, of course.

Comment 10 errata-xmlrpc 2015-03-05 10:20:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0438.html