CP session list shows same session multiple times

Started by ThomasE, Today at 01:53:26 PM

Previous topic - Next topic
We have a rather big CP setup (few hundred sessions) and occasionally a single session shows up multiple times (see attached screenshot). This is a bit of a nuisance (though not a big problem) as we want to limit the number of devices per user and our monitoring system shows a warning if the number of sessions per user exceeds a certain limit.

At the moment, we don't really know how the problem can be triggered. Right now we have ~400 sessions and only one shows up multiple times.

Side question:

Is there a way to limit the number of concurrent CP sessions per user - for example by automatically killing any previous sessions once a new one is started? Ideally, this should *not* apply to vouchers.

Hi,

Just wondering.. If you run the following command:

sqlite3 -header -column /var/captiveportal/captiveportal.sqlite "
SELECT 'session_info' AS table_name, zoneid, sessionid, COUNT(*) AS count
FROM session_info
GROUP BY zoneid, sessionid
HAVING COUNT(*) > 1;

SELECT 'session_restrictions' AS table_name, zoneid, sessionid, COUNT(*) AS count
FROM session_restrictions
GROUP BY zoneid, sessionid
HAVING COUNT(*) > 1;
"

Does this produce any output?

Regarding your side question, the options allow for either having concurrent users (across multiple MACs), or not. If you don't allow them, previous sessions will automatically be killed. You can split this functionality up by splitting into zones if your architecture allows. However, this shouldn't be relevant for the problem you're seeing, as multiple sessions bound to the same user/MAC should not exist in any case.

Quote from: tuto2 on Today at 03:17:58 PMDoes this produce any output?
No. (I had to make it a one-liner because it complained about an Unmatched '"' but that shouldn't matter, I suppose.)

QuoteRegarding your side question, the options allow for either having concurrent users (across multiple MACs), or not. If you don't allow them, previous sessions will automatically be killed. You can split this functionality up by splitting into zones if your architecture allows. However, this shouldn't be relevant for the problem you're seeing, as multiple sessions bound to the same user/MAC should not exist in any case.
We need to be able to hand out vouchers that can be used by multiple users during certain events and sadly, the "one session per user" restriction would apply to vouchers, too.

I would assume there's no way to treat users and vouchers differently. Is that correct?

Splitting up zones is indeed what we're currently considering. I guess the only way to achieve this would be two different CP instances - one for users and one for vouchers - on two different WiFi networks and asking the user to pick the correct WiFi. We want to avoid this, but maybe we won't have much of a choice. Doing so and limiting sessions to one per user would of course solve our original problem, but as you said, multiple sessions for a single MAC shouldn't exist anyway, so you might just treat this part as a bug report. ;-)

> I would assume there's no way to treat users and vouchers differently. Is that correct?

No, this would have to apply to a different zone.

I'm not sure if you're on the community or business edition, but 26.1.8 just dropped with some Captive Portal improvements. Your issue specifically doesn't ring a bell, but best to stay on the latest version before chasing ghosts.

Be sure to restart the portal or manually reboot after the upgrade as mentioned in the release notes.