Duplicate virtual server "xxx" always hits on HUP
Bjørn Mork
bjorn at mork.no
Thu Jun 30 15:00:09 CEST 2011
Bjørn Mork <bjorn at mork.no> writes:
> After upgrading to 2.1.11 I've noticed that I always get a
> "Duplicate virtual server" error when HUPing the server. This is
> obviously a result of the change in commit 5a710e98 but I have no idea
> how to fix it.
>
> Steps to recreate from a fresh and default FreeRADIUS 2.1.11
> installation:
>
> 1) start the server with default configuration
> 2) kill -HUP <pid>
>
>
> The server will complain about one of the virtual servers being a
> duplicate, listing the exact same config line for both defintions:
>
> Duplicate virtual server "inner-tunnel" in file /usr/local/tmp/fr-20110630/usr/local/etc/raddb/sites-enabled/inner-tunnel:11 and file /usr/local/tmp/fr-20110630/usr/local/etc/raddb/sites-enabled/inner-tunnel:11
>
>
> This will always be the "inner-tunnel" virtual server with the default
> configuration. I guess that's a result of the name hashing.
Well, the reason is quite obvious when we look at hup_mainconfig() in
src/main/mainconfig.c:
/*
* Load new servers BEFORE freeing old ones.
*/
virtual_servers_load(cs);
virtual_servers_free(cc->created - mainconfig.max_request_time * 4);
Which implies that commit 5a710e98 is completely bogus. We cannot check
for existing servers that way. It would be possible to eliminate those
with matching file names and line numbers, but that would still fail for
no good reason if you modified the virtual server configuration and
HUPed the server.
Bjørn
More information about the Freeradius-Users
mailing list