FreeRadius - Failed binding to authentication address

53.4k Views Asked by At

When I run the following command, I can get successfull result.

root@ubuntu:/home/can# radtest user password 127.0.0.1 1812 testing123

Sending Access-Request of id 78 to 127.0.0.1 port 1812

User-Name = "user"
User-Password = "password"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
Message-Authenticator = 0x00000000000000000000000000000000

rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=78, length=20


However When I run the "freeradius -X" , I get error message as following :

.....

Failed binding to authentication address * port 1812: Address already in use /etc/freeradius/radiusd.conf[250]: Error binding to port for 0.0.0.0 port 1812

Please Help Me

Thank you for your efforts.

Can

5

There are 5 best solutions below

0
On

Run 'service freeradius restart' and 'service freeradius stop' commands Then run the command,'freeradius -X' you will not face binding issue anymore.

0
On

Even having finished the service, there were pending zombie process. Searching for a zumbi process I´ve found one:

[root@localhost sites-enabled]# ps aux | grep radi
radiusd   25042  0.0  0.7 186360 14980 ?        Ssl  Fev17   0:00 /usr/sbin/radiusd -d /etc/raddb

[root@localhost sites-enabled]# kill -9 25042

Service was start sucessfully after this.

0
On

Basically the port freeradius is looking to use is already in use by another background running instance of freeradius. Ending the first instance of freeradius will allow you to use that same port for the newly run instance.

1
On

radiusd is already running. sudo service freeradius stop will stop it, and allow freeradius -X to bind to the address/port that was previously used by the RADIUS daemon.

0
On

In my case it was loading two configuration files declaring the same listen. The error looked strange because there was nothing else listening on that port.