• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with login and multiple instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with login and multiple instances


  • Subject: Problems with login and multiple instances
  • From: Mark Wardle <email@hidden>
  • Date: Sun, 10 Apr 2011 23:43:15 +0100

Hi all,

I'd previously written about this but despite considerable advice and
help, I didn't make much progress although only just got around to
taking Chuck Hill's advice overriding Application.displayRequest().

My application is working perfectly except when I have multiple
instances. I've also heard occasional reports of problems logging in
only with a single instance although this is not reproducible. In both
circumstances, the user is asked to login again despite entering
correct credentials.

==== these first debug statements show a login and then a logout. This
works successfully.

Apr 10 21:46:16 RSNews[2001] INFO  NSLog  - Welcome to RSNews !
Apr 10 21:46:22 RSNews[2001] WARN  NSLog  -
Apr 10 21:46:23 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: null
Apr 10 21:46:23 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/womp/instanceRequest
Apr 10 21:46:23 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
form values = {<instanceRequest type = (""NSDictionary">
	<queryInstance type="NSString">STATISTICS</queryInstance>
</instanceRequest>"); }
Apr 10 21:46:23 RSNews[2001] WARN  NSLog  - <WOWorkerThread id=0
socket=Socket[addr=/127.0.0.1,port=49191,localport=2001]> Exception
while sending response: java.net.SocketException: Broken pipe
Apr 10 21:46:42 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: null
Apr 10 21:46:42 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/1
Apr 10 21:46:42 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
form values = {}
Apr 10 21:46:49 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: MJGDzuxKU0K6gt0AUKIXug
Apr 10 21:46:49 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/1/wa/login
Apr 10 21:46:49 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
form values = {destinationUrl = ("/cgi-bin/WebObjects/RSNews.woa/1");
password = ("xxxx"); username = ("mark"); }
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.Session  -
Session created! Session ID : qnvbjwbmQ5YUra9QDv7Asw
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.DirectAction  -
Redirecting to original requested url:
/cgi-bin/WebObjects/RSNews.woa/1
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.DirectAction  -
Decoded url: /cgi-bin/WebObjects/RSNews.woa/1
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.DirectAction  -
Note: we are storing session id in cookies: therefore not using
wosid...
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.DirectAction  -
Finally: redirecting to page: /cgi-bin/WebObjects/RSNews.woa/1
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: qnvbjwbmQ5YUra9QDv7Asw
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/1
Apr 10 21:46:50 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
form values = {}
Apr 10 21:46:56 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: qnvbjwbmQ5YUra9QDv7Asw
Apr 10 21:46:56 RSNews[2001] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/1/wa/DirectAction/logout?__cid=2

=== and now try to login again  note the different instances ----

Apr 10 21:46:56 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: null
Apr 10 21:46:56 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/2/wa/default
Apr 10 21:46:56 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
form values = {}
Apr 10 21:47:06 RSNews[2003] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: null
Apr 10 21:47:06 RSNews[2003] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/3/wa/login
Apr 10 21:47:06 RSNews[2003] DEBUG com.eldrix.news.app.Application  -
form values = {destinationUrl =
("/cgi-bin/WebObjects/RSNews.woa/2/wa/default"); password = ("xxxx");
username = ("mark"); }
Apr 10 21:47:07 RSNews[2003] DEBUG com.eldrix.news.app.Session  -
Session created! Session ID : 5ZUxSZvyYuN2YYsvuGypq0
Apr 10 21:47:07 RSNews[2003] DEBUG com.eldrix.news.app.DirectAction  -
Redirecting to original requested url:
/cgi-bin/WebObjects/RSNews.woa/2/wa/default
Apr 10 21:47:07 RSNews[2003] DEBUG com.eldrix.news.app.DirectAction  -
Decoded url: /cgi-bin/WebObjects/RSNews.woa/2/wa/default
Apr 10 21:47:07 RSNews[2003] DEBUG com.eldrix.news.app.DirectAction  -
Note: we are storing session id in cookies: therefore not using
wosid...
Apr 10 21:47:07 RSNews[2003] DEBUG com.eldrix.news.app.DirectAction  -
Finally: redirecting to page:
/cgi-bin/WebObjects/RSNews.woa/2/wa/default

Apr 10 21:47:07 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: 5ZUxSZvyYuN2YYsvuGypq0
Apr 10 21:47:07 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/2/wa/default
Apr 10 21:47:07 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
form values = {}
Apr 10 21:47:16 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
dispatchRequest(): session: 5ZUxSZvyYuN2YYsvuGypq0
Apr 10 21:47:16 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
uri: /cgi-bin/WebObjects/RSNews.woa/2/wa/login
Apr 10 21:47:16 RSNews[2002] DEBUG com.eldrix.news.app.Application  -
form values = {destinationUrl =
("/cgi-bin/WebObjects/RSNews.woa/2/wa/default"); password = ("xxxx");
username = ("mark"); }
Apr 10 21:47:16 RSNews[2002] DEBUG com.eldrix.news.app.Session  -
Session created! Session ID : gSTVJftbX1JzsEipBYqXyg
Apr 10 21:47:17 RSNews[2002] DEBUG com.eldrix.news.app.DirectAction  -
Redirecting to original requested url:
/cgi-bin/WebObjects/RSNews.woa/2/wa/default
Apr 10 21:47:17 RSNews[2002] DEBUG com.eldrix.news.app.DirectAction  -
Decoded url: /cgi-bin/WebObjects/RSNews.woa/2/wa/default
Apr 10 21:47:17 RSNews[2002] DEBUG com.eldrix.news.app.DirectAction  -
Note: we are storing session id in cookies: therefore not using
wosid...
Apr 10 21:47:17 RSNews[2002] DEBUG com.eldrix.news.app.DirectAction  -
Finally: redirecting to page:
/cgi-bin/WebObjects/RSNews.woa/2/wa/default

Now there are two odd things here.

Firstly, I had previously added a session constructor debug statement
and therefore concluded that I wasn't created a spurious session
BEFORE processing the login form. However, overriding Application's
dispatchRequest() clearly shows a different session identifier before
login. I can only conclude that someone somewhere is creating a
session that is not my Session class. I didn't think that was
possible. I don't know where session MJGDzuxKU0K6gt0AUKIXug is created
in the above log file.

Secondly, instance 2 is receiving a session created by instance 3. I
didn't think that was possible.

I'm blindly placing the contents of context().request().uri() into a
destinationUrl parameter of the login form and then redirecting to
that using ERXRedirect after processing the login form. Presumably
this is the cause of my difficulties but I was keen to allow direct
actions to be bookmarked and to support sending links via email.

Does anyone have any suggestions?

Many thanks,

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problems with login and multiple instances
      • From: Chuck Hill <email@hidden>
    • Re: Problems with login and multiple instances
      • From: Mark Wardle <email@hidden>
  • Prev by Date: Re: responseForComponentWithName() and session
  • Next by Date: Re: Problems with login and multiple instances
  • Previous by thread: Re: responseForComponentWithName() and session
  • Next by thread: Re: Problems with login and multiple instances
  • Index(es):
    • Date
    • Thread