Reporting Problems

If you are trying to report a problem with LAMS on the LAMS Community, then please take 5 minutes to read these instructions. It looks like a lot to read, but a lot of it is step by step instructions so its not that bad.

The more detail you can give us about the problem, the faster we can suggest a solution.

Fail to fetch user data from external server:sakai - Unexpected return HTTP Status:401
org.lamsfoundation.lams.integration.UserInfoFetchException: Fail to fetch user data from external server:sakai - Unexpected return HTTP Status:401
at org.lamsfoundation.lams.integration.service.IntegrationService.getUserDataFromExtServer(IntegrationService.java:239)
at org.lamsfoundation.lams.integration.service.IntegrationService.createExtUserUseridMap(IntegrationService.java:177)
at org.lamsfoundation.lams.integration.service.IntegrationService.getExtUserUseridMap(IntegrationService.java:130)
at org.lamsfoundation.lams.integration.service.IntegrationService$$FastClassByCGLIB$$24924e31.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:6

Do not try to paste large bits of text from the logs straight into a message on the community website. This sometimes causes the server to have problems, and the LAMS teams won't get a email to say you have left a message on the community. So it will take longer for us to realise that you have a problem!

Attaching More Than One File To A Post

When you post a message on the LAMS Community, there is an option "Attach?" at the bottom of the page. Select  "Yes" and then when you click "Post" it will ask you attach the file.

But what if you want to attach more than one file? The trick is to click "Post" and upload one file as usual. When you get to the screen after the attachment screen (ie once the file is uploaded), click the back button in your browser and you will go back to the upload screen. You should be able to upload another file. You can keep attaching and hitting back multiple times.

Creating the DEBUG Logs

Turning On DEBUG

When you run the installer, the logging level is automatically set to INFO. To change the level of logging, do the following:

Original entry:

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
    <param name="Append" value="false"/>
    <param name="Threshold" value="INFO"/>              <--- Change this line
    ....
    </layout>
  </appender>

New entry:

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
    <param name="Append" value="false"/>
    <param name="Threshold" value="DEBUG"/>
    ....
    </layout>
  </appender>

Original entry:

<category name="org.lamsfoundation.lams" additivity="false">
    <priority value="INFO"/>                        <--- Change this line
    <appender-ref ref="LAMSFILE"/>
    <appender-ref ref="LAMSCONSOLE"/>
  </category>

New entry:

<category name="org.lamsfoundation.lams" additivity="false">
    <priority value="DEBUG"/>
    <appender-ref ref="LAMSFILE"/>
    <appender-ref ref="LAMSCONSOLE"/>
  </category>

How do you know if the change has worked? Have a look at the file <jboss>/server/default/log/lams.log. If you see entries with the word "DEBUG" in the third column, then the change has worked and the debugging messages are being written to the log.

For example:

14:57:01,515 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.integration.security.SingleSignOn - Process request for '/lams/index.jsp'
14:57:01,515 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.integration.security.SingleSignOn -  Checking for SSO cookie
14:57:01,515 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.web.filter.LocaleFilter - Locale set from server is en,AU

Which Files To Send?

Once debugging is turned on, please make the problem happen again. ie do whatever it was you have reported as a problem. Then go back to the <jboss>/server/default/log/ and then send us all the files in that directory that have been changed today. This should include the following files:

Why maybe lams.log.<some number> and hibernatelams.log.<some number>? If these logs get very long, then they start another log file and make the old one .1, .2, etc. That's why we only want today's files - the maybe a hibernatelams.log.7 still there from three weeks ago and that won't be any help. But a hibernatelams.log.1 that was created today may be helpful to sort out the problem.

If the problem relates to the Moodle integration then include Moodle's Apache log (from the Apache directory).

Please zip up the log files before sending as they can be very big.

Turning Off DEBUG

Once you have created the logs and posted them on the LAMS Community, or emailed them to whoever is doing your support, then you want to turn off the debugging again as it can slow down your LAMS server. If this is a bug that is difficult to reproduce, you can leave it in DEBUG mode until you have been able to reproduce the problem but on a large production system  you should not run in DEBUG for any longer than you have to.

To put it back to the original settings: