Troubleshooting

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Locales Issues)
(After starting OpenSimulator with Hypergrid enabled my inventory wont load!)
 
(92 intermediate revisions by 24 users not shown)
Line 1: Line 1:
[[Category:Users]]
+
{{Quicklinks}}
 +
<br />
 
This page gives any system-specific configuration settings that may be useful, and advice for problems that might be encountered.
 
This page gives any system-specific configuration settings that may be useful, and advice for problems that might be encountered.
 +
__TOC__
 +
{{clear}}
 +
== General tips ==
  
== System-specific configuration ==
+
If OpenSimulator does startup to a point where you can type commands in the region console, then you can find out what your current configuration is by using the "config get" and "config save" commands as detailed at [[Server Commands]] (and by typing help on the console). This can be useful for eliminating a bad configuration when diagnosing some issues.
=== CentOS 5 ===
+
  
To install mono and nant, you can use the "Linux Installer for x86" found at http://www.mono-project.com/Downloads.
+
Also make sure that you are running the correct versions of the .NET runtime and database. See the [[Configuration#Database]] for notes about database versions, and you must use .NET 3.5 or later. .NET 2.0 doesn't have a System.Core. If you are using Windows .NET, simply download the 3.5 or 4 Update. If you are using Mono, you'll need to update your mono version.
  
SVN can be installed by:
+
== System-specific configuration ==
 
+
yum install subversion
+
 
+
Mono defaults to installing into <tt>/opt</tt>, so you may have to add this path to your environment variables, for example, in your <tt>~/.bashrc</tt>:
+
 
+
export PATH="/opt/mono-1.2.5/bin:$PATH"
+
export PKG_CONFIG_PATH="/opt/mono-1.2.5/lib/pkgconfig:$PKG_CONFIG_PATH"
+
export MANPATH="/opt/mono-1.2.5/share/man:$MANPATH"
+
export LD_LIBRARY_PATH="/opt/mono-1.2.5/lib:$LD_LIBRARY_PATH"
+
 
+
After changing <tt>LD_LIBRARY_PATH</tt>, you should update the dynamic linker cache:
+
  
 +
=== CentOS 5 (64bit) ===
 +
If you are running Mono 2.2 compiled from source on CentOS 5.2 64bit (not sure if it applies to other scenarios as well), you need to take these steps:
 +
sudo yum install libgdiplus
 +
sudo yum install libexif
 +
sudo ln -s /usr/lib64/libgdiplus.so.0 /usr/lib64/libgdiplus.so
 
  ldconfig
 
  ldconfig
  
You may still encounter the "The current runtime framework 'mono-2.0' is not correctly configured in the NAnt configuration file." error listed below.  In that case, this may fix this:
+
That finally enabled me to run OpenSimulator without errors, and even connect to other grids.
  
yum install glib
+
=== Gentoo ===
 +
some Mono dependency & latest Mono itself may use "~x86" masked packages (assuming x86 is your platform, change may be made to reflect your ex:"~amd64" for 64bits). You could check for USE parameter with:
  
If you are running a firewall as well (i.e., if <tt>iptables -L</tt> shows a list of ACCEPT and REJECT rules), you'll have to open the necessary ports if you want to access the sim from other machines. For standalone mode:
+
  ACCEPT_KEYWORDS="~x86" emerge -vp subversion nant mono libgdiplus
  
iptables -I RH-Firewall-1-INPUT -p tcp --dport 9000 -j ACCEPT
+
Then install with:
iptables -I RH-Firewall-1-INPUT -p udp --dport 9000 -j ACCEPT
+
  
=== Debian 4.0r0 ===
+
ACCEPT_KEYWORDS="~x86" emerge subversion nant mono libgdiplus
  
If you set your system to use unstable sources, and then install some packages listed below, everything should just work.  To use unstable sources, modify your <tt>/etc/apt/sources.list</tt> file, replacing 'etch' or 'stable' with 'unstable':
+
N.B: The ACCEPT_KEYWORDS="~x86" can be set in Gentoo /etc/make.conf file, but that turn up all the emerges in testing/unstable, using it at the begining of emerge command line use it only for current emerge process
  
deb ftp://ftp.debian.org/debian/ unstable main
+
=== Mac OS X ===
  deb-src ftp://ftp.debian.org/debian/ unstable main
+
If you get errors about the 2.0 framework not being supported, you may need to update your <tt>pkg-config</tt> path.
 +
For example, you can set this in <tt>~/.bash_profile</tt>:
 +
  export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/:${PKG_CONFIG_PATH}"
  
Then update your packages to the new versions:
+
== Errors and fixes ==
  
apt-get update
+
=== MySQL connection errors after about 6-8 hours ===
apt-get dist-upgrade
+
  
This will probably change a large number of packages, and may break things.
+
MySQL has a timeout which drops the connection after 28,800 seconds (8 hours) of inactivity, which will probably result in failure to login after the User server has been sitting idle for an extended period. If you have this problem, increase the timeout to something larger, like 604800 (1 week) or 31536000 (1 year). From the mysql console, type:  
In my experience, however, if you do not use unstable sources then the packages are not up to date enough, and you run into version issues, which lead to two DllNotFoundException errors below appearing in the console output: gdiplus.dll and libopenjpeg-libsl-2.1.2.0.so.
+
  
Once the sources are updated, we need to install the necessary packages to be able to build OpenSim:
+
set global wait_timeout=604800;
  
apt-get install subversion mono nant mono-gmcs mono-mjs libmono-microsoft8.0-cil libmono-system-runtime2.0-cil
+
=== System.DllNotFoundException: gdiplus.dll ===
  
If any of these packages are missing, you'll probably encounter one of the errors listed below.  However, with these packages, OpenSim should build cleanly.
+
First, check to make sure that <tt>libgdiplus.so</tt> is known to the dynamic linker:
  
Please note: If you are using mysql as storage on unstable you may get the following error:-
+
/sbin/ldconfig -p | grep libgdiplus
  
Exception: System.NotSupportedException: CodePage 1252 not supported
+
If nothing is found, make sure that the directory libgdiplus.so exists in is either in your <tt>LD_LIBRARY_PATH</tt> environment variable or listed in a *.conf file (e.g., gdiplus.conf) in /etc/ld.so.conf.d/. Then run <tt>ldconfig</tt> to update the cache. Then it should be able to find the library.
  at System.Text.Encoding.GetEncoding (Int32 codePage) [0x00000]
+
  
To get it to work, try installing the libmono-i18n2.0-cil package
+
You may still have the above error, however, since libgdiplus also depends on other dynamic libraries, and if they fail to load, libgdiplus will fail. To test for this, run OpenSimulator with debugging information turned on:
  
  apt-get install libmono-i18n2.0-cil
+
  MONO_LOG_LEVEL=debug mono OpenSim.exe
  
=== Gentoo ===
+
On Mac OS X - check the following file exists... /opt/local/lib/libgdiplus.dylib if it does then as root user edit the file /opt/local/etc/mono/config and add the line
some Mono dependency & latest Mono itself may use "~x86" masked packages (assuming x86 is your platform, change may be made to reflect your ex:"~amd64" for 64bits). You could check for USE parameter with:
+
  
  ACCEPT_KEYWORDS="~x86" emerge -vp subversion nant mono libgdiplus
+
  <dllmap dll="gdiplus.dll" target="/opt/local/lib/libgdiplus.dylib" os="!windows"/>
  
Then install with:
+
=== Migrating Opensim / MySQL database from Windows to Linux ===
  
ACCEPT_KEYWORDS="~x86" emerge subversion nant mono libgdiplus
+
==== MySql.Data.MySqlClient.MySqlException: Table 'opensim.UserAccounts' doesn't exist ====
  
N.B: The ACCEPT_KEYWORDS="~x86" can be set in Gentoo /etc/make.conf file, but that turn up all the emerges in testing/unstable, using it at the begining of emerge command line use it only for current emerge process
+
'''Environment:''' Opensim Server 0.7.0.2 behind Linux Ubuntu 8.0.4 with mono 2.8 and MySQL 5.0 installed.  
  
=== Mac OS X ===
+
When you migrates a Opensim 0.7 database working with MySQL 5.0 on Windows to Linux, when logging a user in Opensim server, you may receive the following exception in the Opensim server console:  
This assumes you're using the universal binary for mono from the [http://www.mono-project.com/ Mono Project] site.
+
  
If you are using OS X 10.4, you should also install X11 from the OS X install CDs.
+
{|
In OS X 10.5, this is not required.
+
|-
 +
| style="background: none repeat scroll 0% 0% LavenderBlush; color: black;" |
 +
  03:11:10 - [LLOGIN SERVICE]: Exception processing login for (user_name): MySql.Data.MySqlClient.MySqlException: Table 'opensim.UserAccounts' doesn't exist
 +
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] in <filename unknown>:0
 +
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64&amp; affectedRows, System.Int64&amp; lastInsertId) [0x00000] in <filename unknown>:0
 +
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000] in <filename unknown>:0
 +
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] in <filename unknown>:0    at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] in <filename unknown>:0
 +
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64&amp; affectedRows, System.Int64&amp; lastInsertId) [0x00000] in <filename unknown>:0
 +
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000] in <filename unknown>:0
 +
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] in <filename unknown>:0
  
If you get errors about the 2.0 framework not being supported, you may need to update your <tt>pkg-config</tt> path.
+
|}
I set this in <tt>~/.bash_profile</tt>:
+
export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/:${PKG_CONFIG_PATH}"
+
  
== Errors and fixes ==
+
On the client, you also receive the following error:
  
=== Build workarounds due to non-functionality or bugs: ===
+
Login Failed
 +
Error generating Login Response
  
==== Disappearing prims due to duplicate UID's ====
+
This exception is caused by the way MySQL store the table names. On a Windows MySQL server, the table names are not case sensitive, but '''all tables in MySQL Linux are case sensitive by default''', so when OpenSimulator will find them in the database with names in first capital letters, it can not find it.  
Generally this problem occurs when a save-xml/load-xml file is loaded into the same sim without using the -newUID switch to generate new UUID's for the objects. This switch is documented in the [[Running#General OpenSim server commands|general server commands]] section. (<nowiki>load-xml <filename> -newUID</nowiki>). But if this does not work, the other way is to shift-copy your build and drag it up into the air.. then delete the one in the air, (which is actually the copy). This will generate new UID's on all your prims.. you can now leave that build, and load your original load-xml file in another region.
+
  
==== Linked objects not scaling/editing properly ====
+
One solution would be to change the names of the tables required by opensim (ALTER TABLE's), but the cleanest solution is changing MySQL config, checking the option “'''lower_case_sensitive = 1'''” in the file "'''/etc/mysql/my.cnf'''", section '''[mysqld]'''.  
From Mantis [[http://opensimulator.org/mantis/view.php?id=135 # 135]] and [[http://opensimulator.org/mantis/view.php?id=223 # 223]]: <br />
+
Linked objects: while linking/unlinking objects seems to work fine, the editing of single prims inside a linked object doesn't work correctly. You have to check the box "Edit linked parts", then you can select a single prim and edit it, but in most cases the changes in size- and/or postion-parameters are not accepted and revert immediately to the original ones. It is not completely reproducible, as it may work in some single case though.<br />
+
'''Workaround:''' unlink the whole object, make the changes, and relink the whole thing again. <br /> ''note:'' re-scaling unlinked objects in grid mode seems to work better than in standalone.  
+
  
<hr>
+
# sudo nano /etc/mysql/my.cnf
  
=== Exception and loss of ode physics System.EntryPointNotFoundException: dSpaceLockQuery ===
+
..........................
 +
[mysqld]
 +
..........................
 +
lower_case_sensitive=1
 +
..........................
  
The following is usually caused by using the wrong version of libode.  First try find / -name "libode.so" to see if you have other copies of the ode physics engine.  Then make sure you have the latest version of this.
+
''For MariaDB''
  
[SCENE] [02-01 22:20:40] System.EntryPointNotFoundException: dSpaceLockQuery
+
# sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
  at (wrapper managed-to-native) Ode.NET.d:SpaceLockQuery (intptr)
+
  at OpenSim.Region.Physics.OdePlugin.OdeScene.waitForSpaceUnlock (IntPtr space) [0x00000]
+
  at OpenSim.Region.Physics.OdePlugin.OdeCharacter.AvatarGeomAndBodyCreation (Single npositionX, Single npositionY, Single npositionZ, Single tensor) [0x00000]
+
  at OpenSim.Region.Physics.OdePlugin.OdeCharacter..ctor (System.String avName, OpenSim.Region.Physics.OdePlugin.OdeScene parent_scene, OpenSim.Region.Physics.Manager.PhysicsVector pos) [0x00000]
+
  at OpenSim.Region.Physics.OdePlugin.OdeScene.AddAvatar (System.String avName, OpenSim.Region.Physics.Manager.PhysicsVector position) [0x00000]
+
  at OpenSim.Region.Environment.Scenes.ScenePresence.AddToPhysicalScene () [0x00000]
+
  at OpenSim.Region.Environment.Scenes.ScenePresence.MakeRootAgent (LLVector3 pos, Boolean isFlying) [0x00000]
+
  at OpenSim.Region.Environment.Scenes.Scene.AgentCrossing (UInt64 regionHandle, LLUUID agentID, LLVector3 position, Boolean isFlying) [0x00000]
+
=== MySQL connection errors after about 6-8 hours ===
+
  
MySQL has a timeout which drops the connection after 28,800 seconds (8 hours) of inactivity, which will probably result in failure to login after the User server has been sitting idle for an extended periodIf you have this problem, increase the timeout to something larger, like 604800 (1 week) or 31536000 (1 year)From the mysql console, type:
+
..........................
 +
[mysqld]
 +
  ..........................
 +
  lower_case_table_names=1
 +
..........................
  
set global wait_timeout=604800;
+
This makes MySQL translate to lowercase the table names automatically. After restarting MySQL server and OpenSim, the tables are loaded without problems.
  
=== System.DllNotFoundException: gdiplus.dll ===
+
Warning: don’t try to clear the table '''migration''' to force opensim re-migrate your database, because '''it will provoke a blight on your database'''.
  
First, check to make sure that <tt>libgdiplus.so</tt> is known to the dynamic linker:
+
=== Errors from incomplete data migrations ===
  
/sbin/ldconfig -p | grep libgdiplus
+
This can happen during version upgrades if for some reason a database migration fails when there is a change in the way OpenSimulator stores data.
  
If nothing is found, make sure that the directory libgdiplus.so exists in is either in your <tt>LD_LIBRARY_PATH</tt> environment variable or listed in a *.conf file (e.g., gdiplus.conf) in /etc/ld.so.conf.d/.  Then run <tt>ldconfig</tt> to update the cache.  Then it should be able to find the library.
+
You may see errors on the OpenSimulator console like:
  
You may still have the above error, however, since libgdiplus also depends on other dynamic libraries, and if they fail to load, libgdiplus will fail. To test for this, run OpenSim with debugging information turned on:
+
  [LLOGIN SERVICE]: Exception processing login for [username]: MySql.Data.MySqlClient.MySqlException: Table 'opensim.UserAccounts' doesn't exist
 +
  at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
 +
  at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64&amp; affectedRows, System.Int64&amp; lastInsertId) [0x00000]
 +
  at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
 +
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]    at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
 +
  at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64&amp; affectedRows, System.Int64&amp; lastInsertId) [0x00000]
 +
  at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
 +
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
  
MONO_LOG_LEVEL=debug mono OpenSim.exe
+
In this case the 'users' table had not been migrated to the 'UserAccounts' table which OpenSimulator was expecting, also resulting in the viewerside error:
  
{It may show errors loading other libraries, like <tt>libexif.so.9</tt>.  In that case, linking to an existing version of the offending library may work:
+
  Login Failed
 
+
  Error generating Login Response
ln -s libexif.so.12 libexif.so.9
+
 
+
On Mac OS X - check the following file exists... /opt/local/lib/libgdiplus.dylib if it does then as root user edit the file /opt/local/etc/mono/config
+
and add the line
+
  <dllmap dll="gdiplus.dll" target="/opt/local/lib/libgdiplus.dylib" os="!windows"/>
+
  
''(Is there a cleaner solution than this?)''} **see below for alternative/cleaner fix**
+
I solved by fixing the filesystem permissions that were causing the migration to fail (on my Linux box '/var/lib/mysql/...' had got itself messed up), then dropping the 'migration' table and running the server again (from the [non-critical] migration warnings encountered there was probably a more precise way to do this, but I was fully backed up so I did it quick-and-dirty). Other than loosing terrain data refs. and current shape/clothing/attachment data (easily restored in-sim) all was now good for me.
  
== When installing mono or libgdiplus0 you may get dependency missing libexif.so.9 ==  
+
=== When installing mono or libgdiplus0 you may get dependency missing libexif.so.9 ===
  
 
This was noticed on Centos5 but may occur on other systems, download ftp://rpmfind.net/linux/conectiva/snapshot/i386/RPMS.extra/libexif9-0.5.12-47547cl.i386.rpm and install problem solved. You will now be able to install mono (as long as nothing else goes wrong )
 
This was noticed on Centos5 but may occur on other systems, download ftp://rpmfind.net/linux/conectiva/snapshot/i386/RPMS.extra/libexif9-0.5.12-47547cl.i386.rpm and install problem solved. You will now be able to install mono (as long as nothing else goes wrong )
Line 143: Line 142:
 
=== The assembly mscorlib.dll was not found or could not be loaded ===
 
=== The assembly mscorlib.dll was not found or could not be loaded ===
  
This indicates that you are missing one of the mscor libs that comes with nant. This is easily solved by getting NAnt, which comes with both versions 1.0 and 2.0 of the required lib.
+
This indicates that you are missing one of the mscor libs that comes with nant. This is easily solved by getting NAnt, which comes with both versions 1.0 and 2.0 of the required lib.
  
 
  apt-get install nant
 
  apt-get install nant
  
=== External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe ===  
+
=== External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe ===
  
 
This is quickly fixed by retrieving mono-gmcs.
 
This is quickly fixed by retrieving mono-gmcs.
Line 155: Line 154:
 
=== The type or namespace name JScript does not exist in the namespace Microsoft ===
 
=== The type or namespace name JScript does not exist in the namespace Microsoft ===
  
Note that it says Jscript over and over again. Hint perhaps?
+
Note that it says JScript over and over again. Hint perhaps?
  
 
  apt-get install mono-mjs libmono-microsoft8.0-cil
 
  apt-get install mono-mjs libmono-microsoft8.0-cil
  
On Fedora, the needed package is mono-jscript
+
On Fedora and OpenSUSE, the needed package is "mono-jscript".
  
 
=== The type or namespace name Tcp does not exist in the namespace System.Runtime.Remoting.Channels ===
 
=== The type or namespace name Tcp does not exist in the namespace System.Runtime.Remoting.Channels ===
Line 168: Line 167:
  
 
=== Missing: libopenjpeg-libsl-2.1.2.0-x86_64.so ===
 
=== Missing: libopenjpeg-libsl-2.1.2.0-x86_64.so ===
  You are on 64bit linux machine and my need to follow these instructions: [[Installing_and_running_on_x86-64 |Installing and running on x86-64 ]]
+
 
 
+
You are probably on a 64-bit linux machine and may need to follow these instructions:
 +
 
 +
* [[Installing and running on x86-64]]  
  
 
=== error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file ===
 
=== error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file ===
Line 185: Line 186:
 
  apt-get install nant
 
  apt-get install nant
  
This can also be due to <tt>pkg-config</tt> not being able to locate the <tt>mono.pc</tt> file. Adding the directory containing this file to the environment variable <tt>PKG_CONFIG_PATH</tt> may solve this.
+
This can also be due to <tt>pkg-config</tt> not being able to locate the <tt>mono.pc</tt> file. Adding the directory containing this file to the environment variable <tt>PKG_CONFIG_PATH</tt> may solve this.
  
 
== Networking and config issues ==
 
== Networking and config issues ==
  [[OpenSim:Running |See Running section]]
+
 
 +
See also the wiki page:
 +
* [[Network Settings]]
 +
* [[Firewall Settings]]
 +
* [[Configuration]]
  
 
=== You are able to log in, but not connect to a Region from a remote client ===
 
=== You are able to log in, but not connect to a Region from a remote client ===
  
    Look in your OpenSimulator/bin/Regions folder  
+
Look in your OpenSimulator/bin/Regions folder:
    1) Try 0.0.0.0 for the internal_ip_address in your region.xml(default.xml) file
+
# Try '''0.0.0.0''' for the InternalAddress in your Regions.ini file.
        (you'll have one of those files *per* region you've created)
+
# '''ExternalHostName=127.0.0.1''' will be needed to change its name to the asscssable DNS name such as "opensim.example-host.com" or "71.6.131.152" (your public accessable ip)
    2) external_host_name="127.0.0.1" will need to be changed to the accessable DNS name
+
 
        such as "opensim.example-host.com" or "71.6.131.152" (your public accessable ip)
+
If you still have the same problem, it might be a firewall issue. Check if your firewall is active and configure it. See [[Firewall Settings]] for detailed instructions.
 +
 
 +
=== I get a timeout during region handshake ===
 +
* Do you have the correct IP in your Regions\* config files?  This must be accessible from the viewer machine.
 +
* Do you have multiple interfaces on the server running OpenSim? OpenSimulator will not bind outgoing UDP packets to a specific IP, its default IP to reach you will be what the Region answers UDP with. If you have configured the region for another IP you will get a timeout during connect.
 +
 
 +
=== I cannot connect to my OpenSimulator ===
 +
* See [[Connecting]] or [[Firewall Settings]]
 +
 
 +
=== My viewer keeps getting disconnected or avatar movement is very poor (rubberbanding, lag, etc.)===
 +
Broadly speaking, this occurs either because
 +
 
 +
# The viewer is overloaded
 +
# The simulator has some issue or is overloaded
 +
# The network connection from viewer to server has insufficient bandwidth, very high latency or significant packet loss.
 +
 
 +
The easiest way to diagnose the first is to connect to similar regions on other grids with the same viewer and see if the same problems occur. 
 +
 
 +
Simulator problems are harder to diagnose purely from the viewer-side, though one can look at [[client-side stats|client side monitoring]] to gain some insight as to whether the simulator is overloaded or has other issues.
 +
 
 +
The network connection can also be hard to test without the co-operation of the operators of both the server and the viewer.  If one does have the co-operation of both, then one can use an external program such as [http://iperf.fr/ lperf] in UDP mode to run some basic tests on the connection.  iperf is available for Windows, Mac and Linux.  If these UDP tests show high jitter (high deviation from the average connection latency) or significant packet loss then this will cause problems for the viewer connection to the simulator.
 +
 
 +
== Building OpenSimulator ==
 +
=== I can't find any build files or solution files ===
 +
* If you're on Windows, run
 +
runprebuild.bat
 +
* on Linux/Mac/FreeBSD, run
 +
runprebuild.sh
  
==Building OpenSim==
 
===I can't find any build files or solution files===
 
* If you're on Windows, run <tt>runprebuild.bat</tt> - on Linux/Mac/FreeBSD, run <tt>runprebuild.sh</tt>
 
 
=== VS2005 won't open the .sln file ===
 
=== VS2005 won't open the .sln file ===
 
* Try running VS2005 C#. You are probably running VS2005 C++. This is a C# project.
 
* Try running VS2005 C#. You are probably running VS2005 C++. This is a C# project.
  
==Running OpenSim==
+
== Running OpenSimulator ==
 
=== Running OpenSim.exe from a Cygwin shell has access denied for some dll's ===
 
=== Running OpenSim.exe from a Cygwin shell has access denied for some dll's ===
 
* Do a '<tt>cd bin</tt>' followed by '<tt>chmod a+x *</tt>' to make all dll files executable.
 
* Do a '<tt>cd bin</tt>' followed by '<tt>chmod a+x *</tt>' to make all dll files executable.
===I cannot start my sim===
 
* See [[Configuration]]
 
  
==Something Has Gone Wrong!==
+
=== How to do a clean rebuild? (e.g. after 'APPLICATION EXCEPTION DETECTED' after rebuild with updated source) ===
=== I get errors concerning 'owner_uuid' when starting up my grid after updating from svn beyond r3254 ===
+
When updating to recent revisions after r3254, we are now using the unused owner_uuid. There are some grids whose mysql tables were created during a time when this field was inadvertently removed from the .sql script that initializes the regions table. Logging in to your mysql instance and executing this SQL query to add the missing owner_uuid should solve this issue:
+
alter table `regions` add column `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null, comment 'Rev.2';
+
The punctuation around regions and owner_uuid is "grave accent". The punctuation around the default value and the comment is the single quote. The "grave accent" is the one generally to the left of the One button, under the tilde and the single-quote, is, well, underneath the double quote. I think this matters to mysql.
+
  
=== I get errors concerning 'State' when starting up my grid after updating from svn beyond r3786 ===
+
When you build from source, then update the source, rebuild and try to run, you get strange runtime exceptions like that:
After r3786, a new 'State' field has been added to the 'primshapes' table on SQLite. This field is used to persist trees and grass.
+
You may have an empty region at startup, because OpenSim does not find this 'State' field and does not know what to do.
+
The best is to use SQLiteBrowser or another SQLite table editor (download it at [http://sqlitebrowser.sourceforge.net/ http://sqlitebrowser.sourceforge.net/]) to create the missing field:
+
alter table primshapes add column State integer default 0
+
Just launch SQLiteBrowser, use File/Open database, then browse to OpenSim.db file and open it. Then, go to the "Execute SQL" tab, copy/paste the command above in the "SQL string" textbox, then hit the "Execute query" button.
+
  
=== I get a timeout during region handshake ===
+
  APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs
* Do you have the correct IP in your Regions\* config files?
+
  Exception: System.MissingMethodException
* Do you have multiple interfaces on the server running OpenSim? OpenSim will not bind outgoing UDP packets to a specific IP, its default IP to reach you will be what the Region answers UDP with. If you have configured the region for another IP you will get a timeout during connect.
+
  
=== I cannot connect to my OpenSim ===
+
When you build the source, it's 'compiled' into runnable files called 'dlls' or Dynamic Link Libraries.
* See [[OpenSim: Connecting]]
+
These have the extension .dll and are added to your local installation, and are not governed by source control.
 +
When we change where these dlls are created, the 'old' ones, from previous builds, will still be there.
 +
This will cause the program to try and load these old dlls, with unexpected results.
  
===I can connect but cannot move===
+
Usually, any of these remedies should fix the problem:
If the client connects but the avatar can only spin in place and not move, then the sim is not correctly configured. It completed the initial login function, but packets are not being exchanged between the client and the sim, probably due to a network configuration error on the sim.
+
* Do a 'nant clean' if you're using Nant, or xbuild /t:clear or msbuild /t:clean
* See [[OpenSim: Configuration]]
+
* Delete folder bin/addin-db-002
 +
* Remove all OpenSim.*.dll (only files that starts with "OpenSim." and ends in ".dll", like "OpenSim.Framework.dll") recursively from your installation directory. This is what "nant clean" does above. Finally, rebuild and run.
 +
* Do a clean checkout, build that from scratch, then copy over all data files (*.db, *.ini) from your old installation, rebuild and run.
  
=== From time to time my Avatar seems to get stuck ===
+
If all else fails, join the [[IRC]] channel #opensim , or send an email to the [https://lists.berlios.de/mailman/listinfo/opensim-users opensim-users] mailing list.
Right now there is a bottle neck when syncing prims off to the database.  This will cause small (5 - 10 second) apparent hangs of the Avatar, but it will recover fine once the data is synced. It is a known issue based on legacy architecture of some of the data storage code. We hope this will be removed soon.
+
  
=== I have problems with viewing the worldmap ===
+
=== OpenSim.exe console input is scrambled when run with mono on Windows ===
* This may happen when running OpenSim on a Linux server, both in grid or standalone mode.
+
* Symptoms: when opening the worldmap window in the SL-viewer, the sims are not displayed grahically in the worldmap, the server console shows some error related to openjpeg, the current session freezes...
+
* Reason: your svn source trunk does not have the correct (or whatever...) <tt>libopenjpeg-libsl</tt> library.
+
* Other reason: the file "defaultstripe.png" does not exists in the same OpenSim folder, or is corrupted.
+
* Solution: get the newest code from libsecondlife (<tt>svn co svn://opensecondlife.org/libsl/trunk</tt>), '<tt>make</tt>' manually in the subdir <tt>openjpeg-libsl</tt>, and copy the resulting <tt>libopenjpeg-libsl-2.1.2.0.so</tt> into your OpenSim <tt>bin</tt> subdir, overwriting the existing one.
+
* Recompile & restart OpenSim
+
  
==Exceptions on the Console==
+
This is because OpenSimulator uses modified console which emulates cursor control and context help. It is intended to use on _nix console, so if you use it in dos console, it occurs.
 +
 
 +
Try starting like that. It will use "basic" console without additional features.
 +
<pre>
 +
mono OpenSim.exe -console=basic
 +
</pre>
 +
 
 +
== Exceptions on the Console ==
 
This is a list of Exceptions that you may see on the console, what they mean, and if they are a problem.
 
This is a list of Exceptions that you may see on the console, what they mean, and if they are a problem.
  
===System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so===
+
=== System.DllNotFoundException: lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686 ===
Failed generating terrain map: System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so
+
 
at (wrapper managed-to-native) OpenJPEGNet.OpenJPEG:LibslAllocDecoded OpenJPEGNet.OpenJPEG/LibslImage&)
+
'''Please note: openjpeg-dotnet should now be built using the code in the libopenmetaverse project (from where this library comes).  The version in opensim-libs is old and will no longer work.'''
at OpenJPEGNet.OpenJPEG.Encode (System.Byte[] decoded, Int32 width, Int32 height, Int32 components, Boolean lossless) [0x00000]
+
 
at OpenJPEGNet.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000]
+
{|
at OpenSim.Region.Terrain.TerrainEngine.ExportJpegImage (System.String gradientmap) [0x00000]
+
| style="background:LavenderBlush; color:black" |
 +
Failed generating terrain map: System.DllNotFoundException: lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686
 +
: at (wrapper managed-to-native) OpenMetaverse.Imaging.OpenJPEG:DotNetAllocDecoded (OpenMetaverse.Imaging.OpenJPEG/MarshalledImage&)
 +
: at OpenMetaverse.Imaging.OpenJPEG.Encode (OpenMetaverse.Imaging.ManagedImage image, Boolean lossless) [0x00000] in <filename unknown>:0
 +
: at OpenMetaverse.Imaging.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000] in <filename unknown>:0
 +
: at OpenSim.Region.CoreModules.World.LegacyMap.MapImageModule.WriteJpeg2000Image () [0x00000] in <filename unknown>:0 
 +
|}
 +
 
 +
You are on FreeBSD, and the libopenjpeg-dotnet needs some changes to work on your system
 +
 
 +
* Goto page http://opensimulator.org/mantis/view.php?id=5916
 +
* Download the two FreeBSD-specific patches (opensim-freebsd-patch-OpenMetaverseDllConfig and opensim-freebsd-patch-opj_malloc)
 +
 
 +
git clone git://opensimulator.org/git/opensim-libs
 +
cd opensim-libs/libomv-0.7.0/openjpeg-dotnet
 +
patch libopenjpeg/opj_malloc.h /path/to/downloaded/opensim-freebsd-patch-opj_malloc
 +
gmake
 +
cp -p libopenjpeg-dotnet-2.1.3.0-dotnet-1.so /opensim/installation/directory/bin/
 +
cd /opensim/installation/directory/bin
 +
patch OpenMetaverse.dll.config /path/to/downloaded/opensim-freebsd-patch-OpenMetaverseDllConfig
 +
 
 +
=== System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so ===
 +
 
 +
{|
 +
| style="background:LavenderBlush; color:black" |
 +
Failed generating terrain map: System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so
 +
: at (wrapper managed-to-native) OpenJPEGNet.OpenJPEG:LibslAllocDecoded OpenJPEGNet.OpenJPEG/LibslImage&)
 +
: at OpenJPEGNet.OpenJPEG.Encode (System.Byte[] decoded, Int32 width, Int32 height, Int32 components, Boolean lossless) [0x00000]
 +
:at OpenJPEGNet.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000]
 +
:at OpenSim.Region.Terrain.TerrainEngine.ExportJpegImage (System.String gradientmap) [0x00000]
 +
|}
  
 
You are on Linux, and the native lib libopenjpeg-libsl-2.1.2.0.so is not compatible with your system for one of the following reasons:
 
You are on Linux, and the native lib libopenjpeg-libsl-2.1.2.0.so is not compatible with your system for one of the following reasons:
Line 261: Line 312:
 
You can rebuild your own libopenjpeg from source, or run in a compatible environment.
 
You can rebuild your own libopenjpeg from source, or run in a compatible environment.
 
You can do this by:
 
You can do this by:
  svn co svn://opensecondlife.org/libsl/trunk libsl
+
  git clone git://opensimulator.org/git/opensim-libs
  cd libsl/openjpeg-libsl/
+
  cd opensim-libs/openjpeg-libsl/
 
  make
 
  make
 +
# (on FreeBSD, use gmake instead of make, but you probably want to use the [[Troubleshooting#System.DllNotFoundException:_lib32.2Flibopenjpeg-dotnet-2.1.3.0-dotnet-1-i686|libopenjpeg-mono]] fix instead.
  
then copy libopenjpeg-libsl-2.1.2.0.so into OpenSim bin-folder.
+
then copy libopenjpeg-libsl-2.1.2.0.so into OpenSimulator bin-folder.
  
==Grid Mode==
+
=== System.NullReferenceException at OpenSim.Region.Communications.Local.LocalLoginService.PrepareLoginToRegion ===
Note: Grid Mode isn't officially supported yet.  As such, you are pretty much on your own if you are trying to get OpenSim up and running in Grid Mode.
+
{|
 +
| style="background:LavenderBlush; color:black" |
 +
[LOGIN END]: XMLRPC Login failed, System.NullReferenceException: Object reference not set to an instance of an object
 +
:at OpenSim.Region.Communications.Local.LocalLoginService.PrepareLoginToRegion (OpenSim.Framework.RegionInfo regionInfo, OpenSim.Framework.UserProfileData user, OpenSim.Framework.Communications.LoginResponse response) [0x00000] in /home/sim/svn/opensim/OpenSim/Region/Communications/Local/LocalLoginService.cs:293
 +
:at OpenSim.Region.Communications.Local.LocalLoginService.CustomiseResponse (OpenSim.Framework.Communications.LoginResponse response, OpenSim.Framework.UserProfileData theUser, System.String startLocationRequest) [0x00520] in /home/sim/svn/opensim/OpenSim/Region/Communications/Local/LocalLoginService.cs:253
 +
:at OpenSim.Framework.Communications.LoginService.XmlRpcLoginMethod (Nwc.XmlRpc.XmlRpcRequest request) [0x00369] in /home/sim/svn/opensim/OpenSim/Framework/Communications/LoginService.cs:252
 +
|}
  
=== I start the sim and it doesn't connect to any grid ===
+
Your first startup of OpenSimulator has failed for example due to giving non existent domain name when prompted for region external host name. This causes only partial initialization. You need to delete bin folder, do svn update, rebuild and purge database to resolve this issue.
  
When OpenSim is first started, it needs configuration.
+
=== Exception: System.NotImplementedException: The requested feature is not implemented. ===
 +
 
 +
If your exception starts as follows:
  
* See [[OpenSim: Configuration]].
+
{|
 +
| style="background:LavenderBlush; color:black" |
 +
|Exception: System.NotImplementedException: The requested feature is not implemented.
 +
  at (wrapper managed-to-native) System.Threading.Interlocked:Add (int&,int)
 +
  at System.Threading.ReaderWriterLockSlim.TryEnterReadLock (Int32 millisecondsTimeout) [0x000e3] in
 +
|}
  
===I start the OpenSim.Grid.UserServer.exe and it gives an error===
+
You probably unwittingly passed the option '''--optimize=-all''' to mono. The problem is that Mono compiles in an "optimized" version of the System.Threading.Interlocked class's methods; these optimizations are done using raw assembler for your architecture (automatically detected at build time). When you pass '''--optimize=-all''', the runtime detects that these functions are optimized, and disables them. So the next time a class tries to call these functions, the runtime finds that there is no native implementation of the methods! This affects almost all synchronization primitives System.Threading. Since OpenSimulator relies heavily on threading and locking mechanisms, we can't do without this functionality. Perhaps a future Mono version will allow you to pass '''--optimize=-all''', and provide an unoptimized implementation (e.g. pthreads), rather than throwing an exception.
If this error is access denied for <tt>username@localhost</tt>, the mysql database is not set up.
+
It will print some text and wait for input - either an enter to accept a default value, or another value you can supply.
+
* See [[OpenSim: Configuration]].
+
  
===I want to run my own Local Grid but one or more servers fail to start===
+
If you're looking to debug a low level problem with mono (such as an error in native code), passing '''--optimize=-all''' is not the way to go about it. Instead, set the environment variable MONO_LOG_LEVEL=debug and run your program with the '''--debug''' switch passed to mono. You can also run mono under gdb, just like any other process.
* Be sure that you're able to start <tt>OpenSim.exe</tt> alone, in Standalone mode, and to be able to login.
+
* Start the servers in the correct UGAS order and answer the questions as recommended (see [[OpenSim: Configuration]]).
+
* Set all the external URI's to the correct IP: 127.0.0.1 if running on your local machine, or aaa.bbb.ccc.ddd if running on a remote server.
+
* Check again all the <tt>*.xml</tt> configuration files for any wrong settings or typing errors...!
+
* Don't forget to connect with your SL-viewer to port 8002 (Grid User-Server) instead of 9000 (Standalone OpenSim-Server).
+
* Delete all <tt>*.xml</tt> and <tt>*.yap</tt> files in the <tt>bin</tt> directory if you want to run a full reconfiguration again.
+
  
===I get a bunch of asset not found errors, while connected to a online grid, and my inventory doesn't seem to work right===
+
=== Command error: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, culture=neutral,PublicKeyToken=b77a5c561934e089' or one of its dependencies. ===
*Make sure your opensim.ini has '     asset_database = "grid"      ' otherwise it will not work correctly.
+
[[Category:Users]]
+
  
== ScriptEngine Issues ==
+
A missing System.Core indicates that you are using an old version of the .NET Runtime.  
=== Got "Primitive: Error compiling script: unknown char: . error" when compiling script ===
+
When trying to compile a script ( using DotNetEngine or XEngine ) you could have this error :
+
<pre>
+
Primitive: Error compiling script:
+
unknown char: .
+
</pre>
+
And on the console :
+
<pre>
+
11:06:37 - [ScriptEngine.DotNetEngine]: Unloading script
+
11:06:37 - Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
+
at System.Collections.Generic.Dictionary`2[OpenSim.Region.ScriptEngine.Interfaces.IEventReceiver,OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Dataserver].get_Item (IEventReceiver key) [0x00000]
+
at OpenSim.Region.ScriptEngine.Shared.Api.AsyncCommandManager.RemoveScript (IEventReceiver engine, UInt32 localID, UUID itemID) [0x00000]
+
at OpenSim.Region.ScriptEngine.DotNetEngine.ScriptManager._StopScript (UInt32 localID, UUID itemID) [0x00000]
+
at OpenSim.Region.ScriptEngine.DotNetEngine.ScriptManager.DoScriptLoadUnload () [0x00000]
+
at OpenSim.Region.ScriptEngine.DotNetEngine.MaintenanceThread.MaintenanceLoop () [0x00000]
+
11:06:37 - [ScriptEngine.DotNetEngine]: Loading script
+
11:06:37 - [ScriptEngine.DotNetEngine]: ScriptManager StartScript: localID: 720001, itemID: 88c9d28c-6004-4609-a707-717190de044a
+
11:06:37 - [Compiler]: Compiled new assembly for fad15951-f9aa-493f-be68-2aaf5ff8a3c9
+
11:06:37 - [SCRIPT]: Compiled assetID fad15951-f9aa-493f-be68-2aaf5ff8a3c9: ScriptEngines/a83150da-1ab1-11dd-89fb-0014853ee9da/CommonCompiler_compiled_fad15951-f9aa-493f-be68-2aaf5ff8a3c9.dll
+
11:06:37 - [ScriptEngine.DotNetEngine]: AppDomain Loading: OpenSim.Region.ScriptEngine.Shared, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+
</pre>
+
This happens on '''linux''' when your locales are not set to default ( "C" ).
+
* You could refer to [http://opensimulator.org/mantis/view.php?id=2088 Mantis #2088] and [http://opensimulator.org/mantis/view.php?id=2015 Mantis #2015] for a workaround to run opensim.
+
<pre>
+
env LANG=C mono --debug OpenSim.exe
+
</pre>
+
* You could also change your locale setup. Here is what I use in my '.bash_profile' :
+
<pre>
+
export LC_ALL=C
+
export LANG=C
+
</pre>
+
I know it's a ugly way to setup locales on a linux box, but it works fine on my '''Linux From Scratch''' box.
+
== Locales Issues ==
+
Well, some of us, OpenSim users, ran into random crash of the OpenSim Region server in grid mode ...  
+
  
I have made many tests to find a solution about that problem.
+
You must use .NET 3.5 or later. .NET 2.0 doesn't have a System.Core. If you are using Windows .NET, simply download the 3.5 or 4 Update. If you are using Mono, you'll need to update your mono version.
  
I first ran into this problem with OpenSIM SVN.6660 ... Even if I have no users connected, my OpenSim region server randomly crash ( after 1 hour, or 5 hours, ... ).
+
== Scene Issues ==
 +
=== Disappearing prims due to duplicate UUID's ===
  
My first idea was to upgrade to the latest SVN release, no chance, same problem. So I made a test with a previous SVN release ( SVN.6575 ) which is running fine on another server ( same OS, same parameters, same mono release, ... ) : No chance, same problem.
+
Generally this problem occurs when a save-xml/load-xml file is loaded into the same sim without using the -newUID switch to generate new UUID's for the objects. See [[Server Commands]] for detailed information. (<nowiki>load-xml <filename> -newUID</nowiki>). But if this does not work, the other way is to shift-copy your build and drag it up into the air.. then delete the one in the air, (which is actually the copy). This will generate new UID's on all your prims.. you can now leave that build, and load your original load-xml file in another region.  
  
Then, I tried to play with locales, recompile the '''screen''' unix command line utility I use to run my servers, ... No chance again.
+
=== Why are my knees bent when I stand idle? ===
 +
This seems to be a result of the ODE Physics Engine on 64 bit systems. A fix is to edit OpenSim.ini and change the following line:
 +
* av_capsule_standup_tensor_linux = 550000
 +
to
 +
* av_capsule_standup_tensor_linux = 1700000
  
So, I checked the memory usage on my Server, and I discovered that with the last SVN release, the amount of memory needed to run OpenSim server in multi-region/grid mode increased :) ... So, I have tuned my MySQL server to use less memory. Was better, but my OpenSim region server still randomly crash ( but could stay alive longer than before ).
+
Note that this line of code is under the [ODEPhysicsSettings] section of the OpenSim.ini file.
  
Then, trying to play with the '''screen''' command line options ... And all my tests shows that the '''--debug''' option impact the stability of the server.
+
===My avatar appears to keep twitching and will occasionally fly off without me being able to stop it===
  
Initially, I used such command line to run OpenSim :
+
This is often due to an extremely overburdened computer or network issues (e.g. a connection to the simulator with too low bandwidth or too high latency).
<pre>
+
/screen -S Region-service -d -m --debug mono OpenSim.exe
+
</pre>
+
  
Without the '''--debug''' option, everything seems to be more stable.
+
Executing "show queues" from the console will list the number of UDP packets that had to be resent to client.  If this number of a high percentage of the total packets sent out (e.g. around 10% or higher) then you likely have one of these two issues.
  
About locales, if you read mantis and threads in opensim-dev / opensim-users, you know that there are issues on system that are not "en_US" or "C" local compliant.
+
Unfortunately, the only fix is to improve the client computer or fix the network issues.  Network issues can be many and diverse, from the bandwidth available to the server to issues with some home wifi routers not delivering data packets in a timely manner.
  
I have re-setup my server to be full "en_US.UTF8".
+
==Inventory Issues==
 +
=== when I create a new skin and shape, the thing goes bonkers creating new assets constantly ===
 +
you have not configured an asset cache
  
So, the resulting '''screen''' command line options should be :
+
you need to configure either the cenome cache or the flotsam cache
<pre>
+
screen -S Region-service -d -m -U mono OpenSim.exe
+
</pre>
+
  
This allow me to run OpenSim SVN.6575 without crash during more than 48 hours, and also SVN.6735 ...
+
without an asset cache, temporary assets can't be held which means they are continously rerequested
  
Hope those informations could help peoples.
+
copy either config-include/CenomeMemoryAssetCache.ini.example, or the relevant flotsam file, to .ini edit and set it up for your needs then check GridCommon.ini or StandaloneCommon.ini uncomment the line for that cache
  
Just for your information :
+
(standalone defaults to cenome grid to flotsam)
  
Here is my '''OpenSim Startup script''' :
 
<pre>
 
#!/bin/bash
 
  
echo "User-Service..."
+
=== Inventory malformed ===
/usr/local/bin/screen -S User-service -d -m -U mono OpenSim.Grid.UserServer.exe
+
sleep 5
+
echo "Grid-Service..."
+
/usr/local/bin/screen -S Grid-service -d -m -U mono OpenSim.Grid.GridServer.exe
+
sleep 5
+
echo "Asset-Service..."
+
/usr/local/bin/screen -S Asset-service -d -m -U mono OpenSim.Grid.AssetServer.exe
+
sleep 10
+
echo "Inventory-Service..."
+
/usr/local/bin/screen -S Inventory-service -d -m -U mono OpenSim.Grid.InventoryServer.exe
+
sleep 5
+
echo "Region-Service..."
+
/usr/local/bin/screen -S Region-service -d -m -U mono OpenSim.exe
+
sleep 5
+
echo " "
+
echo " "
+
/usr/local/bin/screen -list
+
<pre>
+
  
Here is also a small script that give you a menu to connect to the '''screen(s)''' sessions :
+
Inventory can become malformed from bad IAR loading or simply due to old bugs creating bad data. There is a script and some steps to resolve this here:
<pre>
+
#!/usr/bin/perl
+
  
use strict;
+
[http://opensimulator.org/wiki/Check_inventory_script Check Inventory Script]
use Term::Menu;
+
  
my $EXIT = 1;
+
== Map issues ==
  
my $MainTitle = "+-----------------------------------------------------+\n";
+
=== I have problems with viewing the worldmap ===
$MainTitle .= "|        Connexion SCREEN aux Serveurs OPENSIM        |\n";
+
* This may happen when running OpenSimulator on a Linux server, both in grid or standalone mode.
$MainTitle .= "|                                                    |\n";
+
* Symptoms: when opening the worldmap window in the SL-viewer, the sims are not displayed grahically in the worldmap, the server console shows some error related to openjpeg, the current session freezes...
$MainTitle .= "|    ( Type CTRL+A+D to exit the Screen Console. )   |\n";
+
* Reason: your svn source trunk does not have the correct (or whatever...) <tt>libopenjpeg-libsl</tt> library.
$MainTitle .= "+-----------------------------------------------------+\n";
+
* Other reason: the file "defaultstripe.png" does not exists in the same OpenSimulator folder, or is corrupted.
 +
* Solution: get the newest code from opensim-libs, follow instruction for [[Troubleshooting#System.DllNotFoundException:_lib32.2Flibopenjpeg-dotnet-2.1.3.0-dotnet-1-i686|libopenjpeg-mono]] or [[Troubleshooting#System.DllNotFoundException:_..2Flibopenjpeg-libsl-2.1.2.0.so|libopenjpeg-libsl]] depending on your error messages.
 +
* Recompile & restart OpenSimulator
  
while ( $EXIT == 1 )
+
== Grid Mode ==
{
+
  
  system("screen -list | grep service > /tmp/osg.services");
+
=== I start the sim and it doesn't connect to any grid ===
  my %LIST = ();
+
  open(IN, "/tmp/osg.services");
+
  while ( my $i = <IN> )
+
  {
+
    chomp($i);
+
  
    $i =~ s/\./#/g;
+
When OpenSimulator is first started, it needs configuration.
    $i =~ s/\-service\t/#/g;
+
    $i =~ s/\t//g;
+
    $i =~ s/\(//g;
+
    $i =~ s/\)//g;
+
  
    my @STATUS = split(/#/, $i);
+
* See [[Configuration]].
    $LIST{$STATUS[1]} = $STATUS[2];
+
  }
+
  close(IN);
+
  
  my %LIST2 = ();
+
=== My grid works fine with one user but when two users login in the same time both get stuck ===
  my @indices = ('User', 'Grid', 'Asset', 'Inventory', 'Region');
+
* Make sure you have export MONO_THREADS_PER_CPU="100" in your environment
  
  foreach my $key ( @indices )
+
=== After ~20 minutes my region starts to take 100% cpu and region(s) hang ===
  {
+
* If you have mono 1.9.1 or lower upgrade to mono 2.2.
    # print "$key --> $LIST{$key}\n";
+
* Information above is dated, in fact, currently, with OpenSim 0.9.1 we use mono 5.12 or higher.
    if ( $LIST{$key} =~ /Attached/ )
+
    {
+
      $LIST2{$key} = "[X]";
+
    }
+
    else
+
    {
+
      $LIST2{$key} = "[ ]";
+
    }
+
  }
+
  
  if ( $LIST{'User'} =~ /Attached/ )
+
== Hypergrid ==
  {
+
=== After starting OpenSimulator with Hypergrid enabled my inventory wont load! ===
    $LIST2{'USER'} = "X";
+
  }
+
  else
+
  {
+
    $LIST2{'USER'} = "-";
+
  }
+
  
  system ('clear');
+
{{warning|Warning! The information below may be outdated! Thread carefully!}}
  my $prompt = new Term::Menu (
+
    spaces => 3,
+
    aftertext => "\nChoisir une option : ",
+
    beforetext => ${MainTitle},
+
    delim => ". ",
+
  );
+
  
  my $SEP = "                  ";
+
* If you're running in grid mode, first check your OpenSim.ini to make sure that the dns names or addresses for your grid servers are accessible to both you and the public.
 +
* Check the XML config files for your UGAIM servers to make sure that everything is running off of a publicly accessible IP address.
 +
** If this is the case and you have to change your UGAIM addresses you will need to run a few quick and dirty SQL queries on your database in order to update your grid's user accounts so that they now point to the new IP addresses of your UGAIM.
  
  my $answer = $prompt->menu(
+
Log into your sql server and change over to the database for your grid. The following will update your user's home inventory and asset URIs after changing the addresses of your UGAIM services in the XML configuration files.
                osg_user      => ["OpenSim User Server      $SEP$LIST2{'User'}",  '1'],
+
                osg_grid      => ["OpenSim Grid Server      $SEP$LIST2{'Grid'}",  '2'],
+
                osg_asset      => ["OpenSim Asset Server      $SEP$LIST2{'Asset'}",  '3'],
+
                osg_inventory  => ["OpenSim Inventory Server  $SEP$LIST2{'Inventory'}",  '4'],
+
                osg_region    => ["OpenSim Region Server    $SEP$LIST2{'Region'}\n",  '5'],
+
                osg_shutdown  => ["Shutdown Servers (Manual)",'6'],
+
                osg_shutdown2  => ["Shutdown Servers (Hard)\n",'7'],
+
                quit    => ["Quitter", 'q'],
+
                            );
+
  
  if ( "${answer}" eq "quit" )
+
{{warning|'''!!!!WARNING!!!! - Be smart! Always make a backup of your databases before making any changes to OpenSim! - !!!!WARNING!!!!'''}}
  {
+
    $EXIT = 0;
+
  }
+
  
  if ( "${answer}" eq "osg_user" )
+
    update users set userInventoryURI="http://new.UGAIM.address:8004" where userInventoryURI = "http://old.UGAIM.address:8004";
  {
+
   
     system("screen -d -r -S User-service");
+
     update users set userAssetURI="http://new.UGAIM.address:8003" where userAssetURI = "http://old.UGAIM.address:8003";
    $EXIT = 1;
+
  }
+
  
  if ( "${answer}" eq "osg_grid" )
+
* If you're running in standalone mode... - Anyone familiar with standalone want to fill this in? -
  {
+
----
    system("screen -d -r -S Grid-service");
+
'''Note:''' The information above may be outdated; please visit the [[Talk:Troubleshooting#Neither_there_is_a_.22users.22_table.2C_nor_any_table_has_a_.22userInventoryURI.22_field...|talk page]] for some further discussion on how to fix these issues in more recent (i.e. 0.9.3+) versions of OpenSimulator. [[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 09:49, 26 September 2023 (PDT)
    $EXIT = 1;
+
  }
+
  
  if ( "${answer}" eq "osg_asset" )
+
== Physics Issues ==
  {
+
=== Problems using OpenDynamicsEngine (ODE) of ubOde on *nix ===
    system("screen -d -r -S Asset-service");
+
If you have problems using the OpenDynamicsEngine on *nix, try setting your stack reserve level higher than the default with the following command; ulimit -s 262144, Or edit opensim.sh changing ulimit there and run it to start up OpenSimulator.
    $EXIT = 1;
+
  }
+
  
  if ( "${answer}" eq "osg_inventory" )
+
=== Exception and loss of ode physics (System.EntryPointNotFoundException: dSpaceLockQuery) ===
  {
+
    system("screen -d -r -S Inventory-service");
+
    $EXIT = 1;
+
  }
+
  
  if ( "${answer}" eq "osg_region" )
+
The following error is usually caused by using the wrong version of ''libode'':
  {
+
    system("screen -d -r -S Region-service");
+
    $EXIT = 1;
+
  }
+
  
  if ( "${answer}" eq "osg_shutdown" )
+
{|
  {
+
|-
    system("screen -d -r -S Region-service");
+
| style="background: none repeat scroll 0% 0% LavenderBlush; color: black;" |
    system("screen -d -r -S Inventory-service");
+
[SCENE] [02-01 22:20:40] System.EntryPointNotFoundException: dSpaceLockQuery
    system("screen -d -r -S Asset-service");
+
    system("screen -d -r -S Grid-service");
+
    system("screen -d -r -S User-service");
+
    $EXIT = 1;
+
  }
+
  
  if ( "${answer}" eq "osg_shutdown2" )
+
:at (wrapper managed-to-native) Ode.NET.d:SpaceLockQuery (intptr)
  {
+
:at OpenSim.Region.Physics.OdePlugin.OdeScene.waitForSpaceUnlock (IntPtr space) [0x00000]
    # system("/OPENSIM/shutdownGrid.py");
+
:at OpenSim.Region.Physics.OdePlugin.OdeCharacter.AvatarGeomAndBodyCreation (Single npositionX, Single npositionY, Single npositionZ, Single tensor) [0x00000]
    system("screen -S Region-service -r -m -X quit");
+
:at OpenSim.Region.Physics.OdePlugin.OdeCharacter..ctor (System.String avName, OpenSim.Region.Physics.OdePlugin.OdeScene parent_scene, OpenSim.Region.Physics.Manager.PhysicsVector pos) [0x00000]
    system("screen -S Inventory-service -r -m -X quit");
+
:at OpenSim.Region.Physics.OdePlugin.OdeScene.AddAvatar (System.String avName, OpenSim.Region.Physics.Manager.PhysicsVector position) [0x00000]
    system("screen -S Asset-service -r -m -X quit");
+
:at OpenSim.Region.Environment.Scenes.ScenePresence.AddToPhysicalScene () [0x00000]
    system("screen -S Grid-service -r -m -X quit");
+
:at OpenSim.Region.Environment.Scenes.ScenePresence.MakeRootAgent (LLVector3 pos, Boolean isFlying) [0x00000]
    system("screen -S User-service -r -m -X quit");
+
:at OpenSim.Region.Environment.Scenes.Scene.AgentCrossing (UInt64 regionHandle, LLUUID agentID, LLVector3 position, Boolean isFlying) [0x00000]
    $EXIT = 0;
+
 
  }
+
|}
}
+
 
 +
First try searching your filesystem to see if you have other copies of the ode physics engine:
 +
 
 +
find / -name "libode.so"
 +
 
 +
Then make sure you have the latest version.
 +
 
 +
== ScriptEngine Issues ==
 +
 
 +
=== Whilst loading an OAR or starting up the simulator, it crashes with a StackOverflowException ===
 +
This can occur if a thread converting a script from LSL to C# runs out of room on the stack.  It particularly effects Windows 64-bit servers, though not the same servers running OpenSim.32BitLaunch.exe or Mono servers (32 or 64-bit).
 +
 
 +
If you want to see the failing script, set
 +
 
 +
    <logger name="OpenSim.Region.ScriptEngine.XEngine">
 +
      <level value="DEBUG"/>
 +
    </logger>
 +
 
 +
instead of INFO at the bottom of OpenSim.exe.config.
 +
 
 +
To fix this issue, increase the ThreadStackSize from 262144 in the [XEngine] section of OpenSim.ini.
 +
 
 +
=== Got "Primitive: Error compiling script: unknown char: . error" when compiling script ===
 +
When trying to compile a script ( using [[DotNetEngine]] or [[XEngine]] ) you could have this error :
 +
{|
 +
| style="background:LavenderBlush; color:black" |
 +
Primitive: Error compiling script:
 +
unknown char: .
 +
|}
 +
 
 +
And on the console :
 +
{|
 +
| style="background:LavenderBlush; color:black" |
 +
11:06:37 - [ScriptEngine.DotNetEngine]: Unloading script<br />
 +
11:06:37 - Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
 +
:at System.Collections.Generic.Dictionary`2[OpenSim.Region.ScriptEngine.Interfaces.IEventReceiver, OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Dataserver].get_Item (IEventReceiver key) [0x00000]
 +
:at OpenSim.Region.ScriptEngine.Shared.Api.AsyncCommandManager.RemoveScript (IEventReceiver engine, UInt32 localID, UUID itemID) [0x00000]
 +
:at OpenSim.Region.ScriptEngine.DotNetEngine.ScriptManager._StopScript (UInt32 localID, UUID itemID) [0x00000]
 +
:at OpenSim.Region.ScriptEngine.DotNetEngine.ScriptManager.DoScriptLoadUnload () [0x00000]
 +
:at OpenSim.Region.ScriptEngine.DotNetEngine.MaintenanceThread.MaintenanceLoop () [0x00000]
 +
11:06:37 - [ScriptEngine.DotNetEngine]: Loading script<br />
 +
11:06:37 - [ScriptEngine.DotNetEngine]: ScriptManager StartScript: localID: 720001, itemID: 88c9d28c-6004-4609-a707-717190de044a<br />
 +
11:06:37 - [Compiler]: Compiled new assembly for fad15951-f9aa-493f-be68-2aaf5ff8a3c9<br />
 +
11:06:37 - [SCRIPT]: Compiled assetID fad15951-f9aa-493f-be68-2aaf5ff8a3c9: ScriptEngines/a83150da-1ab1-11dd-89fb-0014853ee9da/CommonCompiler_compiled_fad15951-f9aa-493f-be68-2aaf5ff8a3c9.dll<br />
 +
11:06:37 - [ScriptEngine.DotNetEngine]: AppDomain Loading: OpenSim.Region.ScriptEngine.Shared, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
 +
|}
 +
 
 +
This happens on '''linux''' when your locales are not set to default ( "C" ).
 +
* You could refer to [http://opensimulator.org/mantis/view.php?id=2088 Mantis #2088] and [http://opensimulator.org/mantis/view.php?id=2015 Mantis #2015] for a workaround to run opensim.
 +
<pre>
 +
env LANG=C mono --debug OpenSim.exe
 
</pre>
 
</pre>
 +
* You could also change your locale setup. Here is what I use in my '.bash_profile' :
 +
<pre>
 +
export LC_ALL=C
 +
export LANG=C
 +
</pre>
 +
I know it's a ugly way to setup locales on a linux box, but it works fine on my '''Linux From Scratch''' box.
  
Regards,  
+
'''Rq''': I saw Melanie has corrected some parts of the source code a few weeks ago to avoid such problems.
Ursula Matova.
+
 
 +
=== Get "Primitive: Error compiling script: ApplicationName='gmcs', ..." when compiling script ===
 +
When trying to compile a script ( using DotNetEngine or XEngine ) you have an error something like :
 +
 
 +
{| width="100%"
 +
| style="background:LavenderBlush; color:black" |
 +
Primitive: Error compiling script:<br />
 +
ApplicationName='gmcs', CommandLine='/target:library /debug+ /optimize- /out:
 +
:"ScriptEngines/430c29d0-c5c6-11dd-ad8b-0800200c9a66/CommonCompiler_compiled_fbe5e682-afae-4f1a-805b-0125031101f7.dll"
 +
:/r:"/usr/lib/opensim/bin/OpenSim.Region.ScriptEngine.Shared.dll"
 +
:/r:"/usr/lib/opensim/bin/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll"  --
 +
:"/tmp/11b81aac/594d02ce.0.cs" ', CurrentDirectory=''
 +
|}
 +
 
 +
Other features include "Touch" being disabled on the right click menu wheel.
 +
 
 +
You might have a broken mono install (i.e. discovered as mono but not gmcs installed on a Ubuntu 8.10 Intrepid machine.)
 +
 
 +
Check mono-gmcs (sudo apt-get install mono-gmcs) is correctly installed.
 +
 
 +
=== Get "gmcs: Cannot find the specified file" when compiling script ===
 +
Just install "mono-gmcs" package on your system. See [[Dependencies]] for details.
 +
 
 +
== Locale Issues ==
 +
Modern OpenSimulator (post 0.7.3) should properly set the en_US locale for all data saving, which is necessary for cross simulator compatibility.  However, if you are encountering issues with large amounts of corrupt data you may want to try setting your machine local to en_US and submitting a bug report.
 +
 
 +
== Appearance Issues ==
 +
See [[Appearance Troubleshooting]].
 +
 
 +
[[Category:Users]]

Latest revision as of 08:49, 26 September 2023


This page gives any system-specific configuration settings that may be useful, and advice for problems that might be encountered.

Contents

[edit] General tips

If OpenSimulator does startup to a point where you can type commands in the region console, then you can find out what your current configuration is by using the "config get" and "config save" commands as detailed at Server Commands (and by typing help on the console). This can be useful for eliminating a bad configuration when diagnosing some issues.

Also make sure that you are running the correct versions of the .NET runtime and database. See the Configuration#Database for notes about database versions, and you must use .NET 3.5 or later. .NET 2.0 doesn't have a System.Core. If you are using Windows .NET, simply download the 3.5 or 4 Update. If you are using Mono, you'll need to update your mono version.

[edit] System-specific configuration

[edit] CentOS 5 (64bit)

If you are running Mono 2.2 compiled from source on CentOS 5.2 64bit (not sure if it applies to other scenarios as well), you need to take these steps:

sudo yum install libgdiplus
sudo yum install libexif
sudo ln -s /usr/lib64/libgdiplus.so.0 /usr/lib64/libgdiplus.so
ldconfig

That finally enabled me to run OpenSimulator without errors, and even connect to other grids.

[edit] Gentoo

some Mono dependency & latest Mono itself may use "~x86" masked packages (assuming x86 is your platform, change may be made to reflect your ex:"~amd64" for 64bits). You could check for USE parameter with:

ACCEPT_KEYWORDS="~x86" emerge -vp subversion nant mono libgdiplus

Then install with:

ACCEPT_KEYWORDS="~x86" emerge subversion nant mono libgdiplus

N.B: The ACCEPT_KEYWORDS="~x86" can be set in Gentoo /etc/make.conf file, but that turn up all the emerges in testing/unstable, using it at the begining of emerge command line use it only for current emerge process

[edit] Mac OS X

If you get errors about the 2.0 framework not being supported, you may need to update your pkg-config path. For example, you can set this in ~/.bash_profile:

export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/:${PKG_CONFIG_PATH}"

[edit] Errors and fixes

[edit] MySQL connection errors after about 6-8 hours

MySQL has a timeout which drops the connection after 28,800 seconds (8 hours) of inactivity, which will probably result in failure to login after the User server has been sitting idle for an extended period. If you have this problem, increase the timeout to something larger, like 604800 (1 week) or 31536000 (1 year). From the mysql console, type:

set global wait_timeout=604800;

[edit] System.DllNotFoundException: gdiplus.dll

First, check to make sure that libgdiplus.so is known to the dynamic linker:

/sbin/ldconfig -p | grep libgdiplus

If nothing is found, make sure that the directory libgdiplus.so exists in is either in your LD_LIBRARY_PATH environment variable or listed in a *.conf file (e.g., gdiplus.conf) in /etc/ld.so.conf.d/. Then run ldconfig to update the cache. Then it should be able to find the library.

You may still have the above error, however, since libgdiplus also depends on other dynamic libraries, and if they fail to load, libgdiplus will fail. To test for this, run OpenSimulator with debugging information turned on:

MONO_LOG_LEVEL=debug mono OpenSim.exe

On Mac OS X - check the following file exists... /opt/local/lib/libgdiplus.dylib if it does then as root user edit the file /opt/local/etc/mono/config and add the line

<dllmap dll="gdiplus.dll" target="/opt/local/lib/libgdiplus.dylib" os="!windows"/>

[edit] Migrating Opensim / MySQL database from Windows to Linux

[edit] MySql.Data.MySqlClient.MySqlException: Table 'opensim.UserAccounts' doesn't exist

Environment: Opensim Server 0.7.0.2 behind Linux Ubuntu 8.0.4 with mono 2.8 and MySQL 5.0 installed.

When you migrates a Opensim 0.7 database working with MySQL 5.0 on Windows to Linux, when logging a user in Opensim server, you may receive the following exception in the Opensim server console:

 03:11:10 - [LLOGIN SERVICE]: Exception processing login for (user_name): MySql.Data.MySqlClient.MySqlException: Table 'opensim.UserAccounts' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] in <filename unknown>:0    at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] in <filename unknown>:0

On the client, you also receive the following error:

Login Failed
Error generating Login Response

This exception is caused by the way MySQL store the table names. On a Windows MySQL server, the table names are not case sensitive, but all tables in MySQL Linux are case sensitive by default, so when OpenSimulator will find them in the database with names in first capital letters, it can not find it.

One solution would be to change the names of the tables required by opensim (ALTER TABLE's), but the cleanest solution is changing MySQL config, checking the option “lower_case_sensitive = 1” in the file "/etc/mysql/my.cnf", section [mysqld].

# sudo nano /etc/mysql/my.cnf
..........................
[mysqld]
..........................
lower_case_sensitive=1
..........................

For MariaDB

# sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
..........................
[mysqld]
..........................
lower_case_table_names=1
..........................

This makes MySQL translate to lowercase the table names automatically. After restarting MySQL server and OpenSim, the tables are loaded without problems.

Warning: don’t try to clear the table migration to force opensim re-migrate your database, because it will provoke a blight on your database.

[edit] Errors from incomplete data migrations

This can happen during version upgrades if for some reason a database migration fails when there is a change in the way OpenSimulator stores data.

You may see errors on the OpenSimulator console like:

 [LLOGIN SERVICE]: Exception processing login for [username]: MySql.Data.MySqlClient.MySqlException: Table 'opensim.UserAccounts' doesn't exist
 at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] 
 at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000] 
 at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000] 
 at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]    at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000] 
 at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000] 
 at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000] 
 at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] 

In this case the 'users' table had not been migrated to the 'UserAccounts' table which OpenSimulator was expecting, also resulting in the viewerside error:

 Login Failed
Error generating Login Response

I solved by fixing the filesystem permissions that were causing the migration to fail (on my Linux box '/var/lib/mysql/...' had got itself messed up), then dropping the 'migration' table and running the server again (from the [non-critical] migration warnings encountered there was probably a more precise way to do this, but I was fully backed up so I did it quick-and-dirty). Other than loosing terrain data refs. and current shape/clothing/attachment data (easily restored in-sim) all was now good for me.

[edit] When installing mono or libgdiplus0 you may get dependency missing libexif.so.9

This was noticed on Centos5 but may occur on other systems, download ftp://rpmfind.net/linux/conectiva/snapshot/i386/RPMS.extra/libexif9-0.5.12-47547cl.i386.rpm and install problem solved. You will now be able to install mono (as long as nothing else goes wrong )

[edit] The assembly mscorlib.dll was not found or could not be loaded

This indicates that you are missing one of the mscor libs that comes with nant. This is easily solved by getting NAnt, which comes with both versions 1.0 and 2.0 of the required lib.

apt-get install nant

[edit] External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe

This is quickly fixed by retrieving mono-gmcs.

apt-get install mono-gmcs

[edit] The type or namespace name JScript does not exist in the namespace Microsoft

Note that it says JScript over and over again. Hint perhaps?

apt-get install mono-mjs libmono-microsoft8.0-cil

On Fedora and OpenSUSE, the needed package is "mono-jscript".

[edit] The type or namespace name Tcp does not exist in the namespace System.Runtime.Remoting.Channels

This one is taken care of with a quick install:

apt-get install libmono-system-runtime2.0-cil

[edit] Missing: libopenjpeg-libsl-2.1.2.0-x86_64.so

You are probably on a 64-bit linux machine and may need to follow these instructions:

[edit] error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file

If you start with a base Debian system as we did at the top of the page, but instead of using the apt version of mono you use the installer from their website, then you may encounter this issue.

After getting the .bin file from http://www.mono-project.com/Downloads, and executing it as per its instructions, upon finishing, you may find that if you try to run `mono --version` you are presented with this message. This one means you need to install libglib2.0-0.

apt-get install libglib2.0-0

[edit] The current runtime framework 'mono-2.0' is not correctly configured in the NAnt configuration file.

This one seems to be fixed by retrieving the apt version of nant.

apt-get install nant

This can also be due to pkg-config not being able to locate the mono.pc file. Adding the directory containing this file to the environment variable PKG_CONFIG_PATH may solve this.

[edit] Networking and config issues

See also the wiki page:

[edit] You are able to log in, but not connect to a Region from a remote client

Look in your OpenSimulator/bin/Regions folder:

  1. Try 0.0.0.0 for the InternalAddress in your Regions.ini file.
  2. ExternalHostName=127.0.0.1 will be needed to change its name to the asscssable DNS name such as "opensim.example-host.com" or "71.6.131.152" (your public accessable ip)

If you still have the same problem, it might be a firewall issue. Check if your firewall is active and configure it. See Firewall Settings for detailed instructions.

[edit] I get a timeout during region handshake

  • Do you have the correct IP in your Regions\* config files? This must be accessible from the viewer machine.
  • Do you have multiple interfaces on the server running OpenSim? OpenSimulator will not bind outgoing UDP packets to a specific IP, its default IP to reach you will be what the Region answers UDP with. If you have configured the region for another IP you will get a timeout during connect.

[edit] I cannot connect to my OpenSimulator

[edit] My viewer keeps getting disconnected or avatar movement is very poor (rubberbanding, lag, etc.)

Broadly speaking, this occurs either because

  1. The viewer is overloaded
  2. The simulator has some issue or is overloaded
  3. The network connection from viewer to server has insufficient bandwidth, very high latency or significant packet loss.

The easiest way to diagnose the first is to connect to similar regions on other grids with the same viewer and see if the same problems occur.

Simulator problems are harder to diagnose purely from the viewer-side, though one can look at client side monitoring to gain some insight as to whether the simulator is overloaded or has other issues.

The network connection can also be hard to test without the co-operation of the operators of both the server and the viewer. If one does have the co-operation of both, then one can use an external program such as lperf in UDP mode to run some basic tests on the connection. iperf is available for Windows, Mac and Linux. If these UDP tests show high jitter (high deviation from the average connection latency) or significant packet loss then this will cause problems for the viewer connection to the simulator.

[edit] Building OpenSimulator

[edit] I can't find any build files or solution files

  • If you're on Windows, run
runprebuild.bat
  • on Linux/Mac/FreeBSD, run
runprebuild.sh

[edit] VS2005 won't open the .sln file

  • Try running VS2005 C#. You are probably running VS2005 C++. This is a C# project.

[edit] Running OpenSimulator

[edit] Running OpenSim.exe from a Cygwin shell has access denied for some dll's

  • Do a 'cd bin' followed by 'chmod a+x *' to make all dll files executable.

[edit] How to do a clean rebuild? (e.g. after 'APPLICATION EXCEPTION DETECTED' after rebuild with updated source)

When you build from source, then update the source, rebuild and try to run, you get strange runtime exceptions like that:

 APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs
 Exception: System.MissingMethodException

When you build the source, it's 'compiled' into runnable files called 'dlls' or Dynamic Link Libraries. These have the extension .dll and are added to your local installation, and are not governed by source control. When we change where these dlls are created, the 'old' ones, from previous builds, will still be there. This will cause the program to try and load these old dlls, with unexpected results.

Usually, any of these remedies should fix the problem:

  • Do a 'nant clean' if you're using Nant, or xbuild /t:clear or msbuild /t:clean
  • Delete folder bin/addin-db-002
  • Remove all OpenSim.*.dll (only files that starts with "OpenSim." and ends in ".dll", like "OpenSim.Framework.dll") recursively from your installation directory. This is what "nant clean" does above. Finally, rebuild and run.
  • Do a clean checkout, build that from scratch, then copy over all data files (*.db, *.ini) from your old installation, rebuild and run.

If all else fails, join the IRC channel #opensim , or send an email to the opensim-users mailing list.

[edit] OpenSim.exe console input is scrambled when run with mono on Windows

This is because OpenSimulator uses modified console which emulates cursor control and context help. It is intended to use on _nix console, so if you use it in dos console, it occurs.

Try starting like that. It will use "basic" console without additional features.

mono OpenSim.exe -console=basic

[edit] Exceptions on the Console

This is a list of Exceptions that you may see on the console, what they mean, and if they are a problem.

[edit] System.DllNotFoundException: lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686

Please note: openjpeg-dotnet should now be built using the code in the libopenmetaverse project (from where this library comes). The version in opensim-libs is old and will no longer work.

Failed generating terrain map: System.DllNotFoundException: lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686

at (wrapper managed-to-native) OpenMetaverse.Imaging.OpenJPEG:DotNetAllocDecoded (OpenMetaverse.Imaging.OpenJPEG/MarshalledImage&)
at OpenMetaverse.Imaging.OpenJPEG.Encode (OpenMetaverse.Imaging.ManagedImage image, Boolean lossless) [0x00000] in <filename unknown>:0
at OpenMetaverse.Imaging.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000] in <filename unknown>:0
at OpenSim.Region.CoreModules.World.LegacyMap.MapImageModule.WriteJpeg2000Image () [0x00000] in <filename unknown>:0

You are on FreeBSD, and the libopenjpeg-dotnet needs some changes to work on your system

git clone git://opensimulator.org/git/opensim-libs
cd opensim-libs/libomv-0.7.0/openjpeg-dotnet
patch libopenjpeg/opj_malloc.h /path/to/downloaded/opensim-freebsd-patch-opj_malloc
gmake
cp -p libopenjpeg-dotnet-2.1.3.0-dotnet-1.so /opensim/installation/directory/bin/
cd /opensim/installation/directory/bin
patch OpenMetaverse.dll.config /path/to/downloaded/opensim-freebsd-patch-OpenMetaverseDllConfig

[edit] System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so

Failed generating terrain map: System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so

at (wrapper managed-to-native) OpenJPEGNet.OpenJPEG:LibslAllocDecoded OpenJPEGNet.OpenJPEG/LibslImage&)
at OpenJPEGNet.OpenJPEG.Encode (System.Byte[] decoded, Int32 width, Int32 height, Int32 components, Boolean lossless) [0x00000]
at OpenJPEGNet.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000]
at OpenSim.Region.Terrain.TerrainEngine.ExportJpegImage (System.String gradientmap) [0x00000]

You are on Linux, and the native lib libopenjpeg-libsl-2.1.2.0.so is not compatible with your system for one of the following reasons:

  • You have an old processor (libopenjpeg has been compiled with optimizations)
  • You are running in 64bit mode (none of the native libs are built for 64bit)

You can rebuild your own libopenjpeg from source, or run in a compatible environment. You can do this by:

git clone git://opensimulator.org/git/opensim-libs
cd opensim-libs/openjpeg-libsl/
make
# (on FreeBSD, use gmake instead of make, but you probably want to use the libopenjpeg-mono fix instead.

then copy libopenjpeg-libsl-2.1.2.0.so into OpenSimulator bin-folder.

[edit] System.NullReferenceException at OpenSim.Region.Communications.Local.LocalLoginService.PrepareLoginToRegion

[LOGIN END]: XMLRPC Login failed, System.NullReferenceException: Object reference not set to an instance of an object

at OpenSim.Region.Communications.Local.LocalLoginService.PrepareLoginToRegion (OpenSim.Framework.RegionInfo regionInfo, OpenSim.Framework.UserProfileData user, OpenSim.Framework.Communications.LoginResponse response) [0x00000] in /home/sim/svn/opensim/OpenSim/Region/Communications/Local/LocalLoginService.cs:293
at OpenSim.Region.Communications.Local.LocalLoginService.CustomiseResponse (OpenSim.Framework.Communications.LoginResponse response, OpenSim.Framework.UserProfileData theUser, System.String startLocationRequest) [0x00520] in /home/sim/svn/opensim/OpenSim/Region/Communications/Local/LocalLoginService.cs:253
at OpenSim.Framework.Communications.LoginService.XmlRpcLoginMethod (Nwc.XmlRpc.XmlRpcRequest request) [0x00369] in /home/sim/svn/opensim/OpenSim/Framework/Communications/LoginService.cs:252

Your first startup of OpenSimulator has failed for example due to giving non existent domain name when prompted for region external host name. This causes only partial initialization. You need to delete bin folder, do svn update, rebuild and purge database to resolve this issue.

[edit] Exception: System.NotImplementedException: The requested feature is not implemented.

If your exception starts as follows:

Exception: System.NotImplementedException: The requested feature is not implemented.
 at (wrapper managed-to-native) System.Threading.Interlocked:Add (int&,int)
 at System.Threading.ReaderWriterLockSlim.TryEnterReadLock (Int32 millisecondsTimeout) [0x000e3] in

You probably unwittingly passed the option --optimize=-all to mono. The problem is that Mono compiles in an "optimized" version of the System.Threading.Interlocked class's methods; these optimizations are done using raw assembler for your architecture (automatically detected at build time). When you pass --optimize=-all, the runtime detects that these functions are optimized, and disables them. So the next time a class tries to call these functions, the runtime finds that there is no native implementation of the methods! This affects almost all synchronization primitives System.Threading. Since OpenSimulator relies heavily on threading and locking mechanisms, we can't do without this functionality. Perhaps a future Mono version will allow you to pass --optimize=-all, and provide an unoptimized implementation (e.g. pthreads), rather than throwing an exception.

If you're looking to debug a low level problem with mono (such as an error in native code), passing --optimize=-all is not the way to go about it. Instead, set the environment variable MONO_LOG_LEVEL=debug and run your program with the --debug switch passed to mono. You can also run mono under gdb, just like any other process.

[edit] Command error: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, culture=neutral,PublicKeyToken=b77a5c561934e089' or one of its dependencies.

A missing System.Core indicates that you are using an old version of the .NET Runtime.

You must use .NET 3.5 or later. .NET 2.0 doesn't have a System.Core. If you are using Windows .NET, simply download the 3.5 or 4 Update. If you are using Mono, you'll need to update your mono version.

[edit] Scene Issues

[edit] Disappearing prims due to duplicate UUID's

Generally this problem occurs when a save-xml/load-xml file is loaded into the same sim without using the -newUID switch to generate new UUID's for the objects. See Server Commands for detailed information. (load-xml <filename> -newUID). But if this does not work, the other way is to shift-copy your build and drag it up into the air.. then delete the one in the air, (which is actually the copy). This will generate new UID's on all your prims.. you can now leave that build, and load your original load-xml file in another region.

[edit] Why are my knees bent when I stand idle?

This seems to be a result of the ODE Physics Engine on 64 bit systems. A fix is to edit OpenSim.ini and change the following line:

  • av_capsule_standup_tensor_linux = 550000

to

  • av_capsule_standup_tensor_linux = 1700000

Note that this line of code is under the [ODEPhysicsSettings] section of the OpenSim.ini file.

[edit] My avatar appears to keep twitching and will occasionally fly off without me being able to stop it

This is often due to an extremely overburdened computer or network issues (e.g. a connection to the simulator with too low bandwidth or too high latency).

Executing "show queues" from the console will list the number of UDP packets that had to be resent to client. If this number of a high percentage of the total packets sent out (e.g. around 10% or higher) then you likely have one of these two issues.

Unfortunately, the only fix is to improve the client computer or fix the network issues. Network issues can be many and diverse, from the bandwidth available to the server to issues with some home wifi routers not delivering data packets in a timely manner.

[edit] Inventory Issues

[edit] when I create a new skin and shape, the thing goes bonkers creating new assets constantly

you have not configured an asset cache

you need to configure either the cenome cache or the flotsam cache

without an asset cache, temporary assets can't be held which means they are continously rerequested

copy either config-include/CenomeMemoryAssetCache.ini.example, or the relevant flotsam file, to .ini edit and set it up for your needs then check GridCommon.ini or StandaloneCommon.ini uncomment the line for that cache

(standalone defaults to cenome grid to flotsam)


[edit] Inventory malformed

Inventory can become malformed from bad IAR loading or simply due to old bugs creating bad data. There is a script and some steps to resolve this here:

Check Inventory Script

[edit] Map issues

[edit] I have problems with viewing the worldmap

  • This may happen when running OpenSimulator on a Linux server, both in grid or standalone mode.
  • Symptoms: when opening the worldmap window in the SL-viewer, the sims are not displayed grahically in the worldmap, the server console shows some error related to openjpeg, the current session freezes...
  • Reason: your svn source trunk does not have the correct (or whatever...) libopenjpeg-libsl library.
  • Other reason: the file "defaultstripe.png" does not exists in the same OpenSimulator folder, or is corrupted.
  • Solution: get the newest code from opensim-libs, follow instruction for libopenjpeg-mono or libopenjpeg-libsl depending on your error messages.
  • Recompile & restart OpenSimulator

[edit] Grid Mode

[edit] I start the sim and it doesn't connect to any grid

When OpenSimulator is first started, it needs configuration.

[edit] My grid works fine with one user but when two users login in the same time both get stuck

  • Make sure you have export MONO_THREADS_PER_CPU="100" in your environment

[edit] After ~20 minutes my region starts to take 100% cpu and region(s) hang

  • If you have mono 1.9.1 or lower upgrade to mono 2.2.
  • Information above is dated, in fact, currently, with OpenSim 0.9.1 we use mono 5.12 or higher.

[edit] Hypergrid

[edit] After starting OpenSimulator with Hypergrid enabled my inventory wont load!

  • If you're running in grid mode, first check your OpenSim.ini to make sure that the dns names or addresses for your grid servers are accessible to both you and the public.
  • Check the XML config files for your UGAIM servers to make sure that everything is running off of a publicly accessible IP address.
    • If this is the case and you have to change your UGAIM addresses you will need to run a few quick and dirty SQL queries on your database in order to update your grid's user accounts so that they now point to the new IP addresses of your UGAIM.

Log into your sql server and change over to the database for your grid. The following will update your user's home inventory and asset URIs after changing the addresses of your UGAIM services in the XML configuration files.

   update users set userInventoryURI="http://new.UGAIM.address:8004" where userInventoryURI = "http://old.UGAIM.address:8004";
   
   update users set userAssetURI="http://new.UGAIM.address:8003" where userAssetURI = "http://old.UGAIM.address:8003";
  • If you're running in standalone mode... - Anyone familiar with standalone want to fill this in? -

Note: The information above may be outdated; please visit the talk page for some further discussion on how to fix these issues in more recent (i.e. 0.9.3+) versions of OpenSimulator. Gwyneth Llewelyn (talk) 09:49, 26 September 2023 (PDT)

[edit] Physics Issues

[edit] Problems using OpenDynamicsEngine (ODE) of ubOde on *nix

If you have problems using the OpenDynamicsEngine on *nix, try setting your stack reserve level higher than the default with the following command; ulimit -s 262144, Or edit opensim.sh changing ulimit there and run it to start up OpenSimulator.

[edit] Exception and loss of ode physics (System.EntryPointNotFoundException: dSpaceLockQuery)

The following error is usually caused by using the wrong version of libode:

[SCENE] [02-01 22:20:40] System.EntryPointNotFoundException: dSpaceLockQuery

at (wrapper managed-to-native) Ode.NET.d:SpaceLockQuery (intptr)
at OpenSim.Region.Physics.OdePlugin.OdeScene.waitForSpaceUnlock (IntPtr space) [0x00000]
at OpenSim.Region.Physics.OdePlugin.OdeCharacter.AvatarGeomAndBodyCreation (Single npositionX, Single npositionY, Single npositionZ, Single tensor) [0x00000]
at OpenSim.Region.Physics.OdePlugin.OdeCharacter..ctor (System.String avName, OpenSim.Region.Physics.OdePlugin.OdeScene parent_scene, OpenSim.Region.Physics.Manager.PhysicsVector pos) [0x00000]
at OpenSim.Region.Physics.OdePlugin.OdeScene.AddAvatar (System.String avName, OpenSim.Region.Physics.Manager.PhysicsVector position) [0x00000]
at OpenSim.Region.Environment.Scenes.ScenePresence.AddToPhysicalScene () [0x00000]
at OpenSim.Region.Environment.Scenes.ScenePresence.MakeRootAgent (LLVector3 pos, Boolean isFlying) [0x00000]
at OpenSim.Region.Environment.Scenes.Scene.AgentCrossing (UInt64 regionHandle, LLUUID agentID, LLVector3 position, Boolean isFlying) [0x00000]

First try searching your filesystem to see if you have other copies of the ode physics engine:

find / -name "libode.so"

Then make sure you have the latest version.

[edit] ScriptEngine Issues

[edit] Whilst loading an OAR or starting up the simulator, it crashes with a StackOverflowException

This can occur if a thread converting a script from LSL to C# runs out of room on the stack. It particularly effects Windows 64-bit servers, though not the same servers running OpenSim.32BitLaunch.exe or Mono servers (32 or 64-bit).

If you want to see the failing script, set

   <logger name="OpenSim.Region.ScriptEngine.XEngine">
     <level value="DEBUG"/>
   </logger>

instead of INFO at the bottom of OpenSim.exe.config.

To fix this issue, increase the ThreadStackSize from 262144 in the [XEngine] section of OpenSim.ini.

[edit] Got "Primitive: Error compiling script: unknown char: . error" when compiling script

When trying to compile a script ( using DotNetEngine or XEngine ) you could have this error :

Primitive: Error compiling script: unknown char: .

And on the console :

11:06:37 - [ScriptEngine.DotNetEngine]: Unloading script
11:06:37 - Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

at System.Collections.Generic.Dictionary`2[OpenSim.Region.ScriptEngine.Interfaces.IEventReceiver, OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Dataserver].get_Item (IEventReceiver key) [0x00000]
at OpenSim.Region.ScriptEngine.Shared.Api.AsyncCommandManager.RemoveScript (IEventReceiver engine, UInt32 localID, UUID itemID) [0x00000]
at OpenSim.Region.ScriptEngine.DotNetEngine.ScriptManager._StopScript (UInt32 localID, UUID itemID) [0x00000]
at OpenSim.Region.ScriptEngine.DotNetEngine.ScriptManager.DoScriptLoadUnload () [0x00000]
at OpenSim.Region.ScriptEngine.DotNetEngine.MaintenanceThread.MaintenanceLoop () [0x00000]

11:06:37 - [ScriptEngine.DotNetEngine]: Loading script
11:06:37 - [ScriptEngine.DotNetEngine]: ScriptManager StartScript: localID: 720001, itemID: 88c9d28c-6004-4609-a707-717190de044a
11:06:37 - [Compiler]: Compiled new assembly for fad15951-f9aa-493f-be68-2aaf5ff8a3c9
11:06:37 - [SCRIPT]: Compiled assetID fad15951-f9aa-493f-be68-2aaf5ff8a3c9: ScriptEngines/a83150da-1ab1-11dd-89fb-0014853ee9da/CommonCompiler_compiled_fad15951-f9aa-493f-be68-2aaf5ff8a3c9.dll
11:06:37 - [ScriptEngine.DotNetEngine]: AppDomain Loading: OpenSim.Region.ScriptEngine.Shared, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

This happens on linux when your locales are not set to default ( "C" ).

env LANG=C mono --debug OpenSim.exe
  • You could also change your locale setup. Here is what I use in my '.bash_profile' :
export LC_ALL=C
export LANG=C

I know it's a ugly way to setup locales on a linux box, but it works fine on my Linux From Scratch box.

Rq: I saw Melanie has corrected some parts of the source code a few weeks ago to avoid such problems.

[edit] Get "Primitive: Error compiling script: ApplicationName='gmcs', ..." when compiling script

When trying to compile a script ( using DotNetEngine or XEngine ) you have an error something like :

Primitive: Error compiling script:
ApplicationName='gmcs', CommandLine='/target:library /debug+ /optimize- /out:

"ScriptEngines/430c29d0-c5c6-11dd-ad8b-0800200c9a66/CommonCompiler_compiled_fbe5e682-afae-4f1a-805b-0125031101f7.dll"
/r:"/usr/lib/opensim/bin/OpenSim.Region.ScriptEngine.Shared.dll"
/r:"/usr/lib/opensim/bin/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll" --
"/tmp/11b81aac/594d02ce.0.cs" ', CurrentDirectory=

Other features include "Touch" being disabled on the right click menu wheel.

You might have a broken mono install (i.e. discovered as mono but not gmcs installed on a Ubuntu 8.10 Intrepid machine.)

Check mono-gmcs (sudo apt-get install mono-gmcs) is correctly installed.

[edit] Get "gmcs: Cannot find the specified file" when compiling script

Just install "mono-gmcs" package on your system. See Dependencies for details.

[edit] Locale Issues

Modern OpenSimulator (post 0.7.3) should properly set the en_US locale for all data saving, which is necessary for cross simulator compatibility. However, if you are encountering issues with large amounts of corrupt data you may want to try setting your machine local to en_US and submitting a bug report.

[edit] Appearance Issues

See Appearance Troubleshooting.

Personal tools
General
About This Wiki