Hello, I have a problem with originate-coa I want to send coa to mikrotik to change bandwith But if I do that I get the folowing error: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted (core dumped) I'm using freeradius version 3.0 (I have tried it with radius version 2.1.10, error was slightly different go a segmentation fault) here is the code within sites-enables/default update coa { User-Name = "%{User-Name}" Acct-Session-Id = "%{Acct-Session-Id}" NAS-IP-Address = "%{NAS-IP-Address}" Framed-IP-Address = "%{Framed-IP-Address}" Mikrotik-Rate-Limit = "256K/256K" } This is send from accounting { I put originate-coa in the sites-enabled and I have made the folowing config: home_server mikrotik-test-coa { type = coa # # Note that a home server of type "coa" MUST be a real NAS, # with an ipaddr or ipv6addr. It CANNOT point to a virtual # server. # ipaddr = 192.168.8.97 port = 3799 # This secret SHOULD NOT be the same as the shared # secret in a "client" section. secret = <same as in clients.conf, because in the NAS it is the same> # CoA specific parameters. See raddb/proxy.conf for details. coa { irt = 2 mrt = 16 mrc = 5 mrd = 30 } } server originate-coa.mikrotik { pre-proxy { # update proxy-request { # NAS-IP-Address = 127.0.0.1 # } ok } # # Handle the responses here. # post-proxy { switch "%{proxy-reply:Packet-Type}" { case CoA-ACK { ok } case CoA-NAK { # the NAS didn't like the CoA request ok } case Disconnect-ACK { ok } case Disconnect-NAK { # the NAS didn't like the Disconnect request ok } # Invalid packet type. This shouldn't happen. case { fail } } # # These methods are run when there is NO response # to the request. # Post-Proxy-Type Fail-CoA { ok } Post-Proxy-Type Fail-Disconnect { ok } } } I have tried many many different settings in originate-coa when I use radclient I can send a coa with succes.
On 7 Nov 2012, at 11:25, Mixmasterontour PureDJ <mixmasterontour@hotmail.com> wrote:
Hello,
I have a problem with originate-coa
I want to send coa to mikrotik to change bandwith
But if I do that I get the folowing error: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted (core dumped)
Can haz backtrace plz? Or that core dump file if you know where it went... -Arran
Small update. I have run radiusd -X in gdb And get this as result: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Program received signal SIGABRT, Aborted. 0x00007ffff6b97425 in raise () from /lib/x86_64-linux-gnu/libc.so.6 Hope this give some ideas?
Subject: Re: Coa problem From: a.cudbardb@freeradius.org Date: Wed, 7 Nov 2012 12:00:14 +0000 To: freeradius-users@lists.freeradius.org
On 7 Nov 2012, at 11:25, Mixmasterontour PureDJ <mixmasterontour@hotmail.com> wrote:
Hello,
I have a problem with originate-coa
I want to send coa to mikrotik to change bandwith
But if I do that I get the folowing error: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted (core dumped)
Can haz backtrace plz? Or that core dump file if you know where it went...
-Arran
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
The core dump was off, now when I enable the coredumps radiusd won't dump anymore. Every other program dumps with SEGV signal, but radiusd won't So I don't know how te get a dump. now it aborts with: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted Thanks in advance From: mixmasterontour@hotmail.com To: freeradius-users@lists.freeradius.org Subject: Coa problem Date: Wed, 7 Nov 2012 12:25:48 +0100 Hello, I have a problem with originate-coa I want to send coa to mikrotik to change bandwith But if I do that I get the folowing error: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted (core dumped) I'm using freeradius version 3.0 (I have tried it with radius version 2.1.10, error was slightly different go a segmentation fault) here is the code within sites-enables/default update coa { User-Name = "%{User-Name}" Acct-Session-Id = "%{Acct-Session-Id}" NAS-IP-Address = "%{NAS-IP-Address}" Framed-IP-Address = "%{Framed-IP-Address}" Mikrotik-Rate-Limit = "256K/256K" } This is send from accounting { I put originate-coa in the sites-enabled and I have made the folowing config: home_server mikrotik-test-coa { type = coa # # Note that a home server of type "coa" MUST be a real NAS, # with an ipaddr or ipv6addr. It CANNOT point to a virtual # server. # ipaddr = 192.168.8.97 port = 3799 # This secret SHOULD NOT be the same as the shared # secret in a "client" section. secret = <same as in clients.conf, because in the NAS it is the same> # CoA specific parameters. See raddb/proxy.conf for details. coa { irt = 2 mrt = 16 mrc = 5 mrd = 30 } } server originate-coa.mikrotik { pre-proxy { # update proxy-request { # NAS-IP-Address = 127.0.0.1 # } ok } # # Handle the responses here. # post-proxy { switch "%{proxy-reply:Packet-Type}" { case CoA-ACK { ok } case CoA-NAK { # the NAS didn't like the CoA request ok } case Disconnect-ACK { ok } case Disconnect-NAK { # the NAS didn't like the Disconnect request ok } # Invalid packet type. This shouldn't happen. case { fail } } # # These methods are run when there is NO response # to the request. # Post-Proxy-Type Fail-CoA { ok } Post-Proxy-Type Fail-Disconnect { ok } } } I have tried many many different settings in originate-coa when I use radclient I can send a coa with succes. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Mixmasterontour PureDJ wrote:
The core dump was off, now when I enable the coredumps radiusd won't dump anymore. Every other program dumps with SEGV signal, but radiusd won't So I don't know how te get a dump.
now it aborts with: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted
I've pushed a fix. It should not have been an assert. Alan DeKok.
Thanks, This is much better, it won't crash anymore. It doesn't work yet, but now I have something to search for. I get this error, maybe someone knows where to look for (1) update coa { (1) WARNING: List 'coa' doesn't exist for this packet (1) } # update coa = invalid As what I can make of it, it's not allowed to use coa here, but I could use a coa update in accounting { .. } can I?
Date: Wed, 7 Nov 2012 09:14:59 -0500 From: aland@deployingradius.com To: freeradius-users@lists.freeradius.org Subject: Re: Coa problem
Mixmasterontour PureDJ wrote:
The core dump was off, now when I enable the coredumps radiusd won't dump anymore. Every other program dumps with SEGV signal, but radiusd won't So I don't know how te get a dump.
now it aborts with: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted
I've pushed a fix. It should not have been an assert.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I have been searching, but to be honest, I have no clue what I'm doing wrong here. Tried some different sections (authenticate, preact etc.) but all give the same warning. what do I do wrong? From: mixmasterontour@hotmail.com To: freeradius-users@lists.freeradius.org Subject: RE: Coa problem Date: Wed, 7 Nov 2012 15:35:44 +0100 Thanks, This is much better, it won't crash anymore. It doesn't work yet, but now I have something to search for. I get this error, maybe someone knows where to look for (1) update coa { (1) WARNING: List 'coa' doesn't exist for this packet (1) } # update coa = invalid As what I can make of it, it's not allowed to use coa here, but I could use a coa update in accounting { .. } can I?
Date: Wed, 7 Nov 2012 09:14:59 -0500 From: aland@deployingradius.com To: freeradius-users@lists.freeradius.org Subject: Re: Coa problem
Mixmasterontour PureDJ wrote:
The core dump was off, now when I enable the coredumps radiusd won't dump anymore. Every other program dumps with SEGV signal, but radiusd won't So I don't know how te get a dump.
now it aborts with: (0) update coa { ASSERT FAILED evaluate.c[1154]: output_vps Aborted
I've pushed a fix. It should not have been an assert.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Nothing. I'll see if I can push a fix.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks! If I could assist with something, let me know..
I've pushed a fix. Please test it.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks Alan, I've run the test.. It passes the the output_vps test, however I get a segmentation fault (0) expand: %{User-Name} -> Groen (0) expand: %{Acct-Session-Id} -> 80e00001 (0) expand: %{NAS-IP-Address} -> 192.168.8.97 (0) expand: %{Framed-IP-Address} -> 10.0.1.199 Segmentation fault Strange thing is that in my update coa I have those variables but also Mikrotik-Rate-Limit = "256K/256K" you won't see in the output. But when I comment out the line Mikrotik-Rate-Limit = "256K/256K" I get the same output and result (segmentation fault) This is the update coa code: update coa { User-Name = "%{User-Name}" Acct-Session-Id = "%{Acct-Session-Id}" NAS-IP-Address = "%{NAS-IP-Address}" Framed-IP-Address = "%{Framed-IP-Address}" Mikrotik-Rate-Limit = "256K/256K" }
Mixmasterontour PureDJ wrote:
I've run the test.. It passes the the output_vps test, however I get a segmentation fault (0) expand: %{User-Name} -> Groen (0) expand: %{Acct-Session-Id} -> 80e00001 (0) expand: %{NAS-IP-Address} -> 192.168.8.97 (0) expand: %{Framed-IP-Address} -> 10.0.1.199 Segmentation fault
Well, that's a typo. I've pushed another fix. Alan DeKok.
Well, that's a typo. I've pushed another fix.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Perfect, it's working now! Thanks one other small thing: in freeradius-server/raddb/sql/mysql/dialup.conf there is an error in accounting { interim-update { the insert sql is not correct (value count is incorrect) was: query = "\ INSERT INTO ${....acct_table1} \ (${...column_list}) \ VALUES \ ('%{Acct-Session-Id}', \ '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ '%{Realm}', \ '%{NAS-IP-Address}', \ '%{NAS-Port}', \ '%{NAS-Port-Type}', \ FROM_UNIXTIME(%{integer:Event-Timestamp} - \ %{%{Acct-Session-Time}:-0}), \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ '%{Acct-Session-Time}', \ '%{Acct-Authentic}', '', \ '%{%{Acct-Input-Gigawords}:-0}' << 32 | \ '%{%{Acct-Input-Octets}:-0}', \ '%{%{Acct-Output-Gigawords}:-0}' << 32 | \ '%{%{Acct-Output-Octets}:-0}', \ '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ '%{Service-Type}', \ '%{Framed-Protocol}', \ '%{Framed-IP-Address}')" } should be: query = "\ INSERT INTO ${....acct_table1} \ (${...column_list}) \ VALUES \ ('%{Acct-Session-Id}', \ '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ '%{Realm}', \ '%{NAS-IP-Address}', \ '%{NAS-Port}', \ '%{NAS-Port-Type}', \ FROM_UNIXTIME(%{integer:Event-Timestamp} - \ %{%{Acct-Session-Time}:-0}), \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ NULL, \ '%{Acct-Session-Time}', \ '%{Acct-Authentic}', '', '', \ '%{%{Acct-Input-Gigawords}:-0}' << 32 | \ '%{%{Acct-Input-Octets}:-0}', \ '%{%{Acct-Output-Gigawords}:-0}' << 32 | \ '%{%{Acct-Output-Octets}:-0}', \ '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ '', \ '%{Service-Type}', \ '%{Framed-Protocol}', \ '%{Framed-IP-Address}')" }
On 8 Nov 2012, at 07:38, Mixmasterontour PureDJ <mixmasterontour@hotmail.com> wrote:
Well, that's a typo. I've pushed another fix.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Perfect, it's working now! Thanks
one other small thing: in freeradius-server/raddb/sql/mysql/dialup.conf there is an error
Fixed. Thanks. -Arran
Fixed. Thanks.
-Arran
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks, but you fixed the accounting start, actually it contains 23 values now, should be 22 the error was in accounting interim-update
On 8 Nov 2012, at 08:23, Mixmasterontour PureDJ <mixmasterontour@hotmail.com> wrote:
Fixed. Thanks.
-Arran
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks, but you fixed the accounting start, actually it contains 23 values now, should be 22 the error was in accounting interim-update
You didn't specify which query it was, but I noticed after editing the file that you meant the alternate update query so swapped out the commit. https://github.com/FreeRADIUS/freeradius-server/blob/master/raddb/sql/mysql/... Contains the right fix... -Arran
On 8 Nov 2012, at 09:05, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 8 Nov 2012, at 08:23, Mixmasterontour PureDJ <mixmasterontour@hotmail.com> wrote:
Fixed. Thanks.
-Arran
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks, but you fixed the accounting start, actually it contains 23 values now, should be 22 the error was in accounting interim-update
You didn't specify which query it was, but I noticed after editing the file that you meant the alternate update query so swapped out the commit.
Actually you did, but it's pre-coffee, sorry.
https://github.com/FreeRADIUS/freeradius-server/blob/master/raddb/sql/mysql/...
Contains the right fix...
And I swapped out the commits within a couple of minutes of making the change, so I guess you were just looking at the commit feed instead of actually checking the files? -Arran
I've pushed a fix. Please test it.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Some extra info from gdb, I don't know if this is usefull: (gdb) exec-file /usr/local/sbin/radiusd -X (gdb) r Starting program: /usr/local/sbin/radiusd -f [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff307e700 (LWP 10291)] [Thread 0x7ffff307e700 (LWP 10291) exited] [New Thread 0x7ffff307e700 (LWP 10292)] [New Thread 0x7ffff173e700 (LWP 10293)] [New Thread 0x7ffff0f3d700 (LWP 10294)] [New Thread 0x7fffebfff700 (LWP 10295)] [New Thread 0x7fffeb7fe700 (LWP 10296)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffebfff700 (LWP 10295)] 0x000000000044d747 in ?? () (gdb) info threads Id Target Id Frame 7 Thread 0x7fffeb7fe700 (LWP 10296) "radiusd" 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 * 6 Thread 0x7fffebfff700 (LWP 10295) "radiusd" 0x000000000044d747 in ?? () 5 Thread 0x7ffff0f3d700 (LWP 10294) "radiusd" 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 4 Thread 0x7ffff173e700 (LWP 10293) "radiusd" 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 3 Thread 0x7ffff307e700 (LWP 10292) "radiusd" 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 1 Thread 0x7ffff7fef700 (LWP 10288) "radiusd" 0x00007ffff6c4e023 in select () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x000000000044d747 in ?? () #1 0x00007fffebffdc90 in ?? () #2 0x000000000087d300 in ?? () #3 0x0000000000000000 in ?? () (gdb) thread apply all bt full Thread 7 (Thread 0x7fffeb7fe700 (LWP 10296)): #0 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #1 0x000000000043599a in ?? () No symbol table info available. #2 0x0000000000000000 in ?? () No symbol table info available. Thread 6 (Thread 0x7fffebfff700 (LWP 10295)): #0 0x000000000044d747 in ?? () No symbol table info available. #1 0x00007fffebffdc90 in ?? () No symbol table info available. #2 0x000000000087d300 in ?? () No symbol table info available. #3 0x0000000000000000 in ?? () No symbol table info available. Thread 5 (Thread 0x7ffff0f3d700 (LWP 10294)): #0 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #1 0x000000000043599a in ?? () No symbol table info available. #2 0x0000000000000000 in ?? () No symbol table info available. Thread 4 (Thread 0x7ffff173e700 (LWP 10293)): #0 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #1 0x000000000043599a in ?? () No symbol table info available. #2 0x0000000000000000 in ?? () No symbol table info available. Thread 3 (Thread 0x7ffff307e700 (LWP 10292)): #0 0x00007ffff778afd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 No symbol table info available. #1 0x000000000043599a in ?? () No symbol table info available. #2 0x0000000000000004 in ?? () No symbol table info available. #3 0x000000000089bcc0 in ?? () No symbol table info available. #4 0x00007ffff287e000 in ?? () No symbol table info available. #5 0x000000000089bcc0 in ?? () No symbol table info available. #6 0x0000000000000000 in ?? () No symbol table info available. ---Type <return> to continue, or q <return> to quit--- Thread 1 (Thread 0x7ffff7fef700 (LWP 10288)): #0 0x00007ffff6c4e023 in select () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x00007ffff7bc4c3d in fr_event_loop (el=0x882aa0) at event.c:391 i = 5 rcode = 1 maxfd = 17 when = {tv_sec = 0, tv_usec = 328971} wake = 0x7fffffffe4d0 read_fds = {fds_bits = {253952, 0 <repeats 15 times>}} master_fds = {fds_bits = {253952, 0 <repeats 15 times>}} #2 0x000000000044654f in ?? () No symbol table info available. #3 0x00007fffffffe610 in ?? () No symbol table info available. #4 0x000000000042f3c7 in ?? () No symbol table info available. #5 0x00007fffffffe6f8 in ?? () No symbol table info available. #6 0x0000000200002800 in ?? () No symbol table info available. #7 0x000000000042f6ae in ?? () No symbol table info available. #8 0x0000000000000000 in ?? () No symbol table info available. Hope this helps a bit
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Mixmasterontour PureDJ