Εγκατάσταση του Wildfire για το LAMS


Added by Spyros Papadakis, last edited by Spyros Papadakis on Sep 16, 2008

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
Unknown macro: {snipedit}

Downloading Wildfire/Openfire

LAMS 2.0's chat tool uses the Wildfire chat server software to operate it's chat rooms. You can get away with using LAMS without a Wildfire server for LAMS, you just won't be able to do any actual chatting.

Wildfire has recently been renamed Openfire.

Installing Wildfire

For LAMS we recomend you get the Wildfire 2.6.2 version. This is an older version and cannot be found directly on the Wildfire/Openfire website, so please use the links below to download the software.

Windows

  • Wildfire v2.6.2 installer(includes JRE) The installer package is about 17 MB in size. This package is recommended if you just want to get set up and running quickly.
  • There's also a Wildfire v2.6.2 for Windows version without JRE. For those installing this version, please refer to Wildfire's installation documentation.
  • Wildfire 3.0 can also be used for LAMS on Windows, but you will need to check the troubleshooting page for various issues with the new version of Wildfire.

Linux, Mac OSX and others

If installing Wildfire onto Linux then we only support LAMS running with Wildfire 2.6.2.

  • Linux Wildfire v2.6.2 rpm
  • Mac OSX and others.

Configuring Wildfire

Once installed and running, you'll need to go to http://127.0.0.1:9090 and configure Wildfire via a few setup screens.

Make a note of the value you use for Wildfire's 'Domain' - this can be the IP or domain name of the Wildfire machine - as the value must be exactly the same when configuring LAMS' 'XmppDomain' value.

When asked about the Database Settings, set it to 'Embedded Database' for a quick setup.

Once you've finished the setup, login using the admin account you would have created, and make the following configuration changes:

Disable 'Show History'
In the History Settings under the Group Chat menu, set the option to 'Don't Show History'. This is important if you don't want duplicate messages to appear in the LAMS chat windows.
Wildfire 3.2+ - Disable HTTP Bind Service
If you must use a later version of Wildfire, note that by default Wildfire 3.2 has a HTTP Bind service that listens on port 8080 - if you haven't changed LAMS to use another port, then this will conflict. This service is not necessary for LAMS - disable it.

For convenience, you probably want to set Wildfire up as a service. The instructions for doing this are on the OpenFire website - the page refers to a newer version of Wildfire but they should work okay with version 2.6.2.

Troubleshooting

Error code 400 in chat window

As a sysadmin, check that the configuration setting XmppDomain in LAMS is set to the same name as ServerName in the Wildfire configuration. Specifying a different address will result in the client being disconnected immediately after login.

For example, if Wildfire resides on the local machine and the wildfire server is configured to lamsdev05, then the following will occur.

A javascript alert by JWChatAn Error Occured:
Code: 400
Type: Modify
Condition: bad-request

In the Wildfire logs the following will appear under the Warn and Debug tabs respectively2006.03.22 14:12:25 User tried to authenticate with this server using an unknown receipient:
<iq id="auth1" to="localhost" type="get" from="lamsdev05/f949d161">
<query xmlns="jabber:iq:auth">
<username>newuser</username>
</query>
</iq>
2006.03.22 14:12:25 User tried to authenticate with this server using an unknown receipient:
<iq id="auth2" to="localhost" type="set" from="lamsdev05/f949d161">
<query xmlns="jabber:iq:auth">
<username>newuser</username>
<resource>jwchat</resource>
<password>newpasswd</password>
</query>
</iq>
2006.03.22 14:12:25 Connect Socket[addr=/127.0.0.1,port=2775,localport=5222]
2006.03.22 14:12:25 Logging off lamsdev05/f949d161 on org.jivesoftware.wildfire.net.SocketConnection@1ef3a22
socket: Socket[addr=/127.0.0.1,port=2775,localport=5222]
session: org.jivesoftware.wildfire.ClientSession@511e0a
status: 1
address: lamsdev05/f949d161
id: f949d161 presence:
<presence type="unavailable"/>

Error code 401

If you are using an earlier version of Wildfire 3.0.x, you may get a '401 unauthorized' error when you try to connect to a chat room. You may also get these errors in the logs. We recommend using Wildfire 2.6.2 with LAMS for the moment.05:33:43,603 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.tool.chat.JabberHTTPBind.JHBServlet - starting doPost
05:33:43,605 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.tool.chat.service.ChatService - malformed presence xml: no from or to attributes present
05:33:43,606 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.tool.chat.JabberHTTPBind.JHBServlet -

Unknown macro: {2}

terminating session 8i2d8Mj3JppHVAW5e-8J8gBA

Jabber Server Chat Rooms Don't Match LAMS - Changing Jabber Server Breaks Existing Chat Sessions

If you have one Jabber server configured, start one or more lessons with a chat session and  learners log go into the chat rooms, and thenyou change the Jabber server to which LAMS is talking (i.e. change the XMPPServer in lams.xml) then all the existing chat sessions will break. Restarting LAMS will not fix the problem.

When the first learner goes into a chat room (either the first learner in a class in a chat activity or the first learner in a group for a grouped chat activity), a chat room is created on the Jabber server and the name of the chat room is stored in the database. Next time a student enters, LAMS sees that a room already exists (based on the database record) and doesn't bother recreating it.

If you then change the Jabber server that LAMS is using then LAMS will try to use a chat room that doesn't exist on the new Jabber server, and it won't try to create a new chat rom. You will just get the following in the client.Code: 401
Type: auth
Condition: not-authorized

To determine whether this is occuring on your system, look in the tl_lachat11_session table in the LAMS database. The name of the Jabber chat room is in the jabber_room column. Compare the values in this column with the chat rooms on your Jabber server.

If you are using Wildfire go to the Wildfire admin screen (usually http://servername:9090/) and then Room Summary (under Room Administration). You just need to compare the long horrible number (e.g. 1153106781681).

If the names of your chat rooms from the LAMS database do not appear in the room summary on the Wildfire server then your chat rooms don't match and the chat sessions for the non-matching entries cannot work.

Temporary fixes:

  • The easiest way is to start a new lesson. In the new lesson, the chat rooms should be created on the new server and so any new chat sessions should work. The old ones will remain broken.
  • If you really need to get the old chat sessions working, tl_lachat11_session.jabber_room = null in the database for the problem lessons. It must be null, not "". The next time a learner accesses the chat session a new chat room should be created on your new server.

If you try the temporary fixes and you still can't get a chat session to work then there must be another error.

This issue is documented in  LDEV-435 Chat rooms don't automatically move if switch jabber server

 Wildfire is hogging all my CPU cycles!

If you're running Wildfire while offline, Wildfire may be trying to connect to the internet to check for updates. To stop this, login to the admin console, click on 'Manage Updates', and select 'Disabled' under 'Service Enabled'.

Our chat entries appear twice in the chat window!

Login to the admin console, and click 'Group Chat'. Select 'History Settings', and select the option to 'Don't Show History'.

java.lang.IllegalStateException: Not connected to server

When connecting to a chat room, you may get a LAMS error page with the above error. The Wildfire's error.log may show this:2007.06.27 13:00:20 [org.jivesoftware.wildfire.net.SocketReader.negotiateTLS\(SocketReader.java:682\)] Error while negotiating TLS
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
...
2007.06.27 13:00:20 [org.jivesoftware.wildfire.net.SocketReader.run\(SocketReader.java:161\)] Connection closed before session established
Socket[addr=/127.0.0.1,port=36487,localport=5222]

warn.log may show this:2007.06.27 12:58:04 Stream error detected. Session: org.jivesoftware.wildfire.ClientSession@54824 status: 1 address: localhost/fae79c6a id: fae79c6a presence:
<presence type="unavailable"/>
org.dom4j.DocumentException: Cannot have text content outside of the root document

To get around this, login to Wildfire admin console. Under 'Server', 'Security Settings', change 'Client Connection Security' to 'Optional', and 'Not Available' for 'Old SSL Method' as well as 'TLS Method'. Click 'Save Settings'. (This is for Wildfire 2.6.2, later versions may have slightly different menu names).

Chat window doesn't show any users or new messages until I resume the lesson, and then it only shows past messages

Check that the LAMS 'XmppDomain' value exactly matches the value for 'Domain' in Wildfire's configuration.

Still having problems?

Post in the Technical forums in the LAMS Community.