Saturday, 24 October 2009

DSpace, LAMS, OpenSim and Mahara install on CentOS

There are five blogs in this series.

Please select the link below as required:-

DSpace Install Blog

LAMS Install Blog

Mahara Install Blog

OpenSim Install Blog

Server Syncronisation Blog

OpenSim Blog Navigation Menu

Menu

1) Upgrading OpenSim

2) OpenSim install on Centos 5.x

3) Using the Diva Distribution

Thursday, 15 October 2009

Upgrading OpenSim

1) Upgrading OpenSim

Upgrading from 0.6.7 to 0.6.8

I have just upgraded a standalone installation of OpenSim from 0.6.7 to 0.6.8

The process I followed is outlined below:

Login as user opensim and to be on the safe side backup the existing database:

[opensim@standbyvle ~]$ mysqldump -u root -p --opt opensim > opensim.0.6.7.2009-12-25

Download and unpack the latest release:

[opensim@standbyvle ~]$ lynx http://dist.opensimulator.org/opensim-0.6.8-release.tar.gz
[opensim@standbyvle ~]$ tar -xzvf opensim-0.6.8-release.tar.gz

Change directory and build OpenSim:

[opensim@standbyvle ~]$ cd opensim-0.6.8-release
[opensim@standbyvle opensim-0.6.8-release]$ ./runprebuild.sh
[opensim@standbyvle opensim-0.6.8-release]$ nant

Make a copy of the new OpenSim.ini.example as OpenSim.ini, perform a line by line comparison with OpenSim.ini as customised for use with version 0.6.7 and modify the clean copy of OpenSim.ini appropriately. (I actually spent some time stripping all the comments from the clean copy of OpenSim.ini to make it more manageable).

[opensim@standbyvle opensim-0.6.8-release]$ cd bin
[opensim@standbyvle bin]$ cp OpenSim.ini.example OpenSim.ini
[opensim@standbyvle bin]$ nano OpenSim.ini

Additionally to overcome problems with "grey" avatars and inventory control, ensure that the following parameters are included in OpenSim.ini:

[Startup]
hypergrid = true

[Network]
; change to reflect your external IP address
user_server_url = "http://195.194.82.16:9000"
asset_server_url = "http://195.194.82.16:9000"
inventory_server_url = "http://195.194.82.16:9000"
grid_server_url = "http://195.194.82.16:9000"

[Architecture]
Include-HGStandalone = "config-include/StandaloneHypergrid.ini"

After customising OpenSim.ini it is also necessary to examine and customise certain files in the config-include directory:

[opensim@standbyvle bin]$ cd config-include
[opensim@standbyvle config-include]$ cp StandaloneCommon.ini.example StandaloneCommon.ini
[opensim@standbyvle config-include]$ cp CenomeCache.ini.example CenomeCache.ini

Edit StandaloneCommon.ini and set up the [Database Service] parameters to use MySQL:

[opensim@standbyvle config-include]$ nano StandaloneCommon.ini

Note that for a standalone installation none of the other .example files in the config-include directory are required. The required contents of config-include for a standalone installation are show below:

[opensim@standbyvle config-include]$ ls
CenomeCache.ini StandaloneCommon.ini StandaloneHypergrid.ini

Copy over the necessary files from 0.6.7:

Please note that some of the files copied below are specific to our installation of OpenSim.

[opensim@standbyvle config-include]$ cd
[opensim@standbyvle ~]$ cp opensim-0.6.7-release/bin/Regions/Regions.ini opensim-0.6.8-release/bin/Regions
[opensim@standbyvle ~]$ cp opensim-0.6.7-release/bin/Regions/Regions.ini.* opensim-0.6.8-release/bin/Regions
[opensim@standbyvle ~]$ cp opensim-0.6.7-release/bin/*.bmp opensim-0.6.8-release/bin
[opensim@standbyvle ~]$ cp opensim-0.6.7-release/bin/*.png opensim-0.6.8-release/bin

Start 0.6.8:

[opensim@standbyvle ~]$ cd opensim-0.6.8-release/bin
[opensim@standbyvle bin]$ mono OpenSim.exe

And to my surprise 0.6.8 successfully started :)


Getting Diva's Libraries working

This requires the use of git to fetch the latest HEAD for OpenSim 0.6.9(dev) as the library feature is not available with 0.6.8.

[opensim@standbyvle ~]$ cd git
[opensim@standbyvle git]$ rm -rf opensim
[opensim@standbyvle git]$ git clone git://opensimulator.org/git/opensim
Initialized empty Git repository in /home/opensim/git/opensim/.git/
remote: Counting objects: 141938, done.
remote: Compressing objects: 100% (39087/39087), done.
remote: Total 141938 (delta 109292), reused 129516 (delta 99488)
Receiving objects: 100% (141938/141938), 111.56 MiB | 556 KiB/s, done.
Resolving deltas: 100% (109292/109292), done.

[opensim@standbyvle git]$ cd opensim
[opensim@standbyvle opensim]$ git reset --hard ########
HEAD is now at 2205d1c... Merge branch 'master' of
ssh://MyConnection/var/git/opensim

[opensim@standbyvle ~]$ cp -pr /home/opensim/git/opensim /home/opensim/opensim-0.6.9-pre-release
[opensim@standbyvle ~]$ cd /home/opensim/opensim-0.6.9-pre-release

It is then necessary to follow the upgrade procedure detailed elsewhere in this blog.

Add add the following parameters to OpenSim.ini:

[Modules]
LibraryModule = true

[LibraryModule]
LibraryName = "OpenSim Library (Diva)"

Download the Diva libraries and save the files in the bin/Library folder. These can be obtained by upgrading the latest Diva distribution and copying over the .iar files. A larger object collection is also avaliable for download from the github site. For more information visit: http://www.metaverseink.com/blog/?p=29

The contents of the library folder are shown below:

[opensim@standbyvle bin]$ ls Library
Clothing Library (small).iar Objects_Library__large_.iar Objects Library (small).iar

When OpenSim is started the contents of the .iar files are automatically unpacked and incorporated into the inventory structure.


Upgrading Mono

Once I had a lot of objects/scripts rezzed I encountered segmentation errors when shutting down the simulator. This was solved thanks to reply to a posting by Jane Foxclaw.

The solution was to upgrade the version of mono we were using to 2.4.2.3

The upgrade process is outlined below:

Login as user opensim and use the following commands:

[opensim@standbyvle ~]$ lynx http://ftp.novell.com/pub/mono/archive/2.4.2.3/sources/
[opensim@standbyvle ~]$ tar -jxvf libgdiplus-2.4.2.tar.bz2
[opensim@standbyvle ~]$ cd libgdiplus-2.4.2
[opensim@standbyvle libgdiplus-2.4.2] ./configure --prefix=/home/opensim/bin/mono
[opensim@standbyvle libgdiplus-2.4.2] make
[opensim@standbyvle libgdiplus-2.4.2] make install
[opensim@standbyvle libgdiplus-2.4.2] cd ..
[opensim@standbyvle ~]$ lynx http://ftp.novell.com/pub/mono/archive/2.4.2.3/sources/
[opensim@standbyvle ~]$ tar -jxvf mono-2.4.2.3.tar.bz2
[opensim@standbyvle ~]$ cd mono-2.4.2.3
[opensim@standbyvle mono-2.4.2.3]$ ./configure --prefix=/home/opensim/bin/mono
[opensim@standbyvle mono-2.4.2.3]$ make
[opensim@standbyvle mono-2.4.2.3]$ make install
[opensim@standbyvle mono-2.4.2.3] cd ..
[opensim@standbyvle ~]$ mono -V

Mono JIT compiler version 2.4.2.3 (tarball Sun Jan 17 19:22:13 GMT 2010)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none



Upgrading from 0.6.6 to 0.6.7

I have just upgraded a standalone installation of OpenSim from 0.6.6 to 0.6.7

The process I followed is outlined below:

Login as user opensim and to be on the safe side backup the existing database:

[opensim@standbyvle ~]$ mysqldump -u root -p --opt opensim > opensim.0.6.6.2009-10-15

Download and unpack the latest release:

[opensim@standbyvle ~]$ lynx http://dist.opensimulator.org/opensim-0.6.7-release.tar.gz
[opensim@standbyvle ~]$ tar -xzvf opensim-0.6.7-release.tar.gz

Change directory and build OpenSim:

[opensim@standbyvle ~]$ cd opensim-0.6.7-release
[opensim@standbyvle opensim-0.6.7-release]$ ./runprebuild.sh
[opensim@standbyvle opensim-0.6.7-release]$ nant
[opensim@standbyvle opensim-0.6.7-release]$ cd ..

Copy over the necessary files from 0.6.6:

Please note that some of the files copied below are specific to our installation of OpenSim. Also be careful in just copying over OpenSim.ini from version 0.6.6 as there are some new parameters added to OpenSim.ini.example in version 0.6.7, which you may want to append to the existing configuration file.

[opensim@standbyvle ~]$ cp opensim-0.6.6-release/bin/OpenSim.ini opensim-0.6.7-release/bin
[opensim@standbyvle ~]$ cp opensim-0.6.6-release/bin/Regions/Regions.ini opensim-0.6.7-release/bin/Regions
[opensim@standbyvle ~]$ cp opensim-0.6.6-release/bin/Regions/Regions.ini.* opensim-0.6.7-release/bin/Regions
[opensim@standbyvle ~]$ cp opensim-0.6.6-release/bin/*.bmp opensim-0.6.7-release/bin
[opensim@standbyvle ~]$ cp opensim-0.6.6-release/bin/*.png opensim-0.6.7-release/bin

Start 0.6.7:

[opensim@standbyvle ~]$ cd opensim-0.6.7-release/bin
[opensim@standbyvle bin]$ mono OpenSim.exe

And to my surprise 0.6.7 successfully started and to my even greater surprise when I logged in from the client I found megaregions had been enabled by default. However the total prim count in About Land is still listed as 15000 even though I have 4 sims in a 512x512 grid.


Using git to fetch the 0.6.7 post release

Getting fed up with flailing arms on 0.6.7 I decided to install git and use it to fetch the 0.6.7 post release, which has Teravus's and Kitto's fix installed.

The first setp was to install git as the root user. The following commands were used to download and install git:

[root@standbyvle ~]# lynx http://centos.karan.org/el5/extras/testing/x86_64/RPMS/perl-Error-0.17008-1.el5.kb.noarch.rpm
[root@standbyvle ~]# lynx http://kernel.org/pub/software/scm/git-core/testing/git-1.5.6.rc3-1.i386.rpm
[root@standbyvle ~]# lynx http://kernel.org/pub/software/scm/git-core/testing/perl-Git-1.5.6.rc3-1.i386.rpm
[root@standbyvle ~]# lynx http://kernel.org/pub/software/scm/git-core/testing/git-core-1.5.4.rc5-1.i386.rpm
[root@standbyvle ~]# rpm -ivh --force --nodeps perl-Error-0.17008-1.el5.kb.noarch.rpm
[root@standbyvle ~]# rpm -ivh --force --nodeps git-1.5.6.rc3-1.i386.rpm
[root@standbyvle ~]# rpm -ivh --force --nodeps perl-Git-1.5.6.rc3-1.i386.rpm
[root@standbyvle ~]# rpm -ivh --force --nodeps git-core-1.5.4.rc5-1.i386.rpm
[root@standbyvle ~]# git --version
git version 1.5.4.rc5

I then asked our network manager to open open tcp port 9418 inbound and outbound to the Internet so that git could fetch the contents of the remote repository.

It was then necessary to become the opensim user and use git to fetch the required release:

[opensim@standbyvle ~]$ mkdir git
[opensim@standbyvle ~]$ cd git
[opensim@standbyvle git]$ git clone git://opensimulator.org/git/opensim
[opensim@standbyvle git]$ cd opensim
[opensim@standbyvle opensim]$ git checkout -b 0.6.7-post-fixes origin/0.6.7-post-fixes
[opensim@standbyvle opensim]$ git checkout origin/0.6.7-post-fixes
HEAD is now at a9da278... * Fix incorrect math on the Velocity check in PhysicsCollisionUpdate. This may reduce avatar flailing.
[opensim@standbyvle opensim]$ cp -pr /home/opensim/git/opensim /home/opensim/opensim-0.6.7-post-release
[opensim@standbyvle ~]$ cd opensim-0.6.7-post-fixes

I then went ahead to run with the upgrade procedure outlined above. I was delighted to find that when I logged in the flailing arms problem had gone away :)


Getting XML-RPC working

Initially I couldn't get XMLRPC calls from an external Web Server to a scripted object in OpenSim to work.

This was eventually solved by following the steps below:


1) Enable the following parameters in OpenSim.ini

[NETWORK]
remoteDataPort = 20800
ExternalHostNameForLSL=standbyvle.bromley.ac.uk


[XMLRPC]
XmlRpcRouterModule = "XmlRpcRouterModule"
XmlRpcPort = 20800



2) As the root user upgrade PEAR on the Webserver running the PHP code and use PEAR to install XML_RPC2

[root@standbyvle ~]# pear upgrade --force pear
[root@standbyvle ~]# pear install XML_RPC2


3) Use appropriate syntax in the Webserver PHP script.

Note that this script is specific to my particular implementation and will need modification before it is used elsewhere.


require_once('XML/RPC2/Client.php');

$conn=@mysql_connect("localhost", "yyyyyyyy", "xxxxxxxx")
or die("Err:Conn");

$rs=@mysql_select_db("sl", $conn)
or die("Err:Db");

$sql="select * from key_table where region = '$region'";

$rs=mysql_query($sql,$conn);

while( $row = mysql_fetch_array($rs) )
{
$channel=$row["lslkey"];
}

if ($action == 'delete')
{
$sql1="delete from key_table where lslkey = '$channel'";
$rs1=mysql_query($sql1,$conn);
}

$intval="2010";

// Create the client with the target uri
$client = XML_RPC2_Client::create('http://standbyvle.bromley.ac.uk:20800');

// an array with the data for our call to the channel in the simulator
$llPacket = array(
'Channel' => $channel,
'IntValue' => $intval,
'StringValue' => $action);

// call the rpc to get a response
$xresponse = $client->llRemoteData($llPacket);

// print the contents of the array in the browser window;
print_r ($xresponse);
?>



Return to Menu

Sunday, 4 October 2009

OpenSim install on Centos 5.x

2) OpenSim install on Centos 5.x


This blog was written after installing OpenSim 0.66 on a CentOS 5.3 box. The simulator was set up to run in standalone mode.

Note that this process will only work for CentOS 5.3 - I tried it with CentOS 4.x and could not get past installing mono v2.4 base because of failed dependencies.

The process I followed was as follows:

Muuch of the initial information came from the following posting:

http://www.osgrid.org/forums/viewtopic.php?f=14&t=1603&start=0

To be on the safe side login as root and remove any existing outdated packages:

[root@vleinternal ~]# yum erase libgdiplus libgdiplus.i386 libgdiplus-devel.i386 mod_mono.i386 mono-core.i386 mono-data.i386 mono-data-firebird.i386 mono-data-oracle.i386 mono-data-postgresql.i386 mono-data-sqlite.i386 mono-data-sybase.i386 mono-devel.i386 mono-extras.i386 mono-jscript.i386 mono-locale-extras.i386 mono-nunit.i386 mono-nunit-devel.i386

Removed: libgdiplus.i386 0:1.2.5-1.el5.centos

The next step is to make sure the following required packages are installed:

[root@vleinternal ~]# yum install libtool.i386 libpng.i386 libpng-devel.i386 libjpeg.i386 libjpeg-devel.i386 libtiff.i386 libtiff-devel.i386 libexif.i386 libexif-devel.i386 giflib.i386 giflib-devel.i386 bison.i386 bison-devel.i386 automake.noarch autoconf.noarch make.i386 gcc.i386 gtk+.i386 subversion.i386 libX11-devel.i386 freetype.i386 freetype-devel.i386 gettext.i386 glib* fontconfig-devel.i386

Installed: bison-devel.i386 0:2.3-2.1 giflib-devel.i386 0:4.1.3-7.1.el5_3.1 glib-devel.i386 1:1.2.10-20.el5 glib-java-devel.i386 0:0.2.6-3.fc6 glibc-utils.i386 0:2.5-34.el5_3.1 gtk+.i386 1:1.2.10-56.el5 libexif-devel.i386 0:0.6.13-4.0.2.el5_1.1 libjpeg-devel.i386 0:6b-37 libtiff-devel.i386 0:3.8.2-7.el5_3.4
Dependency Installed: gdk-pixbuf.i386 1:0.22.0-25.el5


Just to be on the safe side reboot the server at this point:

[root@vleinternal ~]# reboot

Broadcast message from root (pts/0) (Tue Sep 8 09:53:46 2009):
The system is going down for reboot NOW!


Log back in as root and create an account for user opensim:

[root@vleinternal ~]# useradd opensim
[root@vleinternal ~]# passwd opensim

Become the opensim user:

[root@vleinternal ~]# su - opensim

Download, build and install the latest version of libgdiplus:

[opensim@vleinternal ~]$ lynx http://mono.ximian.com/monobuild/snapshot/sources-trunk/
[opensim@vleinternal ~]$ tar -jxvf libgdiplus-140293.tar.bz2
[opensim@vleinternal ~]$ cd libgdiplus-140293
[opensim@vleinternal libgdiplus-140293]$ ./configure --prefix=/home/opensim/bin/mono

Configuration summary

* Installation prefix = /home/opensim/bin/mono
* Cairo = 1.6.4 (internal)
* Text = cairo
* EXIF tags = yes
* Codecs supported:

- TIFF: yes
- JPEG: yes
- GIF: yes
- PNG: yes
NOTE: if any of the above say 'no' you may install the
corresponding development packages for them, rerun
autogen.sh to include them in the build.


[opensim@vleinternal libgdiplus-140293]$ make
[opensim@vleinternal libgdiplus-140293]$ make install
[opensim@vleinternal libgdiplus-140293]$ cd ..

Download, build and install mono as follows:

(Kishore has kindly pointed out that the mono check out version can be the most recent version from the repository. It need not be the version number stated below. Subsequent to this posting I ended up using mono-2.4.2.3 and the associated version of libgdiplus, which I downloaded from http://ftp.novell.com/pub/mono/archive/2.4.2.3/sources/ )

[opensim@vleinternal ~]$ lynx http://mono.ximian.com/monobuild/snapshot/sources-trunk/
[opensim@vleinternal ~]$ tar -jxvf mono-140267.tar.bz2
[opensim@vleinternal ~]$ cd mono-140267
[opensim@vleinternal mono-140267]$ ./configure --prefix=/home/opensim/bin/mono
[opensim@vleinternal mono-140267]$ make

Mono complilation takes about half an hour so go away and take a break ;)

[opensim@vleinternal mono-140267]$ make install
[opensim@vleinternal mono-140267]$ cd ..

Edit .bashrc and add the following lines

[opensim@vleinternal ~]$ nano .bashrc

export PATH="/home/opensim/bin/mono/bin:$PATH"
export PKG_CONFIG_PATH="/home/opensim/bin/mono/lib/pkgconfig:$PKG_CONFIG_PATH"
export MANPATH="/home/opensim/bin/mono/share/man:$MANPATH"
export LD_LIBRARY_PATH="/home/opensim/bin/mono/lib:$LD_LIBRARY_PATH"
export MONO_THREADS_PER_CPU=75
export PATH="/home/opensim/bin/mono/:$PATH"

Relog as user opensim

[opensim@vleinternal ~]$ logout
[root@vleinternal ~]# su - opensim

Check that mono is working:

[opensim@vleinternal ~]$ mono -V
Mono JIT compiler version 140267 (tarball Tue Sep 8 10:41:51 BST 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none


Now download and install the nant tool:

[opensim@vleinternal ~]$ wget http://downloads.sourceforge.net/nant/nant-0.85-bin.tar.gz
[opensim@vleinternal ~]$ tar -xzvf nant-0.85-bin.tar.gz -C /home/opensim/bin/mono/

Create a shell script to start nant containing the following lines:

[opensim@vleinternal ~]$ nano /home/opensim/bin/mono/nant

mono /home/opensim/bin/mono/nant-0.85/bin/NAnt.exe

Make it executable and check the nant script is working:

[opensim@vleinternal ~]$ chmod +x /home/opensim/bin/mono/nant
[opensim@vleinternal ~]$ nant

NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

BUILD FAILED

Could not find a '*.build' file in '/home/opensim'

For more information regarding the cause of the build failure, run the build again in debug mode.

Try 'nant -help' for more information


Nant and mono have now been successfully installed for user opensim.

Once all was up and running went over to http://opensimulator.org/wiki/Build_Instructions and created database for opensim as root and then as user opensim, downloaded and built opensim in /home/opensim/

Creating the database:

[root@vleinternal ~]# mysql -u root -p
mysql> create database opensim;
mysql> create user 'opensim'@'localhost' identified by 'xxxxxxxx';
mysql> grant all on *.* to 'opensim'@'localhost';
mysql> quit

Installing OpenSim:

[root@vleinternal ~]# su - opensim
[opensim@vleinternal ~]$ lynx http://opensimulator.org/wiki/Download
[opensim@vleinternal ~]$ tar -xzvf opensim-0.6.6-release.tar.gz
[opensim@vleinternal ~]$ cd opensim-0.6.6-release
[opensim@vleinternal opensim-0.6.6-release]$ ./runprebuild.sh
[opensim@vleinternal opensim-0.6.6-release]$ nant

BUILD SUCCEEDED

Total time: 151.4 seconds.


Configuring and starting OpenSim:

[opensim@vleinternal opensim-0.6.6-release]$ cd bin
[opensim@vleinternal opensim-0.6.6-release]$ mv OpenSim.ini.example OpenSim.ini
[opensim@vleinternal opensim-0.6.6-release]$ nano OpenSim.ini
[opensim@vleinternal opensim-0.6.6-release]$ mono OpenSim.exe


Once OpenSim was installed I came across serveral problems:

1) Getting the mysql configuration for OpenSim.ini right. The default configuration was for sqllite and there were quite a few directives that needed to be commented in and out before OpenSim would start using mysql successfuly. I found myself using PHPMyAdmin and dropping all the tables in the opensim database several times and rebuilding opensim.

2) Getting MySQL working. Once I uncommented the directive StorageProvider = "OpenSim.Data.MySQL.dll" in OpenSim.ini it was also necessary to add a corresponding ConnectionString directive as shown below:

[DatabaseService]
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=zzzzz;";

3) Getting the Regions.ini file right. This file is created the first time that mono Opensim.exe is run. Unfortunately I had specified the internal IP address of the server and this resulted in the UDP region handshake failing. After advice from Paul Fishwick and Trevarus Ovares on the opensim user mailing list I used 0.0.0.0 for the InternalAddress and 195.194.82.16 for the ExternalHostName and I was able to login remotely using the Hippo client. The final working version is shown below:

[opensim@standbyvle Regions]$ pwd
/home/opensim/opensim-0.6.6-release/bin/Regions
[opensim@standbyvle Regions]$ cat Regions.ini
[Bromley]
RegionUUID = 7613b3c8-39ea-42ed-bfef-e09d34f997e9
Location = 1000,1000
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = 195.194.82.16
MasterAvatarFirstName = Estate
MasterAvatarLastName = Owner
MasterAvatarSandboxPassword = ******

Note: For the ExternalHostName parameter we used the external IP address that the server was accessible on from the Internet. An FQDN will NOT work in the ExternalHostName parameter.

4) Configuring the Hippo client. Installation under Windows Vista was straightforward and the client looked very much like the SL viewer. There was an additional button called Grids. I typed in the URL for the standbyvle server into the Login URI box i.e. http://standbyvle.bromley.ac.uk:9000/ and clicked on the Get Grid info button. The settings for Grid name and Grid nickname were fetched from the server (as specified in OpenSim.ini). It was then just a question of choosing the named grid and clicking on the default button. (Please see note 9 below for information on the Meerkat viewer)

5) Logging in for the first time. I could not initially log on as the master avatar and had to create another avatar account from the OpenSim prompt using the create user command. Once I had created that account and logged on and off the Hippo client using it, I found I could then log on using the master avatar account, which has full control over the land permissions.

6) Getting Physics Working. Initially physics wouldn't work properly. I solved this by changing the physics engine in OpenSim.ini from basicphysics to ODE as shown below and restarting the simulator.

; Choose one of the physics engines below
;physics = basicphysics
;physics = POS
physics = OpenDynamicsEngine
;physics = modified_BulletX

7) MySQL Problems. Additionally I had a problem with agent login failing first thing in the morning. This turned out to be down to a timed backup script stopping and starting mysql around 4 am, whilst OpenSim was still running. As soon as this script was turned off the login problems disappeared :)

8) Object Permissions. By default permissions were turned off, which potentially meant that students could copy each others work. This was easily corrected by changing the following parameter in OpenSim.ini and restarting the simulator.

serverside_object_permissions = true

9) Copying objects from Secondlife to OpenSim. I had initially been using the Hippo viewer, but have now found the Meerkat viewer, which in my opinion is much more fully featured. Meerkat also allows you to copy objects that you have full permissions on directly from Secondlife into Opensim (and vice versa). This is easily achieved by logging into SL using Meerkat, right clicking on the object you wish to copy choosing More> More> Backup from the round menu. Using the Browse option, create a directory on your local hard drive where you then save the objects xml description and texture(s). Change grid to OpenSim and choose viewer top toolbar menu File > Import > Upload textures + Import. Load the object xml file from where you saved it and the object magically appears in front of you in OpenSim :D

10) Frozen Avatar. We have two servers running OpenSim. On one I could connect from the client and use the simuator with no problems. On the second I could connect from the client, but then the avatar remained frozen in a T position. After extensive investigation, it turned out eventually to be an issue with our institutional ISA firewall that was dropping the UDP connection on port 9000 between client and server after login. Once the firewall tunnel settings were amended the second server worked fine.

11) Changing the master avatar user I wanted to change the name of the user who was master avatar for a particular region. With the help of kind advice from the opensim users mailing list this eventually turned out to be quite simple (duh!) It was just a case of changing the name of the master avi user in Regions.ini, restaring the sim, logging on using the new master avatar user account and reclaiming the land from the previous owner. (About Land > Reclaim Land...)

12) Missing prims A colleague of mine, Barry Spencer, had been experimenting with physical rocketry in OpenSim. The scripted rockets usually returned to their launch pad once they reached a certain height. Unfortunately for reasons unknown some rockets just disappeared. When I checked the prims table in the opensim database (which contains a record for every individual prim) I found some of the rocket prims were at impossible heights and rotations (both positive and negative!). I managed to remove the rogue prims as follows:

i) Stop the client and the simulator
ii) Use PHPMyAdmin to look at the prims table in the database and locate anything that was well out of position
iii) Delete the rows in the prims table in the database corresponding to these "rogue" prims
iv) Restart MySQL, start the simulator and the client in that order.

It appears that if you have the simulator running and try to delete rows from the prims table in the database it re-creates them as soon as your back is turned!

13) Loading a new terrain file As an experiment I wanted to try out loading a terrain file. I found a suitable image using the following URL:

http://www.virtualwhite.com/wp-content/uploads/2008/07/os_terrain_8.png

I uploaded the image to the opensim-0.6.6-release/bin directory, However when I issued the terrain load command at the console I got the following message:

Region (Rookery) # terrain load os_terrain_8.png

** (./OpenSim.exe:5430): WARNING **: PNG images with 16bpp aren't
supported by libgdiplus.
06:35:19 - Command error: System.NotSupportedException: Either the
image format is unknown or you don't have the required libraries to
decode this format [GDI+ status: UnknownImageFormat]


The solution turned out to be to use imagemagick as user opensim to convert the filetype from .png to .bmp as follows:

[opensim@standbyvle bin]$ convert os_terrain_8.png os_terrain_8.bmp

The .bmp file loaded successfully into the console and I now have a new mountainous terrain in my sim :)

In retrospect it looks as it there was something wrong with the format of the os_terrain_8.png file as subsequently I have successfully downloaded and loaded some .png format terrain files.

I found a number of useful 256x256 terrain files that worked first time on the following site:

http://opensimulator.org/wiki/Free_Terrains

I was especially pleased to see that I could load a new terrain in the OpenSim server and the change would immediately be applied in the client without having to relog :)

14) Creating New Regions I have just added three new regions to our standalone installation of OpenSim on our test server. I can now login to the original region using the client and then fly or teleport between regions.

The help menu suggested that region data should be saved in xml region file, but apparently this has been deprecated and all region data is now stored in Regions.ini

The console commands I used are listed below:

Region (Bromley) # create region Lewisham Regions.ini
Region UUID [9b651539-73ca-43fe-a53d-1b9e98a1d42e]:
Region Location [1000,1000]: 1000,1001
Internal IP address [127.0.0.1]: 0.0.0.0
Internal port [9000]: 9001
Allow alternate ports [False]:
External host name [SYSTEMIP]: 195.194.82.16
Master Avatar UUID [00000000-0000-0000-0000-000000000000]:
Master Avatar first name (enter for no master avatar) []: Estate
Master Avatar last name []: Manager
Master Avatar sandbox password []:

Region (root) # create region Bexley Regions.ini
Region UUID [4c7bb355-fe29-4b76-a213-665dcb3c1cdc]:
Region Location [1000,1000]: 1001,1001
Internal IP address [127.0.0.1]: 0.0.0.0
Internal port [9000]: 9002
Allow alternate ports [False]:
External host name [SYSTEMIP]: 195.194.82.16
Master Avatar UUID [00000000-0000-0000-0000-000000000000]:
Master Avatar first name (enter for no master avatar) []: Estate
Master Avatar last name []: Manager
Master Avatar sandbox password []:

Region (root) # create region Sevenoaks Regions.ini
Region UUID [6be666ff-dfa0-4a71-9a81-929f503695fb]:
Region Location [1000,1000] = 1001,1000
Internal IP Address [127.0.0.1]: 0.0.0.0
Internal port [9000]: 9003
Allow alternate ports [False]:
External host name [SYSTEMIP]: 195.194.82.16
Master Avatar UUID [00000000-0000-0000-0000-000000000000]:
Master Avatar first name (enter for no master avatar) []: Estate
Master Avatar last name []: Manager
Master Avatar sandbox password []:

OpenSim automatically wrote this data into Regions.ini and after restarting the simulator (just to be on the safe side) the new regions were available :)

15) Internal and External Access

We wanted to provide access to the simulator both externally from the Internet (via a GNAT box) and internally from the staff and student intranets (via an ISA Server Firewall). The main problem we enountered with internal and external access related to the region handshake failing. During login, it appears that the client initially uses the address associated with the client Login URI box (FQDN accepted here) to connect to the server and exchange authentication information using the TCP protocol. Before the region handshake takes place the server provides the client with a new IP address to use in client server communications. This is derived from the ExternalHostName parameter in Regions.ini (FQDN NOT accepted here). When the client reaches the point of the region handshake, it switches to using a mix of TCP & UDP protocols and the new server IP address. This change of address for the server can easily result in the region handshake failing if the client cannot reach the server on the new address. The client initiates the region handshake by sending UDP packet(s) and times out if these packets are undeliverable.

The problem with internal access was eventually solved by a change of protocol definition associated with the appropriate ISA UDP rule. The protocol definition for UDP needed to include both "Send Receive" and "Receive Send", so that two-way UDP traffic was allowed.

We now have both internal and external access to the simulator working fine, using the external IP address in each of the ExternalHostName parameter(s) in Regions.ini :)))

An additional problem we had with internal access was that the client inexplicably timed out whilst waiting for the region handshake when the avatar had been last left in the default region. If the avi had been left in another region e.g. Lewisham, login was fine! Our solution to this was to move the default region from port 9000 to port 9004 in Regions.ini

16) Groups and offline IM's

Groups are a complex concept and the code to support them is not yet fully integrated into the OpenSim core. The OpenSimulator Testing group can be enabled using the following parameters in OpenSim.ini:-

[Groups]
Enabled = true

; This is the current groups stub in Region.CoreModules.Avatar.Groups
Module = Default

All users on the simulator then belong to this group. With the above settings it does not appear possible to create new groups using the client. There is 3rd party group managment software available for download but I have not tried it yet. For more information on the group module in OpenSim see the link below:

http://www.osgrid.org/forums/viewtopic.php?f=9&t=1595

Offline IM's are not supported in the OpenSim core either but once again there is 3rd party software available to download to fill this gap. However the installation instructions are not very clear!

Return to Menu

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]