We're working towards that solution. But I think it would be ideal if the system didn't open its port up until it was ready to accept traffic. Or at least until it wasn't going to deadlock. We're running a single node, so a load balancer isn't an obvious solution. And it's a solution that everyone needs to implement (or should implement). It's tricky because traffic at the right time will cause it to fail, which is a confusing error to try to debug. You may get lucky and it will start, or you may get unlucky and deadlock.

On 6/18/25 15:05, Ray Bon wrote:
Richard,

We front our cas cluster with a load balancer. When one of the servers goes down, it is removed from the pool. When the health check is 'UP', it is added into the pool. https://cas.host/cas/actuator/health <https://cas.host/cas/actuator/health>

Ray
------------------------------------------------------------------------
*From:* 'Richard Frovarp' via CAS Community <cas-user@apereo.org>
*Sent:* June 18, 2025 08:51
*To:* cas-user@apereo.org <cas-user@apereo.org>
*Subject:* [cas-user] Deadlock on startup
We have been able to trigger a deadlock on startup in CAS 7.1. I do not
know if the problem exists on 7.2. I have only been able to replicate
this on production, and not in a test environment. There appears to be a
race condition between HTTP accepting connections, and CAS still
starting. So as CAS is starting, it is listening on its port before
startup has completed, and if a connection comes in at the right time,
which our busy CAS production system can have happen, it will deadlock.

Attached is the deadlock section from jstack when it happened. I don't
know if it is possible to stop it from listening for connections until
the end of startup or not. We're working on keeping traffic away from it
on startup, but that is something every deployment would need to do.

Thanks,

Richard

--
- Website: https://apereo.github.io/cas <https://apereo.github.io/cas> - List Guidelines: https://goo.gl/1VRrw7 <https://goo.gl/1VRrw7> - Contributions: https://goo.gl/mh7qDG <https://goo.gl/mh7qDG>
---
You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. To view this discussion visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/b879f7b3-a5ca-44c9-80e3-021f3f93ceb4%40ndsu.edu <https://groups.google.com/a/apereo.org/d/msgid/cas-user/b879f7b3-a5ca-44c9-80e3-021f3f93ceb4%40ndsu.edu>.
--
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. To view this discussion visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/YQBP288MB0081A255440E98C1A9D793C9CE72A%40YQBP288MB0081.CANP288.PROD.OUTLOOK.COM <https://groups.google.com/a/apereo.org/d/msgid/cas-user/YQBP288MB0081A255440E98C1A9D793C9CE72A%40YQBP288MB0081.CANP288.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.

--
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/e6f61ac8-d49e-4247-a7dc-c7aac3529880%40ndsu.edu.

Reply via email to