org.nrg.xnattools.exception.SessionManagerNotInitedException | java.io.IOException: SessionManager not inited

176 views
Skip to first unread message

CEIB-CS

unread,
May 18, 2015, 7:49:44 AM5/18/15
to xnat_di...@googlegroups.com
Hi, any ideas why happens this randomly?

> AutoRun.xml

org.nrg.xnattools.exception.SessionManagerNotInitedException
    at org.nrg.xnattools.SessionManager.createJSESSION(SessionManager.java:92)
    at org.nrg.xnattools.SessionManager.getJSESSION(SessionManager.java:136)
    at org.nrg.xnattools.service.WebServiceClient.connect(WebServiceClient.java:88)
    at org.nrg.plexiViewer.converter.WebBasedQCImageCreator.createQCImages(WebBasedQCImageCreator.java:141)
    at org.nrg.plexiViewer.converter.WebBasedQCImageCreator.main(WebBasedQCImageCreator.java:587)
java.io.IOException: SessionManager not inited
    at org.nrg.xnattools.service.WebServiceClient.connect(WebServiceClient.java:92)
    at org.nrg.plexiViewer.converter.WebBasedQCImageCreator.createQCImages(WebBasedQCImageCreator.java:141)
    at org.nrg.plexiViewer.converter.WebBasedQCImageCreator.main(WebBasedQCImageCreator.java:587)

If I reboot XNAT it works, but after archiving X subjects it fails for the next ones.

Perhaps memory resources / Java?

Thanks.

I'm using the latest source from BitBucket.

---

Centre of Excellence and Technological Innovation in Bioimaging | Regional Ministry of Health in Valencia Region.

http://ceib.san.gva.es/

Herrick, Rick

unread,
May 18, 2015, 11:39:53 AM5/18/15
to xnat_di...@googlegroups.com
Have a look through these posts:


There are a few reasons why this can go awry, most of which are discussed here. If you don’t find an answer there, let me know.

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 740-5961


--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.



The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

CEIB-CS

unread,
May 19, 2015, 6:51:24 AM5/19/15
to xnat_di...@googlegroups.com
Hi Rick,

After reading carefully the posts and thinking about JSESSIONID, Content-Type... how about updating "Noelios-Restlet-Engine/1.1.rc1" library?

---

DEBUG main httpclient.wire.header - >> "GET /xnat/data/services/workflows/workflowid/20528 HTTP/1.1[\r][\n]"
DEBUG main httpclient.wire.header - >> "User-Agent: Noelios-Restlet-Engine/1.1.rc1[\r][\n]"
DEBUG main httpclient.wire.header - >> "Cookie: JSESSIONID=D31BD858A61AB015A326DC1C3463533E[\r][\n]"
DEBUG main httpclient.wire.header - >> "Accept: */*[\r][\n]"
DEBUG main httpclient.wire.header - >> "Host: xxx.xxx.xxx.xx:0000[\r][\n]"
DEBUG main httpclient.wire.header - >> "[\r][\n]"
DEBUG main httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"
DEBUG main httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"
DEBUG main httpclient.wire.header - << "Set-Cookie: SESSION_EXPIRATION_TIME="1431938209469,43200000"; Version=1; Path=/[\r][\n]"
DEBUG main httpclient.wire.header - << "Date: Mon, 18 May 2015 08:36:49 GMT[\r][\n]"
DEBUG main httpclient.wire.header - << "Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept[\r][\n]"
DEBUG main httpclient.wire.header - << "Accept-Ranges: bytes[\r][\n]"
DEBUG main httpclient.wire.header - << "Server: Noelios-Restlet-Engine/1.1.6[\r][\n]"
DEBUG main httpclient.wire.header - << "Content-Type: text/xml[\r][\n]"
DEBUG main httpclient.wire.header - << "Transfer-Encoding: chunked[\r][\n]"
DEBUG main httpclient.wire.header - << "[\r][\n]"
DEBUG main httpclient.wire.content - << "7"
DEBUG main httpclient.wire.content - << "4"
DEBUG main httpclient.wire.content - << "b"
DEBUG main httpclient.wire.content - << "[\r]"
DEBUG main httpclient.wire.content - << "[\n]"
DEBUG main httpclient.wire.content - << "<"
DEBUG main httpclient.wire.content - << "?xml version="1.0" encoding="UTF-8"?>[\n]"

---

XNAT found jars

com.noelios.restlet-1.1.6.jar
com.noelios.restlet-1.1rc1.jar
com.noelios.restlet.ext.httpclient_3.1.jar
com.noelios.restlet.ext.net.jar
com.noelios.restlet.ext.servlet_2.5-1.1.6.jar

---

Current:

- 1.1 Release Candidate 1 (2008-08-20)

http://restlet.com/technical-resources/restlet-framework/misc/1.1/changes

Last:

- 2.3.2 (05/01/2015)

http://restlet.com/technical-resources/restlet-framework/misc/2.3/changes

---

http://restlet.com/downloads/current/

---

Thanks.

Herrick, Rick

unread,
May 19, 2015, 7:06:29 AM5/19/15
to xnat_di...@googlegroups.com
Oh, you definitely don’t want to do that. 1.1.10 would still work, maybe 1.2 (which was never actually released) would still work, but 2.x and later are completely different frameworks. I don’t think it’s related to that at all. I think you have some issue with password and/or session persistence. Did you try running the pipeline script from the command line? That will often give you information you won’t see otherwise in the pipeline logs.

CEIB-CS

unread,
May 20, 2015, 2:50:15 AM5/20/15
to xnat_di...@googlegroups.com
Hi, Rick.

It is a problem about session persistence.

If the sessions does not expire at some point the handler fails.

Too many calls to XnatDataClient / XnatRestClient cause that trouble.

ATTENTION: You have 986 sessions open from one IP address. (what does this mean?)

ATTENTION: You have 908 sessions open from one IP address. (what does this mean?)

ATTENTION: You have 1022 sessions open from one IP address. (what does this mean?)

I just changed the timeout to 00:05:00 minutes and everything works fine.

.../xnat/target/xnat/WEB-INF/web.xml

<session-config>
<!-- Default to 15 minute session timeouts -->
<session-timeout>15</session-timeout>
</session-config>

<session-config>
<!-- Default to 5 minute session timeouts -->
<session-timeout>5</session-timeout>
</session-config>

Thanks for your comments.

Herrick, Rick

unread,
May 20, 2015, 2:53:03 PM5/20/15
to xnat_di...@googlegroups.com
Ah, yeah, that’s a problem best mitigated by reuse of the JSESSIONID value from each multistep operation and proper termination of each session upon completion of the operation. A complete operation lifecycle would go like this:

1. Authenticate and get the JSESSIONID value.
2. Do something using the JSESSIONID value for authentication.
… <do more stuff>
N – 1. Do the last thing you need to do.
N. Terminate the session: DELETE http://server/xnat/JSESSION.

That does two things: only creates as many sessions as you need and returns the session to the available pool as soon as possible.

Technically speaking, pure RESTful operations are stateless, meaning that there are no persistent sessions and this won’t happen. That’s not how things currently work though.
Reply all
Reply to author
Forward
0 new messages