問題描述
Jetty 集群問題(jettySessions expiryTime 在某個時間後被設置為 0) (Jetty clustering issue (jettySessions expiryTime getting set to 0 after sometime))
We are using Jetty 7.5.1. We have JDBCSessionManager configured to serialize the JSESSIONID, we have set MaxInactiveTimeInterval as 120.We have two nodes running on the load balancer, what we have observed is whenever a request from a session which was served by node1 before goes to node2 the expiryTime is getting set to zero.
When we tried to debug jetty‑server src on of the the constructor which deserializes the AbstractSession doesn't seem to serialize or set _maxIdleMs whereas in the other constructor it does.
Due to this the access method inside of Session is setting the expiryTime of SessionData based on _maxIdleMs of Session which is zero. This is making expiryTime zero. Is this a bug / are we missing some configration in Jetty?
‑‑‑‑‑
參考解法
方法 1:
Looks like Jan has you sorted out:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380866
(by user1421692、jesse mcconnell)