Forum Problems Installing LAMS: Moodle : odd behaviour (502 error - no trusted certificate)


 
You may request notification for Moodle : odd behaviour (502 error - no trusted certificate).
Search: 

1: Moodle : odd behaviour (502 error - no trusted certificate)
04/26/06 05:32 AM
[ Reply | Forward ]
I've installed LAMs and the moodle-lams interface.

When I'm logged into moodle as the admin user, everything behaves fine.

When I log in with any other account that has admin privileges I get a red error box saying :

"An unexpected error returned from LAMS server ... No trusted certificate found!".

If this is a keystore problem, why doesn't the moodle admin account encounter it too? (And if it is a keystore problem, how do I add the keystore to LAMs)?

Thanks.

Posted by Chris Gibson

2: Re: Moodle : odd behaviour (502 error - no trusted certificate)
In response to 1 04/26/06 08:17 PM
[ Reply | Forward ]
Are you using SSL? I tested the lams module using a user with admin privileges but had no problems (non-SSL Apache).

Do you have a record of the 502 error you received? What action were you doing when you got the 502 error? e.g. loading the 'add a new lams activity' window for the first time, opening an author window, etc.

If you could attach the Apache and LAMS access logs, and any errors, that might help.

Logs for LAMS: $JBOSS_HOME\server\default\log\localhost_access{date}.log, server.log, lams.log

Cheers,

Posted by Jun-Dir Liew

3: Re: Moodle : odd behaviour (502 error - no trusted certificate)
In response to 1 04/27/06 08:32 AM
[ Reply | Forward ]
Yes, using ssl.

Moodle and Lams are running on the same server (set up following Clive Gould's blog).

The red error box appeared in moodle as soon as I entered the lams pages ('add lams' from the activities drop down), and stays if I try to "refresh sequence list". I figured out it was a 502 by looking at the moodle code for that page.

The full text of the red box is :

"An unexpected error returned from LAMS server:soapenv:Server.userException: java.rmi.RemoteException: sun.security.validator.ValidatorException: No trusted certificate found; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found! Please contact your administrator."


If I try to "create new sequence" I get a 500 error on the pop-up:
"javax.servlet.ServletException: sun.security.validator.ValidatorException: No trusted certificate found
at org.lamsfoundation.ld.security.web.LoginRequestServlet.doGet(LoginRequestServlet.java:165)

----------
lots of this
----------

root cause

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)

.... etc"

Hopefully I'll figure out how to attach the logs...

Posted by Chris Gibson

Attachments:
4: Re: Re: Moodle : odd behaviour (502 error - no trusted certificate)
In response to 3 04/27/06 03:29 PM
[ Reply | Forward ]
Hi Chris,

> Moodle and Lams are running on the same server

There's really no need to try to run the webservices communication over SSL if both applications are running on the same server.

SSL becomes handy when you need to ensure that data is transmitted securely across networks. But if both apps are in the same server, SSL is just plain overhead as you are encrypted and decrypting the data packages purposely because the data never 'leaves' the server.

The errors that you are getting are happening when the webservices call tries to exchange the certificates or keys to do the handshake (here's more info on how this works). Just like your browser does when you connect to an webserver over SSL, it exchange certificates to begin the encryption... in this case, it seems to me that when Moodle is connecting to LAMS over SSL, the same exchange of certificates is attempting to happen... and it seems that it isn't working there.

I really have no experience running webservices over SSL, but since you are running both in the same server, it might just be easy to run the webservices over normal http instead of https. Can you give this a try?

Thanks,

Ernie

Posted by Ernie Ghiglione

5: Re: Moodle : odd behaviour (502 error - no trusted certificate)
In response to 1 04/28/06 09:16 AM
[ Reply | Forward ]
OK, taking them out of SSL makes it work better thank you.

Users can now create new LAMS sequeces (getting into LAMS via moodle), but there's nothing in the 'workspace' or 'sequence' drop downs.

I think I've seen that problem in the forums somewhere, so hopefully I'll be able to figure that one out.

Thanks.

Posted by Chris Gibson

Reply to first post on this page
Back to Problems Installing LAMS