Discussion:
Failed binding to authentication address
Federico Olivieri
2015-11-26 15:22:55 UTC
Permalink
Hi All,

I know that this topics has been discussed many times but all
solution/answers found on the mailing list didn't work for me (sure that is
my fault!)

When I stop the service and I run freeradius -xxx the message is:

Thu Nov 26 15:14:25 2015 : Info: ... adding new socket proxy address *
port 47256
Thu Nov 26 15:14:25 2015 : Debug: Listening on authentication address *
port 1812
Thu Nov 26 15:14:25 2015 : Debug: Listening on accounting address * port
1813
Thu Nov 26 15:14:25 2015 : Debug: Listening on authentication address
127.0.0.1 port 18120 as server inner-tunnel
Thu Nov 26 15:14:25 2015 : Debug: Listening on proxy address * port 1814
Thu Nov 26 15:14:25 2015 : Info: Ready to process requests.

then, I start radius and when I try to do radtest I get this error:

***@raspberrypi:~# /etc/init.d/freeradius start
[ ok ] Starting FreeRADIUS daemon: freeradius.
***@raspberrypi:~# radtest "John Doe" hello 127.0.0.1 0 testing123
Sending Access-Request of id 126 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=126,
length=20

Looking into a second debug I can see:

Thu Nov 26 15:15:06 2015 : Debug: radiusd: #### Opening IP addresses and
Ports ####
Thu Nov 26 15:15:06 2015 : Debug: listen {
Thu Nov 26 15:15:06 2015 : Debug: type = "auth"
Thu Nov 26 15:15:06 2015 : Debug: ipaddr = *
Thu Nov 26 15:15:06 2015 : Debug: port = 0
Thu Nov 26 15:15:06 2015 : Error: Failed binding to authentication address
* port 1812: Address already in use
Thu Nov 26 15:15:06 2015 : Error: /etc/freeradius/radiusd.conf[240]: Error
binding to port for 0.0.0.0 port 1812

What I'm doing wrong? For me is normal that the port is 1812 is busy
because freeradius is using it!

Thanks!
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/l
Arran Cudbard-Bell
2015-11-26 15:26:30 UTC
Permalink
Post by Federico Olivieri
What I'm doing wrong? For me is normal that the port is 1812 is busy
because freeradius is using it!
You've got another instance of freeradius running.

Check with

ps aux | grep radiusd

Arran Cudbard-Bell <***@freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Alan DeKok
2015-11-26 15:27:12 UTC
Permalink
Post by Federico Olivieri
...
Thu Nov 26 15:14:25 2015 : Info: Ready to process requests.
Yes... the point of testing is to KEEP running it in debugging mode.
Post by Federico Olivieri
then, I start radius
Why?
Post by Federico Olivieri
...
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=126,
length=20
That's a reject. If the server was still running in debugging mode, you would see WHY it was rejecting the user.
Post by Federico Olivieri
...
Thu Nov 26 15:15:06 2015 : Error: Failed binding to authentication address
* port 1812: Address already in use
Thu Nov 26 15:15:06 2015 : Error: /etc/freeradius/radiusd.conf[240]: Error
binding to port for 0.0.0.0 port 1812
Because you started the server in daemon mode.
Post by Federico Olivieri
What I'm doing wrong? For me is normal that the port is 1812 is busy
because freeradius is using it!
Yes.

Can you point me to the documentation which suggests doing what you did?

*None* of the documentation says that. It *all* says "start th server in debug mode, and then use radclient to send it packets".

I have no idea why you think it's important to start it in debug mode, stop it, start it in daemon mode, and then try a second debug mode.

Alan DeKok.


-
List info/subscribe/unsubscribe? See
Federico Olivieri
2015-11-26 15:33:26 UTC
Permalink
Hi, thanks for your reply

That is the link

http://www.binaryheartbeat.net/2013/12/raspberry-pi-based-freeradius-server.html

I have just re-booted the server and that is the result

***@raspberrypi:~# radtest "John Doe" hello 127.0.0.1 0 testing123
Sending Access-Request of id 78 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=78,
length=20

***@raspberrypi:~# ps aux | grep radiusd
root 3531 0.0 0.4 3548 1796 pts/2 S+ 15:30 0:00 grep
radiusd

Same error

Thu Nov 26 15:32:34 2015 : Error: Failed binding to authentication address
* port 1812: Address already in use
Thu Nov 26 15:32:34 2015 : Error: /etc/freeradius/radiusd.conf[240]: Error
binding to port for 0.0.0.0 port 1812

I don't understand where this second freeradius istance comes frome
Post by Alan DeKok
Post by Federico Olivieri
...
Thu Nov 26 15:14:25 2015 : Info: Ready to process requests.
Yes... the point of testing is to KEEP running it in debugging mode.
Post by Federico Olivieri
then, I start radius
Why?
Post by Federico Olivieri
...
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=126,
length=20
That's a reject. If the server was still running in debugging mode, you
would see WHY it was rejecting the user.
Post by Federico Olivieri
...
Thu Nov 26 15:15:06 2015 : Error: Failed binding to authentication
address
Post by Federico Olivieri
* port 1812: Address already in use
Error
Post by Federico Olivieri
binding to port for 0.0.0.0 port 1812
Because you started the server in daemon mode.
Post by Federico Olivieri
What I'm doing wrong? For me is normal that the port is 1812 is busy
because freeradius is using it!
Yes.
Can you point me to the documentation which suggests doing what you did?
*None* of the documentation says that. It *all* says "start th server
in debug mode, and then use radclient to send it packets".
I have no idea why you think it's important to start it in debug mode,
stop it, start it in daemon mode, and then try a second debug mode.
Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradiu
Arran Cudbard-Bell
2015-11-26 15:35:53 UTC
Permalink
Post by Federico Olivieri
Hi, thanks for your reply
That is the link
http://www.binaryheartbeat.net/2013/12/raspberry-pi-based-freeradius-server.html
I have just re-booted the server and that is the result
Sending Access-Request of id 78 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=78,
length=20
root 3531 0.0 0.4 3548 1796 pts/2 S+ 15:30 0:00 grep
radiusd
Of course, it's raspbian so that would be

ps aux | grep freeradius

sudo /etc/init.d/freeradius stop

Arran Cudbard-Bell <***@freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Alan DeKok
2015-11-26 15:35:54 UTC
Permalink
Post by Federico Olivieri
That is the link
http://www.binaryheartbeat.net/2013/12/raspberry-pi-based-freeradius-server.html
Why are you following some crappy third-party documentation? The server comes with *tons* of documentation. The web site has tons of documentation.

Follow the *correct* documentation.
Post by Federico Olivieri
I have just re-booted the server
You don't need to do that.
Post by Federico Olivieri
and that is the result
Sending Access-Request of id 78 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=78,
length=20
root 3531 0.0 0.4 3548 1796 pts/2 S+ 15:30 0:00 grep
radius
It's probably called "freeradius"
Post by Federico Olivieri
Same error
Thu Nov 26 15:32:34 2015 : Error: Failed binding to authentication address
* port 1812: Address already in use
Thu Nov 26 15:32:34 2015 : Error: /etc/freeradius/radiusd.conf[240]: Error
binding to port for 0.0.0.0 port 1812
Stop the existing FreeRADIUS. See your OS documentation for how to do this.

Then, run it in debugging mode.

Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/l
Federico Olivieri
2015-11-26 15:45:13 UTC
Permalink
That is what I have done (that is the same before)

***@raspberrypi:~# /etc/init.d/freeradius stop
[ ok ] Stopping FreeRADIUS daemon: freeradius.

***@raspberrypi:~# ps aux | grep freeradius
root 4523 0.0 0.4 3548 1828 pts/2 S+ 15:42 0:00 grep
freeradius

Thu Nov 26 15:42:00 2015 : Info: ... adding new socket proxy address *
port 47236
Thu Nov 26 15:42:00 2015 : Debug: Listening on authentication address *
port 1812
Thu Nov 26 15:42:00 2015 : Debug: Listening on accounting address * port
1813
Thu Nov 26 15:42:00 2015 : Debug: Listening on authentication address
127.0.0.1 port 18120 as server inner-tunnel
Thu Nov 26 15:42:00 2015 : Debug: Listening on proxy address * port 1814
Thu Nov 26 15:42:00 2015 : Info: Ready to process requests.

Then

***@raspberrypi:~# /etc/init.d/freeradius start
[ ok ] Starting FreeRADIUS daemon: freeradius.
***@raspberrypi:~# ps aux | grep freeradius
freerad 4532 1.5 1.3 54088 6172 ? Ssl 15:42 0:00
/usr/sbin/freeradius
root 4556 0.0 0.3 3548 1596 pts/2 S+ 15:42 0:00 grep
freeradius

Still the same problem

rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=199,
length=20

I really appreciate your time and your e-mail but I don't think is matter
of which guide I used. If you spotted something wrong in the procedure,
just let me know and I'll be happy to fix it!

Anyway, here the problem is that freeradius says that there is another
instance running but the output does not show anything

Can you help me with that?
Post by Federico Olivieri
Post by Federico Olivieri
That is the link
http://www.binaryheartbeat.net/2013/12/raspberry-pi-based-freeradius-server.html
Why are you following some crappy third-party documentation? The server
comes with *tons* of documentation. The web site has tons of documentation.
Follow the *correct* documentation.
Post by Federico Olivieri
I have just re-booted the server
You don't need to do that.
Post by Federico Olivieri
and that is the result
Sending Access-Request of id 78 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=78,
length=20
root 3531 0.0 0.4 3548 1796 pts/2 S+ 15:30 0:00 grep
radius
It's probably called "freeradius"
Post by Federico Olivieri
Same error
Thu Nov 26 15:32:34 2015 : Error: Failed binding to authentication
address
Post by Federico Olivieri
* port 1812: Address already in use
Error
Post by Federico Olivieri
binding to port for 0.0.0.0 port 1812
Stop the existing FreeRADIUS. See your OS documentation for how to do this.
Then, run it in debugging mode.
Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.fre
Alan DeKok
2015-11-26 15:48:54 UTC
Permalink
Post by Federico Olivieri
That is what I have done (that is the same before)
[ ok ] Stopping FreeRADIUS daemon: freeradius.
That's good.
Post by Federico Olivieri
root 4523 0.0 0.4 3548 1828 pts/2 S+ 15:42 0:00 grep
freeradius
That's good.
Post by Federico Olivieri
Thu Nov 26 15:42:00 2015 : Info: ... adding new socket proxy address *
port 47236
Thu Nov 26 15:42:00 2015 : Debug: Listening on authentication address *
port 1812
Thu Nov 26 15:42:00 2015 : Debug: Listening on accounting address * port
1813
Thu Nov 26 15:42:00 2015 : Debug: Listening on authentication address
127.0.0.1 port 18120 as server inner-tunnel
Thu Nov 26 15:42:00 2015 : Debug: Listening on proxy address * port 1814
Thu Nov 26 15:42:00 2015 : Info: Ready to process requests.
That's good.
Post by Federico Olivieri
Then
That's bad.

You're either a troll, or someone who refuses to follow instructions.
Post by Federico Olivieri
[ ok ] Starting FreeRADIUS daemon: freeradius.
freerad 4532 1.5 1.3 54088 6172 ? Ssl 15:42 0:00
/usr/sbin/freeradius
root 4556 0.0 0.3 3548 1596 pts/2 S+ 15:42 0:00 grep
freeradius
Still the same problem
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=199,
length=20
I really appreciate your time and your e-mail but I don't think is matter
of which guide I used. If you spotted something wrong in the procedure,
just let me know and I'll be happy to fix it!
You were told repeatedly what you did wrong, and how to fix it.
Post by Federico Olivieri
Anyway, here the problem is that freeradius says that there is another
instance running but the output does not show anything
That's just not true.
Post by Federico Olivieri
Can you help me with that?
Apparently not.

You will choose one of the following options

a) follow instructions and solve the problem

b) ignore our attempts to help you, keep posting crap, and get banned from the list

Alan DeKok.


-
List info/subscribe/unsubscribe?
Federico Olivieri
2015-11-26 15:56:54 UTC
Permalink
Mate, respect first of all. You don't know my level of experience. Maybe I
started yesterday to linux world and I don't have a good general
understanding, or maybe your answers are not very useful/detailed... If you
want ban me from mailing list, do it without problem...I m sure that I'll
manage to have ma radius server in anyway
Post by Alan DeKok
Post by Federico Olivieri
That is what I have done (that is the same before)
[ ok ] Stopping FreeRADIUS daemon: freeradius.
That's good.
Post by Federico Olivieri
root 4523 0.0 0.4 3548 1828 pts/2 S+ 15:42 0:00 grep
freeradius
That's good.
Post by Federico Olivieri
Thu Nov 26 15:42:00 2015 : Info: ... adding new socket proxy address *
port 47236
Thu Nov 26 15:42:00 2015 : Debug: Listening on authentication address *
port 1812
Thu Nov 26 15:42:00 2015 : Debug: Listening on accounting address * port
1813
Thu Nov 26 15:42:00 2015 : Debug: Listening on authentication address
127.0.0.1 port 18120 as server inner-tunnel
Thu Nov 26 15:42:00 2015 : Debug: Listening on proxy address * port 1814
Thu Nov 26 15:42:00 2015 : Info: Ready to process requests.
That's good.
Post by Federico Olivieri
Then
That's bad.
You're either a troll, or someone who refuses to follow instructions.
Post by Federico Olivieri
[ ok ] Starting FreeRADIUS daemon: freeradius.
freerad 4532 1.5 1.3 54088 6172 ? Ssl 15:42 0:00
/usr/sbin/freeradius
root 4556 0.0 0.3 3548 1596 pts/2 S+ 15:42 0:00 grep
freeradius
Still the same problem
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=199,
length=20
I really appreciate your time and your e-mail but I don't think is matter
of which guide I used. If you spotted something wrong in the procedure,
just let me know and I'll be happy to fix it!
You were told repeatedly what you did wrong, and how to fix it.
Post by Federico Olivieri
Anyway, here the problem is that freeradius says that there is another
instance running but the output does not show anything
That's just not true.
Post by Federico Olivieri
Can you help me with that?
Apparently not.
You will choose one of the following options
a) follow instructions and solve the problem
b) ignore our attempts to help you, keep posting crap, and get banned from the list
Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.
Alan DeKok
2015-11-26 16:00:25 UTC
Permalink
Post by Federico Olivieri
Mate, respect first of all. You don't know my level of experience. Maybe I
started yesterday to linux world and I don't have a good general
understanding, or maybe your answers are not very useful/detailed...
Nonsense. They were detailed and explicit. You just didn't read them.
Post by Federico Olivieri
If you
want ban me from mailing list, do it without problem...I m sure that I'll
manage to have ma radius server in anyway
This is your last warning. If you keep complaining, you will get banned.

Alan DeKok.

-
List info/subscribe/unsubscribe?
Federico Olivieri
2015-11-26 16:11:35 UTC
Permalink
Don t take the disturb...I m about to unsubscribe..

Regards

Federico
Post by Alan DeKok
Post by Federico Olivieri
Mate, respect first of all. You don't know my level of experience. Maybe
I
Post by Federico Olivieri
started yesterday to linux world and I don't have a good general
understanding, or maybe your answers are not very useful/detailed...
Nonsense. They were detailed and explicit. You just didn't read them.
Post by Federico Olivieri
If you
want ban me from mailing list, do it without problem...I m sure that I'll
manage to have ma radius server in anyway
This is your last warning. If you keep complaining, you will get banned.
Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.
Arran Cudbard-Bell
2015-11-26 16:12:49 UTC
Permalink
Post by Federico Olivieri
Mate, respect first of all. You don't know my level of experience. Maybe I
started yesterday to linux world and I don't have a good general
understanding, or maybe your answers are not very useful/detailed... If you
want ban me from mailing list, do it without problem...I m sure that I'll
manage to have ma radius server in anyway
You appeared to be wilfully ignorant.

Thu Nov 26 15:32:34 2015 : Error: Failed binding to authentication address
* port 1812: Address already in use
Thu Nov 26 15:32:34 2015 : Error: /etc/freeradius/radiusd.conf[240]: Error
binding to port for 0.0.0.0 port 1812

The error message is pretty clear, the server can't start because something else is already listening on the port.

In the output you provided, you stopped the radius daemon that was listening on the port, which fixed the issue, then restarted the daemon, which caused the issue to reappear.

There are numerous resources on the internet that explain how Unix style networking works, I suggest you read them before seeking help here.

-Arran

Arran Cudbard-Bell <***@freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

Herwin Weststrate
2015-11-26 15:39:34 UTC
Permalink
Post by Federico Olivieri
Hi, thanks for your reply
That is the link
http://www.binaryheartbeat.net/2013/12/raspberry-pi-based-freeradius-server.html
I have just re-booted the server and that is the result
Sending Access-Request of id 78 to 127.0.0.1 port 1812
User-Name = "John Doe"
User-Password = "hello"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Reject packet from host 127.0.0.1 port 1812, id=78,
length=20
root 3531 0.0 0.4 3548 1796 pts/2 S+ 15:30 0:00 grep
radiusd
Same error
try `ps axuf | grep freeradius`. It is using a Debian-based distribution
which has the executable renamed.
--
Herwin Weststrate

-
List info/subscribe/unsubscribe? See htt
Continue reading on narkive:
Loading...