What is the best way to deal with misbehaving nas's that send accounting to both the primary and secondary server, even while receiving replies to both queries.
Throw it away, and buy a real NAS.
The customer uses this nas for a product that is in its endoflife. It has been in place for quite some time. Previously, this "feature" was unwittingly used to have accounting sent to two different unrelated systems, where it was needed on both.
So long as it works, there will be no more capital investments, which have been investigated to an extent.
Well, it doesn't work. At least not properly.
i.e. post some packet contents here. Odds are that you can look at NAS-IP-Address, NAS-Port, and maybe User-Name. If those all match, odds are it's for the same session, even if Acct-Session-Id is different.
They are the same.
Yes, because same packet was sent to two different servers.
With the default mysql schema, I dont think there is anything to cause that query to ever fail.
Tips and advice are greatly appreciated.
Break it than. Make AcctUniqueId unique: ALTER TABLE `radacct` ADD UNIQUE (`AcctUniqueId`) That should disable duplicated INSERT.
I suppose my question is when and how is the account_start_query_alt used, and can I use that to prevent duplicate accounting rows in sql?
Yes, when the INSERT fails, alt query (UPDATE) will be executed. It won't change a thing, but since you can't stop it (ie. NAS is junk) ... Ivan Kalik Kalik Informatika ISP