Hi Mark,

The jetty doco shows you how to correctly set up a DefaultSessionIdManager
in code:
https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#pg-server-session-architecture

I think what is happening is that your code is creating the
DefaultSessionIdManager, but not adding it to the Server with the
setSessionIdManager call, and thus it is not being started - it is in
startup that it works out what it's unique nodeid is, which is null in your
stacktrace.

If you don't want to do any explicit setup of the DefaultSessionIdManager,
you don't even have to create one yourself: the SessionHandler will create
one on startup (if it can't find one via the Server instance).

I might add a log warning or exception if a non-initialized
DefaultSessionIdManager is used, to make the problem more obvious.

cheers
Jan


On Sun, 14 Aug 2022 at 20:49, Mark Raynsford via jetty-users <
jetty-users@eclipse.org> wrote:

> Hello!
>
> I'm running into what I think is an easily reproducible bug:
>
> https://github.com/io7m/jetty-bug-20220814
>
> Can anyone else confirm this happens to them? This effectively makes
> the FileSessionStore unusable here, because it fails to do the one
> thing it's intended to do (allow sessions to survive server restarts).
>
> To reproduce, just run:
>
>
> https://github.com/io7m/jetty-bug-20220814/blob/master/src/main/java/com/io7m/jettybug/Main.java
>
> ... and try the sequence given in the `README.md` images.
>
> --
> Mark Raynsford | https://www.io7m.com
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>


-- 
Jan Bartel <j...@webtide.com>
www.webtide.com
*Expert assistance from the creators of Jetty and CometD*
_______________________________________________
jetty-users mailing list
jetty-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to