Forum Problems Installing LAMS: Problems integrating LAMS and moodle "401 error"


 
You may request notification for Problems integrating LAMS and moodle "401 error".
Search: 

1: Problems integrating LAMS and moodle "401 error"
01/02/07 09:08 AM
[ Reply | Forward ]
Hi,

I am trying to establish a server running both moodle and lams. I have managed to successfully install moodle 1.7 and lams 1.0.2 but cannot seem to get the lams module to work in moodle. Each time I click on the "Create new sequence" button a window appears showing

HTTP Status 401 - Login Failed - authentication error

type Status report

message Login Failed - authentication error

description This request requires HTTP authentication (Login Failed - authentication error).
Apache Tomcat/4.1.24-LE-jdk14

I have the following installed:
OS ubuntu 6.0.6 server
PHP 5
apache 2
mysql 5
moodle 1.7
lams 1.0.7

I searched for others having similar problems and the common item seemed to be making sure the server_id/server_key are identical. I have checked this and they are definitely the same.

Also, I hope this isn't a dumb question but what is the server_id and how is it defined/created? is it simply a user created id similar to a user name???

Any help would be greatly appreciated.

PS Happy New Year :-)

Posted by Michael Reed

2: Re: Problems integrating LAMS and moodle "401 error"
In response to 1 01/02/07 09:57 AM
[ Reply | Forward ]
I changed the server_id from a numbers to letters and shortened the server_key to a word (identical on both moodle and lams!!!) now I get a 500 error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Fail to fetch user data from external server:eee - Unexpected return HTTP Status
at org.lamsfoundation.ld.security.web.LoginRequestServlet.doGet(LoginRequestServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.lamsfoundation.ld.security.valve.LoginRequestValve.invoke(LoginRequestValve.java:80)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

root cause

java.lang.Exception: Fail to fetch user data from external server:eee - Unexpected return HTTP Status
at com.webmcq.ld.ws.UserManagementServiceDelegate.getUserDataFromExtServer(UserManagementServiceDelegate.java:355)
at com.webmcq.ld.ws.UserManagementServiceDelegate.getUserDataAndCreateUser(UserManagementServiceDelegate.java:297)
at org.lamsfoundation.ld.security.web.LoginRequestServlet.doGet(LoginRequestServlet.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.lamsfoundation.ld.security.valve.LoginRequestValve.invoke(LoginRequestValve.java:80)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)

Apache Tomcat/4.1.24-LE-jdk14

Posted by Michael Reed

3: Re: Re: Problems integrating LAMS and moodle "401 error"
In response to 2 01/02/07 05:27 PM
[ Reply | Forward ]
Have you checked your Apache error log (if that's what you used for Moodle)?

I've found that in the Moodle release you may need to include Moodle's config.php manually in the lams module's lib.php. i.e., at the top of moodle/mod/lams/lib.php, put the line
require_once('/path/to/moodle/config.php');

> Also, I hope this isn't a dumb question but what is the server_id and how is it defined/created? is it simply a user created id similar to a user name???

That's pretty much it. server_key is the password.

Posted by Jun-Dir Liew

4: Re: Re: Re: Problems integrating LAMS and moodle "401 error"
In response to 3 01/02/07 10:14 PM
[ Reply | Forward ]
Thanks for the quick reply. I added the line to the lib.php file and again checked that everything matched properly.

I now get this error appearing in a pink box on the lams module screen as the module is started:

An unexpected error returned from LAMS server:soapenv:Server.userException: java.rmi.RemoteException: Fail to fetch user data from external server:eee - Unexpected return HTTP Status; nested exception is: java.lang.Exception: Fail to fetch user data from external server:eee - Unexpected return HTTP Status! Please contact your administrator.

The last line of the apache error.log file says "[time] [error] [url] File does not exist: /var/www/mod"

Thanks for your help

Posted by Michael Reed

6: Re: Re: Re: Re: Problems integrating LAMS and moodle "401 error"
In response to 4 01/02/07 10:32 PM
[ Reply | Forward ]
It works... YAY :-)

I changed the address in the lams database to url/moodle/mod.... and it worked!!!

Thanks for your assistance with my dramas...

Posted by Michael Reed

7: Re: Re: Re: Re: Re: Problems integrating LAMS and moodle "401 error"
In response to 6 01/02/07 10:35 PM
[ Reply | Forward ]
Ah that makes sense, it was in the callback url! Glad to hear you got it worked out.

Posted by Jun-Dir Liew

5: Re: Re: Re: Re: Problems integrating LAMS and moodle "401 error"
In response to 4 01/02/07 10:34 PM
[ Reply | Forward ]
> The last line of the apache error.log file says "[time] [error] [url] File does not exist: /var/www/mod"

I'm guessing Moodle is installed in /var/www... but not sure why this error comes up? Is it possible you've made a syntax error in one of the php files?

Posted by Jun-Dir Liew

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