|
|
3:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/01/05 07:25 PM |
|
G'day Ian,
> 1. If I Enter things into the Name and Description click teh
> Create button and I get 2 Validate Errors on the drop
> downs.
Is it javascript error? Hmmm... that's odd. I wonder if that could be a browser issue? I just tried with Safari and Firefox on our Sakai-LAMS demo server and haven't seen that error.
When you select a sequence and then complete the name and description, there's a pop-up javascript message that ask you to confirm what you are about to do. Can you see that message?
> 404 - /lams/j_security_check
Ah... ok. Yeah, we have address that one here. Just apply that patch and the j_security_check issue should be gone.
Ernie
Posted by Ernie Ghiglione
|
|
|
4:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/01/05 07:37 PM |
|
For problem 1
Hmmm... I'm not quite sure, can you please provide more info?
For problems 2, 3 & 4
It's caused by a corrupted lams-valve.jar file which should be fixed with the latest version of LAMS 1.0.2
Anyway, you can download the attached lams-valve.jar and overwrite the copy on your system. This should should solve problems 2, 3 & 4.
> If there is anywhere I can attache files I can give you screen shots
you can attach files by selecting "Yes" to Attach? when you post or reply a message.
Posted by Anthony Xiao
|
Attachments:
|
|
|
5:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/02/05 05:40 AM |
|
Sorry Still got problems.
For Info
Clicking on Refresh Sequence List generates
10:15:03,751 DEBUG [UserManagementServiceBean] Starting getCompleteUser(String loginName)
10:15:03,756 DEBUG [UserManagementServiceBean] Starting getCompleteUser(ShwaaUserLocal user)
10:15:03,806 DEBUG [UserManagementServiceBean] Ending getCompleteUser(ShwaaUserLocal user)
10:15:03,806 DEBUG [UserManagementServiceBean] Ending getCompleteUser(String loginName)
10:15:03,810 DEBUG [LearningDesignDefnDAO] findAllLD validOnly=true userId=1040
10:15:03,810 DEBUG [LearningDesignDefnDAO] Calling find with from lddefn_ld in class com.webmcq.ld.activities.LearningDesignDefnVO where ( objectType='LearningDesign') and ( ( readAccess = '0') or ( readAccess='-1' and owner = ? ) or ( readAccess= ?) ) and validDesign=1
10:15:03,925 DEBUG [LearningDesignServiceSoapBindingImpl] Got designs:[Lcom.webmcq.ld.ws.SimpleLearningDesignVO;@231e35
in the lams jboss server
+++++++++++++++
Problem 1
Firefox
Clciking create gives a Javascript Popup with This will start a sequence in LAMS are you sure you want to continue ?
Screen refreshes, followed by a iframe refresh, followed by a Ajax refresh of the drop down, followed by both dropdowns with the error messages.
Safari
Same, but the popup also says http://bort:8180/ which is probably just a safari title.
IE 5.2 Mac
Cant do anything as the lists dont load
Problems 2,3,4
++++++++++++++
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Clicking on Edit Selected Sequence, or Create new Sequence I get
HTTP Status 400 - Invalid direct reference to form login page
type Status report
message Invalid direct reference to form login page
description The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).
Apache Tomcat/4.1.24-LE-jdk14
++++++++++++++
in Safari 1.3.1 (v312.3.3)
Clicking on Edit Selected Sequence, or Create new Sequence I get
HTTP Status 404 - /lams/j_security_check
type Status report
message /lams/j_security_check
description The requested resource (/lams/j_security_check) is not available.
Apache Tomcat/4.1.24-LE-jdk14
++++++++++++++++++++++++
In Mac IE 5.2
I get about 8 or 9 Javascript errors (XMLHTTP, HTTPArea etc)
When I click on the Create Sequence (because I cant click on anything else now)
HTTP Status 400 - Invalid direct reference to form login page
------------------------------------------------------------------------
type Status report
message Invalid direct reference to form login page
description The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).
------------------------------------------------------------------------
Apache Tomcat/4.1.24-LE-jdk14
++++++++++++++++++
Having replaced the lams-value.jar, I have checked that it is the only one running,
The lams-value.jar that is running has an md5sum of
ieb@bort:~/lams/runtime$ md5sum ./jboss/server/default/lib/lams-value.jar ~/lams-value.jar
aa118a08d86b75e3f750f2c373f29b3c ./jboss/server/default/lib/lams-value.jar
aa118a08d86b75e3f750f2c373f29b3c /home/ieb/lams-value.jar
ieb@bort:~/lams/runtime$
( the second one is the download)
Sorry for the long post
If we can get this working, John Normal has a VPN token and may be able to help you demo it at the Sakai Conference at Austin..... but we also want to get it ready for a pilot in Jan/Feb
Posted by Ian Boston
|
|
|
6:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/04/05 09:10 PM |
|
Hi Ian,
Is it possible for you to generate another tcp dump?
With the 404 errors, it could of be a cookie issue. Try remove all the cookie first then try using LAMS Monitor and Author interface thru Sakai.
For problem 4.
It proved one thing, Sakai and LAMS is communicating with eachother, therefore the user Saka_admin is created. The Sakai-LAMS module automatically logs the sakai user into lams. So if you go into LAMS directly, you'll get logged straight in since he was previously logged in thru Sakai.
Is your prefix "Sakai" or "Sakai_" but I dont understand why the user created by LAMS is Saka_admin that's strange. This could cause a problem as well. LAMS might be looking for the user sakai_admin but the user logged in is saka_admin.
Could you please dump your ext_server_org_map again?
Anthony
Posted by Anthony Xiao
|
|
|
7:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/05/05 04:33 AM |
|
Problem 4.
I think that saka_admin was a typo and I meant sakai_admin.
This is not what I meant by the problem.
What I meants that there appeared to be a session already setup since I was logged in as sakai_admin without having to put a password, indicating the the previous problems had logged me into lams... even though a problem was reported.
Here is the dump of tables (dont worry about password hashes this is a test install with defaullt passwords)
mysql> select * from tbl_user
-> ;
+------+-------------+----------------------------------+---------------+---------------+---------------+
| uid | login | password | fname | lname | creation_date |
+------+-------------+----------------------------------+---------------+---------------+---------------+
| 0 | root | 2757142c2111b8bd34a0d1b718f59c0c | System | Administrator | 1050021517000 |
| 1 | admin | 2757142c2111b8bd34a0d1b718f59c0c | administrator | demo | 1050021517000 |
| 2 | learner | 2757142c2111b8bd34a0d1b718f59c0c | learner | demo | 1046128213942 |
| 3 | teacher | 2757142c2111b8bd34a0d1b718f59c0c | teacher | demo | 1046128228489 |
| 4 | author | 2757142c2111b8bd34a0d1b718f59c0c | author | demo | 1046128240224 |
| 1040 | sakai_admin | f3beb2ff779fc89fb9f24456cebe39b5 | Sakai | Administrator | 1133431092915 |
+------+-------------+----------------------------------+---------------+---------------+---------------+
6 rows in set (0.17 sec)
mysql> select * from ext_server_org_map;
+-----+---------------+---------------+------------+------------+--------+----------------------------------------------------------------------------------------------------+-------------+----------+-------+
| sid | serverid | serverkey | servername | serverdesc | prefix | userinfo_url | timeout_url | disabled | orgid |
+-----+---------------+---------------+------------+------------+--------+----------------------------------------------------------------------------------------------------+-------------+----------+-------+
| 1 | sakaicamtools | lamsserverkey | sakai | sakai | sakai | http://bort:8180/sakai-lams-tool/servlet/UserDataServlet?uid=%username%&ts=%timestamp%&hash=%hash% | 300 | 0 | 1020 |
+-----+---------------+---------------+------------+------------+--------+----------------------------------------------------------------------------------------------------+-------------+----------+-------+
1 row in set (0.00 sec)
mysql>
Posted by Ian Boston
|
|
|
|
9:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/05/05 07:13 AM |
|
Attached is the tcp dump
At Frame 77 the POST on clicking the create button happens.
The response is at 79, not redirect imbetween. Looking at the parameters, the request includes valid items for both the drop downs.... so this is probably something in the java code.
At Frame 151 I click on the edit button
152 is the redirect to lams (LoginRequest)
156 is the get of the redirect to lams (LoginRequest)
158 is the response from lams a redirect to j_security_check
with a session cookie (ending 325D; path=/lams)
161 is the browser get of j_security_check BUT
the above cookie is NOT sent, instead the sakai cookies are sent
163 lams says no way, no session, direct access (as it should as it didnt get the cookie)
Looking at the spec of SetCookie you cannot bind a cookie to the port, only the hostname and the path. Since Sakai and Lams both use the same session cookie name, you cant run sakai and lams on the same hostname otherwise the sakai cookie takes presidence.
Solutions:
1. Change the cookie name in lams from JSESSION_ID to LAMSSESSION_ID ?
2. Run on a different host on the same box (I will try this) ?
3. Buy dedicated hardware for the lams server. ?
That still leaves use with the Create problem.
Posted by Ian Boston
|
Attachments:
|
|
|
10:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/05/05 07:26 AM |
|
Tried the change in host name,
lams now on bort.caret.local
sakai on bort
These are the same machines
This fixes the cookie issues so now LAMS is getting the correct session....
BUT
It is still complaining about direct access to the login form.
I think that you have to do a POST to make j_security_check work relayable. A redirect is not good enough.
----
Frame 18 LoginRequest
Frame 20 redirect with cookie set
Frame 21 Get the rredirect with the correct cookie
Frame 22 Rejection due to direct access.
Posted by Ian Boston
|
Attachments:
|
|
|
11:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/05/05 08:12 AM |
|
The message on direct access appears because the session note containing the target request object was not available after j_security_check completed.
catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
So.
Either jboss never executed the FormAuthenticator code (saveRequest)
I would debug, but it looks like the Source code 1.0.2 posted on you site does not contain this code. lams-valve.jar looks like the jar for this.
If you want support from the communty under a GPL license, you have to post the matching source code to the community.
Posted by Ian Boston
|
|
|
12:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
12/05/05 09:36 AM |
|
Just re-installed you latest version form the Oz main site.
This has exactly the same behaviour as the previous version.
To be clear, this is the lams-server-1.0.2-20051121.zip version.
Posted by Ian Boston
|
|
|
|
|
|
|
|
|
19:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
01/09/06 10:38 AM |
|
Hi,
Back from a long break ( in Oz :), 1 month) which was great!.....
So I tried the latest integration binary from the site, downloaded today.....
And exactly the same as above.
From memory and looking at the tomcat cateilina code, it sets a "note" in a session attribute when re-directing to do j_security checks, so you cant just post into the j_security check url, you MUST let tomcat serve the page for you and then post a response...... or you must set the note yourself to fool catalina that it is a genuine j_security redirect
However I see you have replaced the catalinia valve, BUT there is no source code for this in the 1.0.2 source code bundle.
If it is relevant, could you post it as I might be able to put some debug in to see where the problem is. (btw, strictly speaking, shouldnt that be in the source bundle, its GPL ? Isnt it ? )
Ian
Posted by Ian Boston
|
|
|
20:
Re: Re: Sakai - Lams integration Create problem
|
In response to 19
|
01/09/06 04:46 PM |
|
Hi Ian,
Sorry about the missing source file. We'll add that file to the source code bundle next time when the bundle is updated. But I've already attached the source code for lams-valve.jar. If you scroll up in this thread you should be able to see it.
Cheers,
Anthony
Posted by Anthony Xiao
|
|
|
|
22:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
01/10/06 06:43 AM |
|
Ok I've now got some sensible debug,
12:32:50,369 ERROR [STDERR] LoginRequestValve invoked
12:32:50,370 ERROR [STDERR] Request URI is //lams/LoginRequest
12:32:50,610 ERROR [STDERR] After invoke Next
12:32:50,610 ERROR [STDERR] Status is 302:null
12:32:50,611 ERROR [STDERR] Cookie:JSESSIONID::ED8494080BF8F1165A3C1727E7EBEB73
12:32:50,614 ERROR [STDERR] Header:Set-Cookie
12:32:50,614 ERROR [STDERR] Value:0:JSESSIONID=ED8494080BF8F1165A3C1727E7EBEB73; Path=/lams
12:32:50,615 ERROR [STDERR] Header:Location
12:32:50,615 ERROR [STDERR] Value:0:http://bort.caret.local:8280/lams/j_security_check?j_username=sakai_admin&j_password=b705004d38a3c1d30dd7b8d2f797645b
12:32:50,615 ERROR [STDERR] LoginRequest requested
12:32:50,617 ERROR [STDERR] header=Location=http://bort.caret.local:8280/lams/j_security_check?j_username=sakai_admin&j_password=b705004d38a3c1d30dd7b8d2f797645b
12:32:50,623 ERROR [STDERR] LOGIN REQUEST DETECTED - LOGIN SUCCESSFUL
12:32:50,629 ERROR [STDERR] Set Note with reuquestURI as /lams/home.do?method=author
12:32:50,665 ERROR [STDERR] LoginRequestValve invoked
12:32:50,666 ERROR [STDERR] Request URI is /lams/j_security_check
12:32:50,748 ERROR [STDERR] After invoke Next
12:32:50,749 ERROR [STDERR] Status is 400:Invalid direct reference to form login page
12:32:50,749 ERROR [STDERR] Cookie:JSESSIONID::9AAC4FF0AAE67C4FD3171644C62368FF
12:32:50,749 ERROR [STDERR] Header:Set-Cookie
12:32:50,749 ERROR [STDERR] Value:0:JSESSIONID=9AAC4FF0AAE67C4FD3171644C62368FF; Path=/lams
12:32:50,750 ERROR [STDERR] Header:Content-Type
12:32:50,750 ERROR [STDERR] Value:0:text/html;charset=ISO-8859-1
12:32:50,750 ERROR [STDERR] Header:Content-Language
12:32:50,750 ERROR [STDERR] Value:0:en-US
12:32:50,750 ERROR [STDERR] Header:Transfer-Encoding
12:32:50,751 ERROR [STDERR] Value:0:chunked
12:32:50,751 ERROR [STDERR] Header:Date
12:32:50,751 ERROR [STDERR] Value:0:Tue, 10 Jan 2006 12:32:50 GMT
12:32:50,751 ERROR [STDERR] Header:Server
12:32:50,752 ERROR [STDERR] Value:0:Apache Coyote/1.0
It looks like my installation of tomcat is ignoring the note that you have set as after the redirect I am getting a new session.
The JSESSIONID is differnt on the first request and redirect so the Note is never picked up, hence Tomcat correctly thinks that the request is invalid.
This is using Safari on OSX. and before you ask, it works perfectly with every other Tomcat application that uses sessions,
I will check with Firefox to see what happens, just in case its an issue with the browser.
Posted by Ian Boston
|
|
|
23:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
01/10/06 06:56 AM |
|
Ok
Works with Firefox
Does not work with Safari
I suspect Safari does not store cookies on a redirect,
You might consider a http-meta to force the browser to store the cookie correctly.
There may be other browsers where this does not work.
To be clear,
The version of lams-valve.jar (check the md5sum above) in this thread works for Firefox 1.0.4 on OSX but does not work Safari 1.3 on OSX
With that caveat, I think this thread can be closed.
I will continue testing the integration in Firefox only to see if there are other problems.
BTW, Im seeing 60% cpu consumed by firefox permanently when the Flash environment comes up, with no server activity. Perhapse there is a loop running away in the flash editor ? (My Flash version is 7,0,24,0), or it might be a Flash plugin issue, but I havent seen the same with other flash sites.
Posted by Ian Boston
|
|
|
25:
Re: Re: Sakai - Lams integration Create problem
|
In response to 23
|
01/11/06 06:34 PM |
|
Hi Ian,
Safari is quite a case.
I have tested this with Safari 2.0.x (Mac 10.4.4) and it does work fine.
Also I just tested it using Safari 1.3.2 (v 312.5) on Mac 10.3.9 and it seems to work OK. I managed to create a sequence from scratch and then add it to a Sakai course.
Could it be some configuration in Safari?
Thanks,
Ernie
Posted by Ernie Ghiglione
|
|
|
24:
Re: Sakai - Lams integration Create problem
|
In response to 1
|
01/10/06 07:07 AM |
|
On last thing on this thread,
It would be really nice if it did work with Safari, as we have a significant number of users with Safari, and I wouldnt want to go throught the same process with a help desk operator !
Posted by Ian Boston
|
|