http://opensimulator.org/api.php?action=feedcontributions&user=Dyne&feedformat=atomOpenSimulator - User contributions [en]2024-03-29T08:42:01ZUser contributionsMediaWiki 1.19.9http://opensimulator.org/wiki/Network_SettingsNetwork Settings2009-08-09T04:05:19Z<p>Dyne: Note about discussion</p>
<hr />
<div>__NOTOC__<br />
{{Template:Quicklinks}}<br />
<br /><br />
<br />
OpenSim/Grid can be pretty tricky when it comes to setting it up on a private network this document covers what OpenSim needs in terms of network resources.<br />
<br />
==Ports used by OpenSim==<br />
<br />
===Grid===<br />
<br />
* TCP/8000 - Reserved <br />
* TCP/8001 - Grid Server - Regions and other grid services talk to this<br />
* TCP/8002 - User Server and Login Services - Clients, Regions, and other grid services talk to this<br />
* TCP/8003 - Asset Services - Regions and other grid services talk to this<br />
* TCP/8004 - Inventory Services - Regions and other grid services talk to this<br />
* TCP/8005 - Reserved (Dispatch Services)<br />
* TCP/8006 - Messaging Server<br />
<br />
''* TCP/8895 - no longer needed for region to region communications''<br />
<br />
==These ports must be open on any box running a simulator that attaches to a grid:==<br />
<br />
* UDP+TCP/9000 - Default First Simulator - grid, regions, and clients talk to these<br />
* UDP+TCP/9001 - Default Second Simulator - grid, regions, and clients talk to these<br />
* UDP+TCP/900x - Each next simulator...<br />
<br />
''* TCP/8895 - no longer needed for region to region communications''<br />
===StandAlone===<br />
* UDP+TCP/9000 - Everything runs on this port<br />
<br />
===Initial setup===<br />
* Check your /bin/Regions/default.xml<br />
It shows something like this:<br />
<source lang =xml><br />
<Config sim_UUID="1e988108-76ec-45db-b89e-4ba98905681c" sim_name="mysimname" sim_location_x="1000" sim_location_y="1000" <br />
internal_ip_address="192.168.2.101" internal_ip_port="9000" allow_alternate_ports="false" <br />
external_host_name="82.73.39.77" master_avatar_uuid="00000000-0000-0000-0000-000000000000" <br />
estate_covanant_uuid="00000000-0000-0000-0000-000000000000" <br />
master_avatar_first="test" master_avatar_last="user" master_avatar_pass="******" /><br />
</source><br />
* Retrieve your [http://www.ip-adress.com/ external_host_name]<br />
* Get your internal_ip_address (ipconfig for windows, or ifconfig for linux)<br />
* Make sure the settings match<br />
<br />
If you have a router in front of your internet-modem, check out ''NAT and Port Forwarding''.<br />
Else you're good to go.<br />
<br />
==NAT and Port Forwarding ==<br />
===Straightforward===<br />
If your host does not have a public IP address (eg it is hidden behind a home router) you will have issues hosting grid and region servers if you plan on connecting clients to it on both sides of the router, however this can be worked around through the use of port forwarding and ip-redirecting.<br />
<br />
* Set internal_ip_address to your local LAN-ip(e.g. 192.168.2.1) (region xml-file)<br />
* Set the external_host_name to your external IP-Address (Not a hostname, since DNS-resolving doesn't work properly) (region xml-file)<br />
* Forward the appropriate ports to the OpenSim-server on both UDP and TCP (router-setup)<br />
* Reroute traffic for '''Linux:'''<br />
** iptables -t nat -A OUTPUT --dst $EXTERNAL_IP -p tcp --dport 9000:9010 -j DNAT --to-destination $INTERNAL_IP<br />
** iptables -t nat -A OUTPUT --dst $EXTERNAL_IP -p udp --dport 9000:9010 -j DNAT --to-destination $INTERNAL_IP<br />
Those iptables lines will redirect any traffic going to $EXTERNAL_IP on ports 9000 to 9010 to $INTERNAL_IP. The internal ip is the LAN-IP of your server, and External ip is your internet IP.<br />
''Use the above iptables command on all internal machines'' except your gateway/router. This assumes your gateway/router machine does not also host your sim. This also assume you have a default ACCEPT policy on your internal machines. So to connect from within your LAN, use the above iptables commands to reroute the traffic to the server internal ip.<br />
* Reroute traffic for '''Windows:'''<br />
** netsh (this method needs experimentation and elaboration. Please see the [[Talk:Network_Settings|Discussion page]] for some guesswork on where to start)<br />
*** note from paulieFlomar: I tried using Windows built-in tools like FireWall, netsh, and IP Security Policy. My experience with these tools was unsuccessful. I then tried to create an outgoing rule with some third-party firewall products. I tried ZoneAlarm and Sunbelt Firewall. Neither of these products would allow me to create outgoing rules. Finally, I tried creating an outgoing rule in my Linux IP Tables firewall. This worked. I created 2 rules which I placed in a firewall script, before my NAT rule. The rules were:<br />
<br />
iptables -t nat -A PREROUTING --dst 68.185.20.134 -p tcp --dport 9000:9010 -j DNAT --to-destination 192.168.2.100<br />
<br />
iptables -t nat -A PREROUTING --dst 68.185.20.134 -p udp --dport 9000:9010 -j DNAT --to-destination 192.168.2.100<br />
<br />
These rules worked. I can now access my region from my LAN.<br />
<br />
Optional:<br />
* Register an external domain-name (for external connections)<br />
* Use Bind for internal domain-name resolving<br />
<br />
===DynDNS loopback===<br />
<br />
This method was used and successfully tested using www.dyndns.com (creates a virtual domain for your pc/ip, like yourcomputer.ath.cx) as loopback for devices on a LAN with three machines (pentium 2.8ghz running windows xp - internet server , amd opteron running ubuntu 7.10 64bit - as opensim server - and MacBook with OSX 10.4.11 - as client), a modem (thomson/alcatel speedtouch 330) and a mini-switch (which brand no one ever heard of). The connection of these machines is made as following: Modem -> Win Pc -> Switch -> Mac and Ubuntu. Dyndns is used to loopback to the Win Pc, and then it forwards the request to the internal LAN opensim server, which grants everything for the client. As for the client, if he is inside the private LAN then he is now actually someone on the internet requesting for access to the opensim server. Thus, if the client is someone on the internet then he will be treated like that. Tricky ? Further details ahead:<br />
<br />
Method:<br />
* Set the simulator listening IP address to your dyndns domain - edit ''opensim/bin/Regions/default.xml''; and change the external_host_name to ''external_host_name="yourcomputer.ath.cx"''. Leave internal_ip_address "0.0.0.0" and port "9000".<br />
* Set the client (SecondLife Viewer) -loginuri to "yourcomputer.ath.cx:8002" (the port used was 8002, yours can be different if you configured it that way) - i didnt used the -loginserver flag also.<br />
* Port Forward the above ports on the internet server (in this case, win xp). You do so by creating exceptions in Windows Firewall for the above mentioned ports, and for both connections: Internet Connection and LAN - this keeps the ports open for the web requests to travel over the private network.<br />
* Edit "hosts" file (on windows, this is C:\Windows\System32\Drivers\etc\hosts and on Unix-type systems, this is /etc/hosts) entry on your internet server (in this case, win xp box) and add the following line: ''xxx.xxx.xxx.xxx<nowiki>&nbsp;&nbsp;&nbsp;&nbsp;</nowiki> yourcomputer.ath.cx''. Of course, xxx.xxx.xxx.xxx is your opensim server internal LAN IP.<br />
<br />
yourcomputer.ath.cx is now available for everyone to connect and you may login with the client!<br />
<br />
<br />
===DynDNS and the free IPCop Linux Firewall===<br />
<br />
Here an other way with the IPCop Linux Firewall, DynDNS and a OpenSimulator server<br />
<br />
* Setup an IPCop firewall with 3 interfaces (red, green, orange) and put the OpenSimulator server on the orange interface (all OpenSimulator server's on one Linux box). Red is the internet, green is your lan.<br />
* Setup the DynDNS service on the IPCop Firewall.<br />
* change the external_host_name in the default.xml to the DynDNS name<br />
* do'nt change the internal_ip_address in the default.XML, it should be 0.0.0.0 <br />
* if there, delete all loopbacks in /etc/hosts only 127.0.0.1 should be localhost<br />
* customize the Port Forwarding on the IPCop Firewall (8002 TCP, 9000 UDP/TCP and for every additonal region 900X UDP/TCP). Port forwarding should be set to the (orange) interface adress of the OpenSimulator Box<br />
<br />
Then it should be possible to conenct from inside the LAN (green) and it is also possible to conenct from the internet (over the red interface).<br />
(well, the inside-lan connections are also made now over the RED interface, but infact, this is in the same ISP network, it should be quit fast ;-) <br />
* Attention : the ports on the IPCop Firewall must also be open if you connect from inside (green) to your OpenSimulator Grid !<br />
<br />
If you are using the OS WebGui, do'nt forget to set the "SMTP AUTH" in your email server. Most of the dynamic IPs are blocked at ISP level so the new users do'nt get any confirmation email.<br />
<br />
This was tested with the Hippo OpenSim Viewer and with the Login URL : http://DynDNSName:8002<br />
<br />
<br />
===Local connections with ZyXEL DSL modem/router and NAT/Port Forwarding===<br />
<br />
This solution works with the ZyXEL Prestige 660ME-61 DSL Router. It may work with other models made by ZyXEL. <br />
<br />
Method:<br />
* Connect by TELNET to your ZyXEL DSL modem. Use the same IP address that you would if you were using the web interface. For example, the default ip on most Embarq ZyXEL DSL modems is 192.168.2.1. <br />
<br />
telnet 192.168.2.1<br />
<br />
* Enter your password. If you do not know it, try just pressing <ENTER> or ask your ISP for the password. They may or may not give it to you. <br />
<br />
* Select menu option "24. System Maintenance" from the menu. <br />
<br />
Copyright (c) 1994 - 2004 ZyXEL Communications Corp.<br />
Prestige 660ME-61 Main Menu<br />
Getting Started Advanced Management<br />
1. General Setup 21. Filter Set Configuration<br />
2. WAN Backup Setup 22. SNMP Configuration<br />
3. LAN Setup 23. System Password<br />
4. Internet Access Setup 24. System Maintenance<br />
25. IP Routing Policy Setup<br />
Advanced Applications 26. Schedule Setup<br />
11. Remote Node Setup<br />
12. Static Routing Setup<br />
15. NAT Setup 99. Exit<br />
Enter Menu Selection Number:<br />
<br />
<br />
* Select menu option "8. Command Interpreter Mode" from the menu<br />
<br />
Menu 24 - System Maintenance<br />
1. System Status<br />
2. System Information and Console Port Speed<br />
3. Log and Trace<br />
4. Diagnostic<br />
5. Backup Configuration<br />
6. Restore Configuration<br />
7. Upload Firmware<br />
8. Command Interpreter Mode<br />
9. Call Control<br />
10. Time and Date Setting<br />
11. Remote Management<br />
Enter Menu Selection Number:<br />
<br />
* At the prompt type "ip nat loopback on".<br />
<br />
Copyright (c) 1994 - 2004 ZyXEL Communications Corp.<br />
Sprint > ip nat loopback on <br />
<br />
* At the prompt type "exit".<br />
<br />
Sprint> exit<br />
<br />
* Select menu option "99. Exit"<br />
<br />
* Follow all other steps for configuring and starting your server as outlined in [http://opensimulator.org/wiki/Main_Page#Getting_Started_with_OpenSim Getting Started].<br />
<br />
<br />
===Local connections with the DLink GamerLounge Extreme N router===<br />
Networking and router configurations have been responsible for 98% of all trouble I have had setting up and operating OpenSimulator region server software. Insuring that you have a capable router properly configured should be the first thing on the list of configuration checkpoints for a smooth and trouble-free path to OpenSimulator software operations in GridMode.<br />
<br />
Below is a series of screen snapshots with the key pages of my router configuration interface with proper settings displayed.<br />
<br />
The settings below assume that you have an otherwise working connection and do not touch on such subjects as port conflicts or logging your network onto your ISP's provider network.<br />
<br />
{|<br />
|[[image:router config snapshot1.png|250px|thumb|'''1.Status''']]<br />
|[[image:router config snapshot2.png|250px|thumb|'''2.Advanced > Gaming''']]<br />
|[[image:router config snapshot3.png|250px|thumb|'''3.Routing''']]<br />
|}<br />
{|<br />
|[[image:router config snapshot4.png|250px|thumb|'''4.firewall''']]<br />
|[[image:router config snapshot5.png|250px|thumb|'''5.Advanced network settings''']]<br />
|}<br />
<br />
* provided that all information supplied in ~opensim/bin/OpenSim.ini and in your ~opensim/Regions/*.xml are properly configured, this should have you up and running.<br />
<br />
<br />
NOTE: Contrary to what is displayed above, DHCP services are not required to operate OpenSimulator server software.<br />
[[Category:Users]]</div>Dynehttp://opensimulator.org/wiki/Talk:Network_SettingsTalk:Network Settings2009-08-09T04:00:16Z<p>Dyne: Some guesswork on netsh and comments</p>
<hr />
<div>Under the "Straightforward" subsection, is that stuff with iptables/netsh strictly necessary? I was able to rig up my standalone sims to be accessible via an external IP without doing any of that - I just set up a port-forwarding rule in my router, edited the region XML files with the appropriate internal and external IP addresses, and then told my client to connect to the external IP address and it worked like a charm (granted I haven't tried connecting from an actual remote computer but I see no reason in principle why that shouldn't work too). Perhaps for networking neophytes like myself there should be a set of as-simple-as-humanly-possible instructions that'll suffice to get a server accessible to the outside world even if not in the most efficient or elegant way. [[User:Bryan Derksen|Bryan Derksen]] 06:11, 18 April 2009 (UTC)<br />
<br />
:Certainly the section could stand more clarification (the netsh bit is particularly unhelpful). But router capabilities and settings vary, so yes, alternate methods are probably necessary. I'm pretty sure I tried the settings you describe and they didn't help on my setup. I suspect either your router supports loopback (some do; it's the ones that don't that are problematic), or else those external clients wouldn't actually work if you tried them (which is a symptom of the problem).<br />
<br />
:As far as I can tell, the point of the iptables/netsh stuff is to convince each ''local'' machine to do for the software they run something similar to what the router does for ''internet'' clients. That way, the whole OpenSim package can simply be configured to always expect ordinary external traffic and never needs to know that there are LAN clients as well.<br />
<br />
:I poked around with netsh a bit. From my dim understanding of how the iptables rules work, I'm guessing that you need to do a <code>netsh routing ip nat</code> command (which puts you in the netsh prompt and moves you down into the routing/ip/nat context), and then do something with either the <code>add addressmapping</code> or <code>add portmapping</code> netsh commands. There may also be an <code>install</code> command necessary.<br />
<br />
:I've not actually got this to work yet, so the above is mostly written in the interests of giving people a (hopefully) better idea of where to begin than "figure out how this works" does. If anyone figures out the details, please post them. -[[User:Dyne|Dyne]] 04:00, 9 August 2009 (UTC)</div>Dynehttp://opensimulator.org/wiki/ConfigurationConfiguration2008-08-03T15:28:07Z<p>Dyne: forgot commands at end, minor reformatting</p>
<hr />
<div>==OpenSim configuration file==<br />
The simulator configuration is managed using a file called [[OpenSim.ini]]. This file is used regardless of whether the sim is running in standalone or grid mode. Detailed information on the options available for setttings in this file can be found [[OpenSim.ini|here]].<br />
<br />
==Database==<br />
Opensim's supports the following database-engines:<br />
* SQLite (default - a lightweight database that comes bundled with OpenSim and can be used without requiring any extra configuration. It is mostly intended to get you up and running quickly, not for production use.)<br />
* MySQL (fully supported)<br />
* MSSQL (partially supported - some recent OpenSim features may not yet be implemented)<br />
<br />
More information on database support can be found on the [[OpenSim Database support]] page.<br />
<br />
==Standalone vs. Grid==<br />
We recommend that you first get OpenSim running in standalone mode before you attempt to connect it to a grid, either your own grid or a public grid. An OpenSim configuration consists of regions (run by region simulators) and 5 core backend services (which manage users, the grid, assets, inventories, and grid-wide messaging, collectively known as UGAIM).<br />
<br />
A system running in '''standalone mode''' (that is, one with OpenSim.ini configured such that gridmode = false) -- also known as "sandbox mode" -- runs everything (all UGAIM services and one or more regions) in a single executable (OpenSim.exe). External regions cannot be added to an OpenSim running in this mode.<br />
<br />
In '''grid mode''', the five ugaim services are each started as separate executables. This means that they can be run either on the same machine or spread out across multiple computers. In this mode, OpenSim.exe serves one or more regions, which communicate with the core servers. This mode even allows region servers run by other people on their own machines to connect, if you wish.<br />
<br />
Naturally, this means that running in grid mode is somewhat more complicated than running in standalone mode. It requires an understanding of UUID, X,Y location, server handshake passwords, master avatars, and a couple of other settings. These are not difficult, but do require a little more care in setting things up.<br />
<br />
If you want to run a grid of your own (either private or public) you would start the core services up before connecting a region simulator. If you want to connect your region server to a grid that someone else is running, you need only start the region server in grid mode (with the necessary security keys and location information mentioned in the last paragraph).<br />
<br />
OpenSim.exe responds to various command line arguments. These include "-inifile", "-configfile", "-gridmode", "-physics", "-config" & "-noverbose". When starting OpenSim in either Windows or Linux, one could, for example, add "-physics=OpenDynamicsEngine" to run the OpenDynamicsEngine instead of basicphysics, or use "-gridmode=true" to force opensim.exe to run as a region server (the rest of the grid services have their own executables). As many of these settings are normally controlled by OpenSim.ini, most users (especially in standalone mode) will not add any command line arguments.<br />
<br />
===Standalone mode===<br />
<br />
When you start OpenSim in standalone mode, it will ask you several questions at the console. The first set of prompts that start with "NETWORK SERVERS INFO", you can just hit return to accept the defaults if you will be running in standalone mode. The prompts that start with "DEFAULT REGION CONFIG" are where you need to start paying attention. Some are self-explanatory. Here are explanations for the others:<br><br />
* Grid Location. OpenSim regions can be placed anywhere on a 65536 by 65536 grid. In standalone mode, it is safe to leave these X and Y locations at their defaults for the first region (additional regions will need different coordinates, of course).<br />
* Filename for local storage. Safe to leave at default.<br />
* Internal IP address; This should always be 0.0.0.0 (0.0.0.0 means "listen for connections on any interface", basically a wildcard)<br />
* Internal IP port for incoming UDP client connection. You can make this any port you want, but it is safe to leave at the default 9000.<br />
* External host name. If you will only be attaching to your sim from a SecondLife client on the same machine, you can leave this at the default 127.0.0.1. If you will be wanting to connect to it from a client on another machine, this should be the IP address or hostname of the machine you are running this sim on. To connect to your new sim, start up secondlife with the following command line switches:<br />
-loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login<br />
This assumes you are running the secondlife client on the same box. If you are running it on a separate box, substitute the IP address of your sim machine.<br><br />
To create a user:<br><br />
type ''create user <first> <last> <password> <x_loc> <y_loc>'' in the server console.<br />
<br />
===Grid mode===<br />
You want to run your own grid. Great! Assuming that you already got your sim running in standalone mode, here is what you need to do:<br><br />
1. Current builds of OpenSim grid mode are using mysql to store the grid information. You must have this installed and configured if you want to run your own grid. See [[mysql-config]] for more information.<br><br />
2. Four of the servers should be started in a certain order. UGAI: UserServer, GridServer, AssetServer, InventoryServer. The MessagingServer can be started at any point after the GridServer, and the RegionServer(s) should always come last. These are all found in the bin directory. In windows, you can just double-click on the executables to start them. In Linux and Mac OS X type "mono filename" from a prompt. The executable names, in order, are:<br />
OpenSim.Grid.UserServer.exe<br />
OpenSim.Grid.GridServer.exe<br />
OpenSim.Grid.AssetServer.exe<br />
OpenSim.Grid.InventoryServer.exe<br />
OpenSim.Grid.MessagingServer.exe<br />
OpenSim.exe<br />
3. Start the UserServer. If you will be running the GridServer on the same box, hit enter to accept the defaults, until it gives you the prompt<br />
OpenUser#<br />
This is the main prompt for the user server. If you will be running the GridServer on another box, change the Default Grid Server URI as appropriate.<br><br />
4. Start the GridServer. Again, you can hit return at all the prompts if you are running them all on the same machine. If not, change the URIs for the Asset Server and User server to point to where you are running them. You will finally get to the console prompt for the GridServer which looks like this:<br />
OpenGrid#<br />
5. Start the AssetServer. The console prompt for this server will be:<br />
OpenAsset#<br />
6. Start the InventoryServer. The console prompt for this server will be:<br />
INVENTORY#<br />
7. Start the MessagingServer. The console prompt for this is:<br />
Messaging#<br />
8. If you are running all of these servers on the same box, which would be the normal configuration, you should be ready to start up your sim. The mode that OpenSim.exe starts in is normally controlled by a setting in your OpenSim.ini. It defaults to standalone mode if that setting is not specified or the file is not found. If you wish, you can force opensim to start in gridmode on the command line as follows:<br />
OpenSim.exe -gridmode=true<br />
or:<br />
mono OpenSim.exe -gridmode=true<br />
With any luck, everything will come up without too many errors.<br><br />
9. Go to the UserServer console, and type 'create user' to create a new avatar. It will prompt you for the name and password, and the X and Y of the sim that should be his home location. Use 1000 and 1000, or wherever you told your sim to live when you brought it up in standalone mode. At the console of any of these servers, you should be able to type 'help' to get a list of commands.<br />
<br />
You should now be able to connect to your new grid with your secondlife client. You need to tell your client to point at the UserServer rather than directly at the sim, though:<br />
secondlife -loginuri http://127.0.0.1:8002/<br />
8002 is the default port for the UserServer, and that IP address should be changed to the server you are running the UserServer on, if they are not all on the same box. Happy OpenSimming!<br><br />
''Note: if you are using Windows Vista, remember to start servers as Admin. If not it will prompt you an error in console like "Error - Access denied"''<br />
<br />
==Multiple regions==<br />
Using Physical Prim with the OpenDynamicsEngine on *nix, it's recommended that you set your stack reserve level higher then default with the following command;<br />
<tt>ulimit -s 262144</tt> Or, run the opensim-ode.sh to start up OpenSimulator.<br />
<br />
For running multiple regions on the same box, you simply make multiple copies of the 'default.xml' file inside the <tt>bin/Regions/</tt> directory. You can do this using the script <tt>make.php</tt> in <tt>share/regions</tt>, or you can generate the files by hand.<br />
<br />
If you want to create the files by hand:<br />
<br />
:first copy the default.xml file in the <tt>bin/Regions</tt> directory, and name them anything you want (I name mine region.x.y.xml, where region is the name of the region, and x and y are the grid coords.)<br />
:Open each xml file and edit the uuid (a generator can be found at [http://www.famkruithof.net/uuid/uuidgen uuidgen webpage] or on unix, use the uuidgen command), region name, x & y positions, and internal ip port. IMPORTANT! The UUID, name, and grid coordinates ''must'' be unique for each region on a grid. The port assignment must be unique for each region that is running on a particular machine.<br><br />
<br />
Note that <tt>sim_location_x</tt> and <tt>sim_location_y</tt> should be adjacent integers if you want your regions to be adjacent, so you can run back and forth between them. '''IMPORTANT: THESE GRID COORDINATES ARE ''NOT'' IN METERS. THEY ARE SIM POSITIONS.''' (1000, 1000) is next to (1001,1000), (1000, 1001), and so forth. 1256, 2000, 2048 and similar values are '''not''' adjacent to 1000, they are very far away, so you would not see your sims from one another.<br />
<br />
Once you have 2 or more xml files in the bin/Regions folder, running a ''single'' copy of <tt>OpenSim.exe</tt> will start up all of your sims! If you come across any errors, there is most likely an error in your xml files.<br />
<br />
As of 6-Feb-2008, take care NOT to leave editor backup copies of the files in this directory e.g. emacs style backup names like Regionname.xml~. These are loaded by opensim.exe as if they are legitimate region descriptions, and will therefore give errors indicating you are trying to re-use the socket for that region.<br />
<br />
==Attaching your sim to someone else's grid==<br />
To set up the region server (i.e., <tt>OpenSim.exe</tt>) to connect to an external grid, you should edit the <tt>OpenSim.ini</tt> file in the <tt>bin</tt> directory. In that file, there is a <tt>[Network]</tt> section with URLs for the grid, user, and asset servers, as well as send and receive keys (for a basic level of security). The addresses and send/receive keys will vary depending on the grid you are connecting to, and the grid operator should tell you what values to use.<br />
<br />
The other file you may have to change is in your <tt>bin/Regions</tt> directory. This is where your individual region config files are. If you only have one region, it will by default be called <tt>default.xml</tt>.<br />
<br />
This can be edited with any text editor. The grid owner may tell you what X and Y location you can place your sim at (you can't have multiple sims at the same location on the grid). If so, the fields you will need to change in this file are <tt>sim_location_x</tt> and <tt>sim_location_y</tt>. And the <tt>external_host_name</tt> should be set to the hostname or IP address of your simulation server (i.e., the machine that is running <tt>OpenSim.exe</tt>).<br />
A list of public grids that you can attach your sim to is at [[OpenSim: Grids]]<br />
<br />
==Running==<br />
<br />
===StandAlone===<br />
'''<u>Windows</u>'''<br />
cd bin<br />
OpenSim.exe<br />
On Windows Vista, it may be necessary to explicitly "Run as administrator" for opensim.exe to accept connections from a client, even when running as an administrator user. Navigate to the opensim\bin directory, right click opensim.exe, and select "Run as administrator".<br />
Connect: opensim://localhost:9000 , or opensim://127.0.0.1:9000, or opensim://myipadress:9000<br />
<br />
'''<u>Linux</u>'''<br />
cd bin<br />
mono OpenSim.exe<br />
<br />
'''<u>OSX</u>'''<br />
cd bin<br />
mono OpenSim.exe<br />
<br />
===Local Grid===<br />
'''<u>Windows</u>'''<br />
cd bin<br />
OpenSim.Grid.UserServer.exe<br />
OpenSim.Grid.GridServer.exe<br />
OpenSim.Grid.AssetServer.exe<br />
OpenSim.Grid.InventoryServer.exe<br />
OpenSim.Grid.MessagingServer.exe<br />
OpenSim.exe<br />
<br />
'''<u>Linux</u>'''<br />
cd bin<br />
mono OpenSim.Grid.UserServer.exe<br />
mono OpenSim.Grid.GridServer.exe<br />
mono OpenSim.Grid.AssetServer.exe<br />
mono OpenSim.Grid.InventoryServer.exe<br />
mono OpenSim.Grid.MessagingServer.exe<br />
mono OpenSim.exe<br />
<br />
'''<u>OSX</u>''''<br />
cd bin<br />
mono OpenSim.Grid.UserServer.exe<br />
mono OpenSim.Grid.GridServer.exe<br />
mono OpenSim.Grid.AssetServer.exe<br />
mono OpenSim.Grid.InventoryServer.exe<br />
mono OpenSim.Grid.MessagingServer.exe<br />
mono OpenSim.exe<br />
Connect: opensim://myipaddress:9000</div>Dynehttp://opensimulator.org/wiki/ConfigurationConfiguration2008-08-03T15:22:19Z<p>Dyne: Update to account for messaging server, various rewording</p>
<hr />
<div>==OpenSim configuration file==<br />
The simulator configuration is managed using a file called [[OpenSim.ini]]. This file is used regardless of whether the sim is running in standalone or grid mode. Detailed information on the options available for setttings in this file can be found [[OpenSim.ini|here]].<br />
<br />
==Database==<br />
Opensim's supports the following database-engines:<br />
* SQLite (default - a lightweight database that comes bundled with OpenSim and can be used without requiring any extra configuration. It is mostly intended to get you up and running quickly, not for production use.)<br />
* MySQL (fully supported)<br />
* MSSQL (partially supported - some recent OpenSim features may not yet be implemented)<br />
<br />
More information on database support can be found on the [[OpenSim Database support]] page.<br />
<br />
==Standalone vs. Grid==<br />
We recommend that you first get OpenSim running in standalone mode before you attempt to connect it to a grid, either your own grid or a public grid. An OpenSim configuration consists of regions (run by region simulators) and 5 core backend services (which manage users, the grid, assets, inventories, and grid-wide messaging, collectively known as UGAIM).<br />
<br />
A system running in ''standalone mode'' (that is, one with OpenSim.ini configured such that gridmode = false) -- also known as "sandbox mode" -- runs everything (all UGAIM services and one or more regions) in a single executable (OpenSim.exe). External regions cannot be added to an OpenSim running in this mode.<br />
<br />
In ''grid mode'', the five ugaim services are each started as separate executables. This means that they can be run either on the same machine or spread out across multiple computers. In this mode, OpenSim.exe serves one or more regions, which communicate with the core servers. This mode even allows region servers run by other people on their own machines to connect, if you wish.<br />
<br />
Naturally, this means that running in grid mode is somewhat more complicated than running in standalone mode. It requires an understanding of UUID, X,Y location, server handshake passwords, master avatars, and a couple of other settings. These are not difficult, but do require a little more care in setting things up.<br />
<br />
If you want to run a grid of your own (either private or public) you would start the core services up before connecting a region simulator. If you want to connect your region server to a grid that someone else is running, you need only start the region server in grid mode (with the necessary security keys and location information mentioned in the last paragraph).<br />
<br />
OpenSim.exe responds to various command line arguments. These include "-inifile", "-configfile", "-gridmode", "-physics", "-config" & "-noverbose". When starting OpenSim in either Windows or Linux, one could, for example, add "-physics=OpenDynamicsEngine" to run the OpenDynamicsEngine instead of basicphysics, or use "-gridmode=true" to force opensim.exe to run as a region server (the rest of the grid services have their own executables). As many of these settings are normally controlled by OpenSim.ini, most users (especially in standalone mode) will not add any command line arguments.<br />
<br />
===Standalone mode===<br />
<br />
When you start OpenSim in standalone mode, it will ask you several questions at the console. The first set of prompts that start with "NETWORK SERVERS INFO", you can just hit return to accept the defaults if you will be running in standalone mode. The prompts that start with "DEFAULT REGION CONFIG" are where you need to start paying attention. Some are self-explanatory. Here are explanations for the others:<br><br />
* Grid Location. OpenSim regions can be placed anywhere on a 65536 by 65536 grid. In standalone mode, it is safe to leave these X and Y locations at their defaults for the first region (additional regions will need different coordinates, of course).<br />
* Filename for local storage. Safe to leave at default.<br />
* Internal IP address; This should always be 0.0.0.0 (0.0.0.0 means "listen for connections on any interface", basically a wildcard)<br />
* Internal IP port for incoming UDP client connection. You can make this any port you want, but it is safe to leave at the default 9000.<br />
* External host name. If you will only be attaching to your sim from a SecondLife client on the same machine, you can leave this at the default 127.0.0.1. If you will be wanting to connect to it from a client on another machine, this should be the IP address or hostname of the machine you are running this sim on. To connect to your new sim, start up secondlife with the following command line switches:<br />
-loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login<br />
This assumes you are running the secondlife client on the same box. If you are running it on a separate box, substitute the IP address of your sim machine.<br><br />
To create a user:<br><br />
type ''create user <first> <last> <password> <x_loc> <y_loc>'' in the server console.<br />
<br />
===Grid mode===<br />
You want to run your own grid. Great! Assuming that you already got your sim running in standalone mode, here is what you need to do:<br><br />
1. Current builds of OpenSim grid mode are using mysql to store the grid information. You must have this installed and configured if you want to run your own grid. See [[mysql-config]] for more information.<br><br />
2. Four of the servers should be started in a certain order. UGAI: UserServer, GridServer, AssetServer, InventoryServer. The MessagingServer can be started at any point after the GridServer, and the RegionServer(s) should always come last. These are all found in the bin directory. In windows, you can just double-click on the executables to start them. In Linux and Mac OS X type mono file name from a prompt. The executable names are:<br />
OpenSim.Grid.UserServer.exe<br />
OpenSim.Grid.GridServer.exe<br />
OpenSim.Grid.AssetServer.exe<br />
OpenSim.Grid.InventoryServer.exe<br />
OpenSim.Grid.MessagingServer.exe<br />
OpenSim.exe<br />
3. Start the UserServer. If you will be running the GridServer on the same box, hit enter to accept the defaults, until it gives you the prompt<br />
OpenUser#<br />
This is the main prompt for the user server. If you will be running the GridServer on another box, change the Default Grid Server URI as appropriate.<br><br />
4. Start the GridServer. Again, you can hit return at all the prompts if you are running them all on the same machine. If not, change the URIs for the Asset Server and User server to point to where you are running them. You will finally get to the console prompt for the GridServer which looks like this:<br />
OpenGrid#<br />
5. Start the AssetServer. The console prompt for this server will be:<br />
OpenAsset#<br />
6. Start the InventoryServer. The console prompt for this server will be:<br />
INVENTORY#<br />
7. Start the MessagingServer. The console prompt for this is:<br />
Messaging#<br />
8. If you are running all of these servers on the same box, which would be the normal configuration, you should be ready to start up your sim. The mode that OpenSim.exe starts in is normally controlled by a setting in your OpenSim.ini. It defaults to standalone mode if that setting is not specified or the file is not found. If you wish, you can force opensim to start in gridmode on the command line as follows:<br />
OpenSim.exe -gridmode=true<br />
or:<br />
mono OpenSim.exe -gridmode=true<br />
With any luck, everything will come up without too many errors.<br><br />
9. Go to the UserServer console, and type 'create user' to create a new avatar. It will prompt you for the name and password, and the X and Y of the sim that should be his home location. Use 1000 and 1000, or wherever you told your sim to live when you brought it up in standalone mode. At the console of any of these servers, you should be able to type 'help' to get a list of commands.<br />
<br />
You should now be able to connect to your new grid with your secondlife client. You need to tell your client to point at the UserServer rather than directly at the sim, though:<br />
secondlife -loginuri http://127.0.0.1:8002/<br />
8002 is the default port for the UserServer, and that IP address should be changed to the server you are running the UserServer on, if they are not all on the same box. Happy OpenSimming!<br><br />
''Note: if you are using Windows Vista, remember to start servers as Admin. If not it will prompt you an error in console like "Error - Access denied"''<br />
<br />
==Multiple regions==<br />
Using Physical Prim with the OpenDynamicsEngine on *nix, it's recommended that you set your stack reserve level higher then default with the following command;<br />
<tt>ulimit -s 262144</tt> Or, run the opensim-ode.sh to start up OpenSimulator.<br />
<br />
For running multiple regions on the same box, you simply make multiple copies of the 'default.xml' file inside the <tt>bin/Regions/</tt> directory. You can do this using the script <tt>make.php</tt> in <tt>share/regions</tt>, or you can generate the files by hand.<br />
<br />
If you want to create the files by hand:<br />
<br />
:first copy the default.xml file in the <tt>bin/Regions</tt> directory, and name them anything you want (I name mine x.y.xml, where x znd y are the grid coords.)<br />
:Open each xml file and edit the uuid (a generator can be found at [http://www.famkruithof.net/uuid/uuidgen uuidgen webpage] or use uuidgen), region name, x & y positions, and internal ip port. IMPORTANT! The UUID, name, and grid coordinates ''must'' be unique for each region on a grid. The port assignment must be unique for each region that is running on a particular machine.<br><br />
<br />
Note that <tt>sim_location_x</tt> and <tt>sim_location_y</tt> should be adjacent integers if you want your regions to be adjacent, so you will be able to run back and forth between them. '''IMPORTANT: THESE GRID COORDINATES ARE ''NOT'' IN METERS. THEY ARE SIM POSITIONS.''' (1000, 1000) is next to (1001,1000), (1000, 1001), and so forth. 1256, 2000, 2048 and similar values are not adjacent to 1000, they are very far away, so you would not see your sims from one another.<br />
<br />
Once you have 2 or more xml files in the bin/Regions folder, running a ''single copy'' of <tt>OpenSim.exe</tt> will start all of your sims! If you come across any errors, there is most likely an error in the xml files.<br />
<br />
As of 6-Feb-2008, take care NOT to leave editor backup copies of the files in this directory e.g. emacs style backup names like Regionname.xml~. These are loaded by opensim.exe as if they are legitimate region descriptions, and will therefore give errors indicating you are trying to re-use the socket for that region.<br />
<br />
==Attaching your sim to someone else's grid==<br />
To set up the region server (i.e., <tt>OpenSim.exe</tt>) to connect to an external grid, you should edit the <tt>OpenSim.ini</tt> file in the <tt>bin</tt> directory. In that file, there is a <tt>[Network]</tt> section with URLs for the grid, user, and asset servers, as well as send and receive keys (for a basic level of security). The addresses and send/receive keys will vary depending on the grid you are connecting to, and the grid operator should tell you what values to use.<br />
<br />
The other file you may have to change is in your <tt>bin/Regions</tt> directory. This is where your individual region config files are. If you only have one region, it will by default be called <tt>default.xml</tt>.<br />
<br />
This can be edited with any text editor. The grid owner may tell you what X and Y location you can place your sim at (you can't have multiple sims at the same location on the grid). If so, the fields you will need to change in this file are <tt>sim_location_x</tt> and <tt>sim_location_y</tt>. And the <tt>external_host_name</tt> should be set to the hostname or IP address of your simulation server (i.e., the machine that is running <tt>OpenSim.exe</tt>).<br />
A list of public grids that you can attach your sim to is at [[OpenSim: Grids]]<br />
<br />
==Running==<br />
<br />
===StandAlone===<br />
'''<u>Windows</u>'''<br />
cd bin<br />
OpenSim.exe<br />
On Windows Vista, it may be necessary to explicitly "Run as administrator" for opensim.exe to accept connections from a client, even when running as an administrator user. Navigate to the opensim\bin directory, right click opensim.exe, and select "Run as administrator".<br />
Connect: opensim://localhost:9000 , or opensim://127.0.0.1:9000, or opensim://myipadress:9000<br />
<br />
'''<u>Linux</u>'''<br />
cd bin<br />
mono OpenSim.exe<br />
<br />
'''<u>OSX</u>'''<br />
cd bin<br />
mono OpenSim.exe<br />
<br />
===Local Grid===<br />
'''<u>Windows</u>'''<br />
cd bin<br />
OpenSim.Grid.UserServer.exe<br />
OpenSim.Grid.GridServer.exe<br />
OpenSim.Grid.AssetServer.exe<br />
OpenSim.Grid.InventoryServer.exe<br />
OpenSim.exe<br />
<br />
'''<u>Linux</u>'''<br />
cd bin<br />
mono OpenSim.Grid.UserServer.exe<br />
mono OpenSim.Grid.GridServer.exe<br />
mono OpenSim.Grid.AssetServer.exe<br />
mono OpenSim.Grid.InventoryServer.exe<br />
mono OpenSim.exe<br />
<br />
'''<u>OSX</u>''''<br />
cd bin<br />
mono OpenSim.Grid.UserServer.exe<br />
mono OpenSim.Grid.GridServer.exe<br />
mono OpenSim.Grid.AssetServer.exe<br />
mono OpenSim.Grid.InventoryServer.exe<br />
mono OpenSim.exe<br />
Connect: opensim://myipaddress:9000</div>Dynehttp://opensimulator.org/wiki/DownloadDownload2008-08-03T05:32:00Z<p>Dyne: Removed the "official" from the binary distribution, because it says they are all unofficial immediately before.</p>
<hr />
<div>{{Template:Quicklinks}}<br />
==Source code==<br />
Here are the current released versions of OpenSim. <br />
<br />
<font color=red>'''Please note:'''</font> As OpenSim is still at an alpha code maturity stage, there is absolutely no guarantee that functionality works or is stable, even in the numbered releases. Certain features may not work either because the code is in rapid evolution, or because functionality expected by the Linden Labs Second Life viewer has simply not been implemented yet. However, constructive feedback is still welcomed.<br />
<br />
Also, please be aware that OpenSim requires that you have a fair amount of technical knowledge in order to set it up - there is no point and click installer (and having one would probably be premature at this stage).<br />
<br />
You may need to use the Subversion source code management system to obtain the code. Subversion can be downloaded for Windows from [http://subversion.tigris.org/servlets/NewsItemView?newsItemID=1941 here], or for Mac OS X 10.4.x [http://homepage.mac.com/martinott/Subversion-1.4.4.pkg.zip here]. SVN is built into Mac OS X 10.5.<br />
<br />
Another option for obtaining the code is via [http://www.selenic.com/mercurial/wiki/ mercurial] from the [http://opensimulator.org/hg/opensim-trunk/ OpenSim repository].<br />
<br />
* '''Latest Subversion revision version (bleeding edge)'''<br />
svn co http://opensimulator.org/svn/opensim/trunk opensim<br />
<br />
* '''Latest mercurial revision version (bleeding edge)'''<br />
hg clone http://opensimulator.org/hg/opensim-trunk/ opensim<br />
<br />
* '''0.5.8 is the latest release source tarball in .tgz format (a few steps back from the bleeding edge) (6/14/08)'''<br />
http://dist.opensimulator.org/opensim-0.5.8.tgz<br />
<br />
for those who prefer git, there is an "unofficial mirror" of SVN into git. It is intended for the collaborative prototyping/proofs of concept, etc.<br />
git clone http://opensim.be/git/opensim-svn.git<br />
If you know SVN and are interested to compare git, refer to the [http://git.or.cz/course/svn.html crash course]<br />
<br />
==Binaries==<br />
<font color=red>'''Please Note:'''</font> Binary releases are unofficial - they are not endorsed by the core OpenSimulator development team and so we cannot guarantee their authenticity. If you use them, please don't necessarily expect support from the community, especially if they are older versions than the current version. At this stage in our development, it is often be the case that many hundreds of revisions have occurred and a number of issues have been fixed since the binaries were released. Currently, the preferred (and recommended) method to get a working system is to build OpenSimulator from source.<br />
<br />
===OSGrid Builds===<br />
<br />
These builds are binary releases by the OpenSim development team, prepared and hosted by (shameless plug) [http://osgrid.org OSGrid.org]<br />
<table><br />
<tr><br />
<td>download</td><br />
<td>compression</td><br />
<td>&nbsp;</td><br />
<tr><br />
<td>[http://osgrid.org/download/opensim-bin-0.5.8.tar.bz2 OpenSim 0.5.8]</td><br />
<td>BZIP2</td><br />
<td>2008-Jul-01</td><br />
</tr><br />
<tr><br />
<td>[http://osgrid.org/download/opensim-bin-0.5.8.zip Opensim 0.5.8]</td><br />
<td>ZIP</td><br />
<td>2008-Jul-01</td><br />
</tr><br />
</table><br />
<br />
===Un-Official Trunk Builds===<br />
* [http://builds.opensimulator.org OpenSim Trunk - builds.opensimulator.org]<br />
* [http://www.twingate.nl/downloads/opensim/trunk-build/22may2008/opensim-trunk(22may2008).7z OpenSim Trunk - www.twingate.nl]<br />
<br />
<br />
===Un-Official Nightly Builds===<br />
* [http://opensim.be/build/ Opensim nightly build - opensim.be]<br />
<br />
==Addons==<br />
'''Openlibrary release v0.23''' (July 29) is a collection of Texures, Skins, Clothing etc Assets & Inventory Items common to all users when installed to your OpenSimulator Release. This library is provided under Creative Commons 2.5 by Attribution License courtesy of Openlifegrid.com. After install all users will see these items & assets in the Libraries->Openlibrary root folder.<br />
* [http://openlifegrid.com/Downloads/tabid/67/Default.aspx Openlifegrid.com Downloads] (1 time registration required) contributions to the library are welcome.<br />
<br />
To Use Delete your existing Assets & Inventory Library and Replace with the Assets & Inventory Folders contained in the .zip file.<br />
<br />
''Pages by Category:''[[:Category:Users| User-pages]],[[:Category:Development| Developer-pages]],[[:Category:Scripts| Scripts]]<br /><br />
<br />
[[Category:Users]]<br />
[[Category:Developers]]<br />
<cleanpage title=hide cats=hide /></div>Dynehttp://opensimulator.org/wiki/ConfigurationConfiguration2008-06-22T23:11:09Z<p>Dyne: Hopefully clarify what gird coordinates represent.</p>
<hr />
<div>==OpenSim configuration file==<br />
The simulator configuration is managed using a file called [[OpenSim.ini]]. This file is used regardless of whether the sim is running in standalone or grid mode. Detailed information on the options available for setttings in this file can be found [[OpenSim.ini|here]].<br />
<br />
==Database==<br />
Opensim's supports the following database-engines:<br />
* SQLite (Default)<br />
* MySQL<br />
* MSSQL<br />
<br />
More information on database-support can be found on the [[OpenSim Database support]] page.<br />
<br />
==Standalone vs. Grid==<br />
It is recommended that you first get OpenSim running in standalone mode, before you attempt to connect it to a grid, either your own grid or a public grid. A simulator actually consists of four services, known as UGAS which stand for User, Grid, Asset & Simulator. They are started in that order. A simulator running in its default standalone mode has all the services self-contained, but they are very modest. This means any first/last/password works. It also means inventory is all local with no region or grid-wide connections.<br />
<br />
A simulator running as a local grid runs all four services on the same computer. Multiple sims can be run, across-region crossing including teleporting and a set of inventory items that are within this local grid. A simulator running as part of a public grid runs only OpenSim.exe and the other three services are running on a server common to many regions. This also means that understanding the needed UUID, X,Y location, server handshake passwords, master avatar first/last/password and a couple of other settings. These are not difficult, but do require a little care in setting up. If you would prefer a 'Ready-to-Run' Version already configured please see the [[Download]] Page.<br />
<br />
OpenSim.exe responds to various command line arguments. These include "-inifile", "-configfile", "-gridmode", "-physics", "-config" & "-noverbose". When starting OpenSim in either Windows or Linux, one can add "-physics=OpenDynamicsEngine" to run the OpenDynamicsEngine instead of basicphysics. Most users in standalone mode will not add any command line arguments. For local grid or public grid, the "-gridmode=true" is usually the only argument used. The rest are for more advanced configuration.<br />
<br />
===Standalone mode===<br />
<br />
When you start OpenSim in standalone mode, it will ask you several question at the console. The first set of prompts that start with "NETWORK SERVERS INFO", you can just hit return to accept the defaults if you will be running in standalone mode. The prompts that start with "DEFAULT REGION CONFIG" are where you need to start paying attention. Some are self-explanatory. Here are explanations for the others:<br><br />
* Grid Location. OpenSim regions can be placed anywhere on a 65536 by 65536 grid. In standalone mode, it is safe to leave these X and Y locations at their defaults.<br />
* Filename for local storage. Safe to leave at default.<br />
* Internal IP address; This should always be 0.0.0.0<br />
* Internal IP port for incoming UDP client connection. You can make this any port you want, but it is safe to leave at the default 9000.<br />
* External host name. If you will only be attaching to your sim from a SecondLife client on the same machine, you can leave this at the default 127.0.0.1. If you will be wanting to connect to it from a client on another machine, this should be the IP address or hostname of the machine you are running this sim on. To connect to your new sim, start up secondlife with the following command line switches:<br />
-loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login<br />
This assumes you are running the secondlife client on the same box. If you are running it on a separate box, substitute the IP address of your sim machine.<br><br />
To create a user:<br><br />
type ''create user <first> <last> <password> <x_loc> <y_loc>'' in the server console.<br />
<br />
===Grid mode===<br />
You want to run your own grid. Great! Assuming that you already got your sim running in standalone mode, here is what you need to do:<br><br />
1. Current builds of OpenSim grid mode are using mysql to store the grid information. You must have this installed and configured if you want to run your own grid. See [[mysql-config]] for more information.<br><br />
2. The servers should be started in a certain order. UGAIS: UserServer, GridServer, AssetServer, InventoryServer, Sim. These are all found in the bin directory. In windows, you can just double-click on the executables to start them. In Linux and Mac OS X type mono file name from a prompt. The executable names are:<br />
OpenSim.Grid.UserServer.exe<br />
OpenSim.Grid.GridServer.exe<br />
OpenSim.Grid.AssetServer.exe<br />
OpenSim.Grid.InventoryServer.exe<br />
OpenSim.exe<br />
3. Start the UserServer. If you will be running the GridServer on the same box, hit enter to accept the defaults, until it gives you the prompt<br />
OpenUser#<br />
This is the main prompt for the user server. If you will be running the GridServer on another box, change the Default Grid Server URI as appropriate.<br><br />
4. Start the GridServer. Again, you can hit return at all the prompts if you are running them all on the same machine. If not, change the URIs for the Asset Server and User server to point to where you are running them. You will finally get to the console prompt for the GridServer which looks like this:<br />
OpenGrid#<br />
5. Start the AssetServer. The console prompt for this server will be:<br />
OpenAsset#<br />
6. Start the InventoryServer. The console prompt for this server will be:<br />
INVENTORY#<br />
7. If you are running all of these servers on the same box, which would be the normal configuration. You should be ready to start up your sim. Since the OpenSim.exe starts up by default in standalone mode, you will need to give it a command line switch to tell it to use gridmode instead:<br />
OpenSim.exe -gridmode=true<br />
or:<br />
mono OpenSim.exe -gridmode=true<br />
With any luck, everything will come up without too many errors.<br><br />
8. Go to the UserServer console, and type 'create user' to create a new avatar. It will prompt you for the name and password, and the X and Y of the sim that should be his home location. Use 1000 and 1000, or wherever you told your sim to live when you brought it up in standalone mode. At the console of any of these servers, you should be able to type 'help' to get a list of commands.<br />
<br />
You should now be able to connect to your new grid with your secondlife client. You need to tell your client to point at the UserServer rather than directly at the sim, though:<br />
secondlife -loginuri http://127.0.0.1:8002/<br />
8002 is the default port for the UserServer, and that IP address should be changed to the server you are running the UserServer on, if they are not all on the same box.Happy OpenSimming!<br><br />
''Note: if you are using Windows Vista, remember to start servers as Admin. If not it will prompt you an error in console like "Error - Access denied"''<br />
<br />
==Multiple regions==<br />
Using Physical Prim with the OpenDynamicsEngine on *nix, it's recommended that you set your stack reserve level higher then default with the following command;<br />
<tt>ulimit -s 262144</tt> Or, run the opensim-ode.sh to start up OpenSimulator.<br />
<br />
For running multiple regions on the same box, you simply make multiple copies of the 'default.xml' file inside the <tt>bin/Regions/</tt> directory. You can do this using the script <tt>make.php</tt> in <tt>share/regions</tt>, or you can generate the files by hand. If you want to create the files by hand, first copy the default.xml file in the <tt>bin/Regions</tt> directory, and name them anything you want (I name mine x.y.xml, where x znd y are the grid coords.) Open each xml file and edit the uuid (each must be unique, a generator can be found at [http://www.famkruithof.net/uuid/uuidgen uuidgen webpage] or use uuidgen), region name, x & y positions, datastore (if you are using the prim thing) and internal ip port. EACH OF THESE MUST BE UNIQUE!<br><br />
<br />
Note that <tt>sim_location_x</tt> and <tt>sim_location_y</tt> should be adjacent integers if you want your regions to be adjacent, so you will be able to run back and forth between them. '''IMPORTANT: THESE GRID COORDINATES ARE ''NOT'' IN METERS. THEY ARE SIM POSITIONS.''' (1000, 1000) is next to (1001,1000), (1000, 1001), and so forth. 1256, 2000, 2048 and similar values are not adjacent to 1000, they are very far away, so you will not see your sims if you use them.<br />
<br />
Once you have 2 or more xml files in the regions folder, running a ''single copy'' of <tt>OpenSim.exe</tt> will boot all of your sims! If you come across any errors, there is most likely an error in the xml files. As at 6-Feb-2008, take care NOT to leave editor backup copies of the files in this directory e.g. emacs style backup names like Regionname.xml~. These are loaded by opensim.exe as if they are extra legitimate region descriptions, and will therefore give errors indicating you are trying to re-use the socket for that region.<br />
<br />
==Attaching your sim to someone else's grid==<br />
To set up the simulation server (i.e., <tt>OpenSim.exe</tt>) to connect to an external grid, you should edit the <tt>OpenSim.ini</tt> file in the <tt>bin</tt> directory. In that file, there is a <tt>[Network]</tt> section with URLs for the grid, user, and asset servers, as well as send and receive keys (for a basic level of security). The addresses and send/receive keys will vary depending on the grid you are connecting to, and the grid operator should tell you what values to use.<br />
<br />
The other file you may have to change is in your <tt>bin/Regions</tt> directory. This is where your individual region config files are. If you only have one region, it will by default be called <tt>default.xml</tt>.<br />
<br />
This can be edited with any text editor. The grid owner may tell you what X and Y location you can place your sim at (you can't have multiple sims at the same location on the grid). If so, the fields you will need to change in this file are <tt>sim_location_x</tt> and <tt>sim_location_y</tt>. And the <tt>external_host_name</tt> should be set to the hostname or IP address of your simulation server (i.e., the machine that is running <tt>OpenSim.exe</tt>).<br />
A list of public grids that you can attach your sim to is at [[OpenSim: Grids]]<br />
<br />
==Running==<br />
<br />
===StandAlone===<br />
'''<u>Windows</u>'''<br />
cd bin<br />
OpenSim.exe<br />
On Windows Vista, it may be necessary to explicitly "Run as administrator" for opensim.exe to accept connections from a client, even when running as an administrator user. Navigate to the opensim\bin directory, right click opensim.exe, and select "Run as administrator".<br />
Connect: opensim://localhost:9000 , or opensim://127.0.0.1:9000, or opensim://myipadress:9000<br />
<br />
'''<u>Linux</u>'''<br />
cd bin<br />
mono OpenSim.exe<br />
<br />
'''<u>OSX</u>'''<br />
cd bin<br />
mono OpenSim.exe<br />
<br />
===Local Grid===<br />
'''<u>Windows</u>'''<br />
cd bin<br />
OpenSim.Grid.UserServer.exe<br />
OpenSim.Grid.GridServer.exe<br />
OpenSim.Grid.AssetServer.exe<br />
OpenSim.Grid.InventoryServer.exe<br />
OpenSim.exe<br />
<br />
'''<u>Linux</u>'''<br />
cd bin<br />
mono OpenSim.Grid.UserServer.exe<br />
mono OpenSim.Grid.GridServer.exe<br />
mono OpenSim.Grid.AssetServer.exe<br />
mono OpenSim.Grid.InventoryServer.exe<br />
mono OpenSim.exe<br />
<br />
'''<u>OSX</u>''''<br />
cd bin<br />
mono OpenSim.Grid.UserServer.exe<br />
mono OpenSim.Grid.GridServer.exe<br />
mono OpenSim.Grid.AssetServer.exe<br />
mono OpenSim.Grid.InventoryServer.exe<br />
mono OpenSim.exe<br />
Connect: opensim://myipaddress:9000</div>Dynehttp://opensimulator.org/wiki/Useful_QueriesUseful Queries2008-06-17T22:29:24Z<p>Dyne: Revert and add different note to more accurately reflect the situation</p>
<hr />
<div>This page lists various SQL queries one can perform from a MySql console to check the database for various bits of information. They have not been tested in other SQL variants, and may or may not work as intended:<br />
<br />
'''NOTE: In SVN revision 5115 through 5123, some UUID fields began migrating to a consistent format (the dashed form, like 00000000-0000-0000-0000-000000000000).'''<br />
<br />
'''This means that in these later revision databases, you will no longer need to use the hex(id) function on the assets table. On the other hand, until all UUIDs are in the same format, replace(id, '-', <nowiki>''</nowiki>) will still be necessary on dashed UUID fields to get the id's into a consistent format for joins and such. UUID literals inserted into queries should not have dashes. The queries on this page have not yet been revised to take this into consideration.'''<br />
<br />
<br />
==Listing things==<br />
* List the users presently logged in (may be inflated due to users not getting logged out properly, whether due to bugs or crashes):<br />
<br />
<nowiki>SELECT concat(username, ' ', lastname) AS 'Online Users' FROM opensim.users <br />
INNER JOIN opensim.agents ON opensim.users.UUID = opensim.agents.UUID WHERE opensim.agents.agentonline = '1';</nowiki><br />
<br />
* List the Regions in your database (only works for grid mode):<br />
<nowiki>SELECT regionName as 'Regions' FROM opensim.regions;</nowiki><br />
<br />
* Find the asset UUID of a given inventory Item (replace the name with the one you want). This may return multiple rows if more than one inventory item exists, and some entries may point to a single asset, while others point at different assets.<br />
<nowiki>SELECT inventoryName, InventoryID, assetID FROM inventoryitems WHERE inventoryName = 'My Inventory Item Name Here';</nowiki><br />
<br />
* Verify a particular asset exists, given the UUID (usually you want to replace the UUID here with an assetID from the previous query):<br />
<nowiki>SELECT name FROM opensim.assets WHERE hex(id) = replace('ef9c5edf-a9f8-4310-8048-97894453a614', '-', '');</nowiki><br />
<br />
* More complicated version - List inventory entries with a particular name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', replace(inventoryID, '-', '')) AS 'Inventory', <br />
concat(assets.name, ' - ', hex(assets.id)) AS 'Asset' FROM inventoryitems LEFT JOIN assets <br />
ON replace(assetID, '-', '')=hex(assets.id) WHERE inventoryName = 'My Inventory Item Here';</nowiki><br />
<br />
Given 'I can haz asset' as a name, and assuming several users had something called that in their inventories, this might return:<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Inventory | Asset |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| I can haz asset - 17b6ca75ca8444a1813718705c591be6 | Cheeseburger - 12345678123456781234567812345678 |<br />
| I can haz asset - 94ac2e6a26f74e03bedeff0e5747819a | lolcat in ur assets - 13371337133713371337133713371337 | <br />
| I can haz asset - 96a6dd77c3ec4ebf91ab7e182ebb7b41 | lolcat in ur assets - 13371337133713371337133713371337 |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
3 rows in set (0.00 sec)<br />
<br />
The last two entries are the same asset, but two different inventory entries. If you get a NULL result in the Asset column, that means the asset was not found (see the error checking section)<br />
<br />
<br />
Or, alternately, list all inventory items by asset name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', replace(inventoryID, '-', '')) AS 'Inventory', <br />
concat(assets.name, ' - ', hex(assets.id)) AS 'Asset' FROM opensim.inventoryitems INNER JOIN opensim.assets <br />
ON replace(assetID, '-', '')=hex(opensim.assets.id) WHERE opensim.assets.name = 'My Asset Name Here';</nowiki><br />
<br />
Which (given 'lolcat in ur assets' as the name) might return:<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Inventory | Asset |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Pretty Pikshurs - 7962c8de232042ce845c40653ca31a0a | lolcat in ur assets - 13371337133713371337133713371337 | <br />
| I can haz asset - 96a6dd77c3ec4ebf91ab7e182ebb7b41 | lolcat in ur assets - 13371337133713371337133713371337 | <br />
+----------------------------------------------------+--------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
<br />
<br />
==Counting things==<br />
<br />
* Count the total number of users:<br />
<br />
<nowiki>SELECT count(uuid) AS 'Users' FROM opensim.users;</nowiki><br />
<br />
* Count the number of users presently logged in (same issues as listing online users, above):<br />
<br />
<nowiki>SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE agentonline = '1';</nowiki><br />
<br />
* Count the number of Regions. There are different versions, depending on whether you run in standalone or grid mode, because standalone mode lacks the regions table.<br />
<br />
* Count the regions that have parcels:<br />
<nowiki>SELECT count(DISTINCT regionUUID) FROM opensim.land;</nowiki><br />
<br />
* Count the total number of parcels:<br />
<nowiki>SELECT count(UUID) AS 'Parcels' FROM opensim.land;</nowiki><br />
<br />
===Standalone mode===<br />
This may be slow if you have a lot of old terraforming revisions lying around your database:<br />
<nowiki>SELECT count(DISTINCT regionUUID) AS 'Regions' FROM opensim.terrain;</nowiki><br />
<br />
===Grid Mode===<br />
<br />
Version 1 counts unique Region names:<br />
<nowiki>SELECT count(DISTINCT regionName) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
Version 2 counts regionIDs, so if you have multiple entries for regions, this will catch them.<br />
<nowiki>SELECT count(UUID) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
<br />
<br />
==Error Checking==<br />
* List all inventory entries that point to assets that do not exist (this should never happen, but if there are items in your inventory that you can't seem to use something and/or the asset server complains about an asset missing, see if it turns up with):<br />
<nowiki>SELECT inventoryname, inventoryID, assetID FROM opensim.inventoryitems WHERE replace(assetID, '-', '') <br />
NOT IN (SELECT hex(id) FROM opensim.assets);</nowiki></div>Dynehttp://opensimulator.org/wiki/Useful_QueriesUseful Queries2008-06-17T22:20:56Z<p>Dyne: Note about database migration</p>
<hr />
<div>This page lists various SQL queries one can perform from a MySql console to check the database for various bits of information. They have not been tested in other SQL variants, and may or may not work as intended.<br />
<br />
'''NOTE: In SVN revision 5115 through 5123, the UUID fields migrated to a consistent format (the dashed form, like 00000000-0000-0000-0000-000000000000).'''<br />
<br />
'''This means that in earlier revision databases, you will need to use the hex(id) or replace(id, '-', <nowiki>''</nowiki>) functions to get the id's into a consistent format. hex(id) should be used for the assets table, and replace(id, '-', <nowiki>''</nowiki>) should be used on any uuid field that is in dashed form. UUID literals inserted into queries should not have dashes.'''<br />
<br />
'''On more recent databases, these functions are no longer necessary, and the id fields can be used directly.'''<br />
<br />
==Listing things==<br />
* List the users presently logged in (may be inflated due to users not getting logged out properly, whether due to bugs or crashes):<br />
<br />
<nowiki>SELECT concat(username, ' ', lastname) AS 'Online Users' FROM opensim.users <br />
INNER JOIN opensim.agents ON opensim.users.UUID = opensim.agents.UUID WHERE opensim.agents.agentonline = '1';</nowiki><br />
<br />
* List the Regions in your database (only works for grid mode):<br />
<nowiki>SELECT regionName as 'Regions' FROM opensim.regions;</nowiki><br />
<br />
* Find the asset UUID of a given inventory Item (replace the name with the one you want). This may return multiple rows if more than one inventory item exists, and some entries may point to a single asset, while others point at different assets.<br />
<nowiki>SELECT inventoryName, InventoryID, assetID FROM inventoryitems WHERE inventoryName = 'My Inventory Item Name Here';</nowiki><br />
<br />
* Verify a particular asset exists, given the UUID (usually you want to replace the UUID here with an assetID from the previous query):<br />
<nowiki>SELECT name FROM opensim.assets WHERE id = 'ef9c5edf-a9f8-4310-8048-97894453a614';</nowiki><br />
<br />
* More complicated version - List inventory entries with a particular name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', inventoryID) AS 'Inventory', <br />
concat(assets.name, ' - ', assets.id) AS 'Asset' FROM inventoryitems LEFT JOIN assets <br />
ON assetID=assets.id WHERE inventoryName = 'My Inventory Item Here';</nowiki><br />
<br />
Given 'I can haz asset' as a name, and assuming several users had something called that in their inventories, this might return:<br />
+--------------------------------------------------------+------------------------------------------------------------+<br />
| Inventory | Asset |<br />
+--------------------------------------------------------+------------------------------------------------------------+<br />
| I can haz asset - 17b6ca75-ca84-44a1-8137-18705c591be6 | Cheeseburger - 12345678-1234-5678-1234-567812345678 |<br />
| I can haz asset - 94ac2e6a-26f7-4e03-bede-ff0e5747819a | lolcat in ur assets - 13371337-1337-1337-1337-133713371337 | <br />
| I can haz asset - 96a6dd77-c3ec-4ebf-91ab-7e182ebb7b41 | lolcat in ur assets - 13371337-1337-1337-1337-133713371337 |<br />
+--------------------------------------------------------+------------------------------------------------------------+<br />
3 rows in set (0.00 sec)<br />
<br />
The last two entries are the same asset, but two different inventory entries. If you get a NULL result in the Asset column, that means the asset was not found (see the error checking section)<br />
<br />
<br />
Or, alternately, list all inventory items by asset name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', inventoryID) AS 'Inventory', <br />
concat(assets.name, ' - ', assets.id) AS 'Asset' FROM opensim.inventoryitems INNER JOIN opensim.assets <br />
ON assetID=opensim.assets.id WHERE opensim.assets.name = 'My Asset Name Here';</nowiki><br />
<br />
Which (given 'lolcat in ur assets' as the name) might return:<br />
+--------------------------------------------------------+------------------------------------------------------------+<br />
| Inventory | Asset |<br />
+--------------------------------------------------------+------------------------------------------------------------+<br />
| Pretty Pikshurs - 7962c8de-2320-42ce-845c-40653ca31a0a | lolcat in ur assets - 13371337-1337-1337-1337-133713371337 | <br />
| I can haz asset - 96a6dd77-c3ec-4ebf-91ab-7e182ebb7b41 | lolcat in ur assets - 13371337-1337-1337-1337-133713371337 | <br />
+--------------------------------------------------------+------------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
<br />
<br />
==Counting things==<br />
<br />
* Count the total number of users:<br />
<br />
<nowiki>SELECT count(uuid) AS 'Users' FROM opensim.users;</nowiki><br />
<br />
* Count the number of users presently logged in (same issues as listing online users, above):<br />
<br />
<nowiki>SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE agentonline = '1';</nowiki><br />
<br />
* Count the number of Regions. There are different versions, depending on whether you run in standalone or grid mode, because standalone mode lacks the regions table.<br />
<br />
* Count the regions that have parcels:<br />
<nowiki>SELECT count(DISTINCT regionUUID) FROM opensim.land;</nowiki><br />
<br />
* Count the total number of parcels:<br />
<nowiki>SELECT count(UUID) AS 'Parcels' FROM opensim.land;</nowiki><br />
<br />
===Standalone mode===<br />
This may be slow if you have a lot of old terraforming revisions lying around your database:<br />
<nowiki>SELECT count(DISTINCT regionUUID) AS 'Regions' FROM opensim.terrain;</nowiki><br />
<br />
===Grid Mode===<br />
<br />
Version 1 counts unique Region names:<br />
<nowiki>SELECT count(DISTINCT regionName) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
Version 2 counts regionIDs, so if you have multiple entries for regions, this will catch them.<br />
<nowiki>SELECT count(UUID) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
<br />
<br />
==Error Checking==<br />
* List all inventory entries that point to assets that do not exist (this should never happen, but if there are items in your inventory that you can't seem to use something and/or the asset server complains about an asset missing, see if it turns up with):<br />
<nowiki>SELECT inventoryname, inventoryID, assetID FROM opensim.inventoryitems WHERE assetID <br />
NOT IN (SELECT id FROM opensim.assets);</nowiki></div>Dynehttp://opensimulator.org/wiki/TroubleshootingTroubleshooting2008-05-31T13:21:59Z<p>Dyne: Rephrased, included a more reasonable default recommendation. People who use a shared database server probably shouldn't set year-long timeouts.</p>
<hr />
<div>[[Category:Users]]<br />
This page gives any system-specific configuration settings that may be useful, and advice for problems that might be encountered.<br />
<br />
== System-specific configuration ==<br />
=== CentOS 5 ===<br />
<br />
To install mono and nant, you can use the "Linux Installer for x86" found at http://www.mono-project.com/Downloads.<br />
<br />
SVN can be installed by:<br />
<br />
yum install subversion<br />
<br />
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>:<br />
<br />
export PATH="/opt/mono-1.2.5/bin:$PATH"<br />
export PKG_CONFIG_PATH="/opt/mono-1.2.5/lib/pkgconfig:$PKG_CONFIG_PATH"<br />
export MANPATH="/opt/mono-1.2.5/share/man:$MANPATH"<br />
export LD_LIBRARY_PATH="/opt/mono-1.2.5/lib:$LD_LIBRARY_PATH"<br />
<br />
After changing <tt>LD_LIBRARY_PATH</tt>, you should update the dynamic linker cache:<br />
<br />
ldconfig<br />
<br />
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:<br />
<br />
yum install glib<br />
<br />
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:<br />
<br />
iptables -I RH-Firewall-1-INPUT -p tcp --dport 9000 -j ACCEPT<br />
iptables -I RH-Firewall-1-INPUT -p udp --dport 9000 -j ACCEPT<br />
<br />
=== Debian 4.0r0 ===<br />
<br />
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':<br />
<br />
deb ftp://ftp.debian.org/debian/ unstable main<br />
deb-src ftp://ftp.debian.org/debian/ unstable main<br />
<br />
Then update your packages to the new versions:<br />
<br />
apt-get update<br />
apt-get dist-upgrade<br />
<br />
This will probably change a large number of packages, and may break things.<br />
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.<br />
<br />
Once the sources are updated, we need to install the necessary packages to be able to build OpenSim:<br />
<br />
apt-get install subversion mono nant mono-gmcs mono-mjs libmono-microsoft8.0-cil libmono-system-runtime2.0-cil<br />
<br />
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.<br />
<br />
=== Gentoo ===<br />
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:<br />
<br />
ACCEPT_KEYWORDS="~x86" emerge -vp subversion nant mono libgdiplus<br />
<br />
Ten install with:<br />
<br />
ACCEPT_KEYWORDS="~x86" emerge subversion nant mono libgdiplus<br />
<br />
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<br />
<br />
=== Mac OS X ===<br />
This assumes you're using the universal binary for mono from the [http://www.mono-project.com/ Mono Project] site.<br />
<br />
If you are using OS X 10.4, you should also install X11 from the OS X install CDs.<br />
In OS X 10.5, this is not required.<br />
<br />
If you get errors about the 2.0 framework not being supported, you may need to update your <tt>pkg-config</tt> path.<br />
I set this in <tt>~/.bash_profile</tt>:<br />
export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/:${PKG_CONFIG_PATH}"<br />
<br />
== Errors and fixes ==<br />
<br />
=== Build workarounds due to non-functionality or bugs: ===<br />
<br />
==== Disappearing prims due to duplicate UID's ====<br />
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.<br />
<br />
==== Linked objects not scaling/editing properly ====<br />
From Mantis [[http://opensimulator.org/mantis/view.php?id=135 # 135]] and [[http://opensimulator.org/mantis/view.php?id=223 # 223]]: <br /><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 /><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. <br />
<br />
<hr><br />
<br />
=== Exception and loss of ode physics System.EntryPointNotFoundException: dSpaceLockQuery ===<br />
<br />
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.<br />
<br />
[SCENE] [02-01 22:20:40] System.EntryPointNotFoundException: dSpaceLockQuery<br />
at (wrapper managed-to-native) Ode.NET.d:SpaceLockQuery (intptr)<br />
at OpenSim.Region.Physics.OdePlugin.OdeScene.waitForSpaceUnlock (IntPtr space) [0x00000] <br />
at OpenSim.Region.Physics.OdePlugin.OdeCharacter.AvatarGeomAndBodyCreation (Single npositionX, Single npositionY, Single npositionZ, Single tensor) [0x00000] <br />
at OpenSim.Region.Physics.OdePlugin.OdeCharacter..ctor (System.String avName, OpenSim.Region.Physics.OdePlugin.OdeScene parent_scene, OpenSim.Region.Physics.Manager.PhysicsVector pos) [0x00000] <br />
at OpenSim.Region.Physics.OdePlugin.OdeScene.AddAvatar (System.String avName, OpenSim.Region.Physics.Manager.PhysicsVector position) [0x00000] <br />
at OpenSim.Region.Environment.Scenes.ScenePresence.AddToPhysicalScene () [0x00000] <br />
at OpenSim.Region.Environment.Scenes.ScenePresence.MakeRootAgent (LLVector3 pos, Boolean isFlying) [0x00000] <br />
at OpenSim.Region.Environment.Scenes.Scene.AgentCrossing (UInt64 regionHandle, LLUUID agentID, LLVector3 position, Boolean isFlying) [0x00000]<br />
=== MySQL connection errors after about 6-8 hours ===<br />
<br />
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:<br />
<br />
set global wait_timeout=604800;<br />
<br />
=== System.DllNotFoundException: gdiplus.dll ===<br />
<br />
First, check to make sure that <tt>libgdiplus.so</tt> is known to the dynamic linker:<br />
<br />
/sbin/ldconfig -p | grep libgdiplus<br />
<br />
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.<br />
<br />
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:<br />
<br />
MONO_LOG_LEVEL=debug mono OpenSim.exe<br />
<br />
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:<br />
<br />
ln -s libexif.so.12 libexif.so.9<br />
<br />
''(Is there a cleaner solution than this?)''<br />
<br />
=== The assembly mscorlib.dll was not found or could not be loaded ===<br />
<br />
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.<br />
<br />
apt-get install nant<br />
<br />
=== External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe === <br />
<br />
This is quickly fixed by retrieving mono-gmcs.<br />
<br />
apt-get install mono-gmcs<br />
<br />
=== The type or namespace name JScript does not exist in the namespace Microsoft ===<br />
<br />
Note that it says Jscript over and over again. Hint perhaps?<br />
<br />
apt-get install mono-mjs libmono-microsoft8.0-cil<br />
<br />
On Fedora, the needed package is mono-jscript<br />
<br />
=== The type or namespace name Tcp does not exist in the namespace System.Runtime.Remoting.Channels ===<br />
<br />
This one is taken care of with a quick install:<br />
<br />
apt-get install libmono-system-runtime2.0-cil<br />
<br />
=== Missing: libopenjpeg-libsl-2.1.2.0-x86_64.so ===<br />
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 ]]<br />
<br />
<br />
=== error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
apt-get install libglib2.0-0<br />
<br />
=== The current runtime framework 'mono-2.0' is not correctly configured in the NAnt configuration file. ===<br />
<br />
This one seems to be fixed by retrieving the apt version of nant.<br />
<br />
apt-get install nant<br />
<br />
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.<br />
<br />
== Networking and config issues ==<br />
[[OpenSim:Running |See Running section]]<br />
<br />
=== You are able to log in, but not connect to a Region from a remote client ===<br />
<br />
Look in your OpenSimulator/bin/Regions folder <br />
1) Try 0.0.0.0 for the internal_ip_address in your region.xml(default.xml) file<br />
(you'll have one of those files *per* region you've created)<br />
2) external_host_name="127.0.0.1" will need to be changed to the accessable DNS name<br />
such as "opensim.example-host.com" or "71.6.131.152" (your public accessable ip)<br />
<br />
==Building OpenSim==<br />
===I can't find any build files or solution files===<br />
* If you're on Windows, run <tt>runprebuild.bat</tt> - on Linux/Mac/FreeBSD, run <tt>runprebuild.sh</tt><br />
=== VS2005 won't open the .sln file ===<br />
* Try running VS2005 C#. You are probably running VS2005 C++. This is a C# project.<br />
<br />
==Running OpenSim==<br />
=== Running OpenSim.exe from a Cygwin shell has access denied for some dll's ===<br />
* Do a '<tt>cd bin</tt>' followed by '<tt>chmod a+x *</tt>' to make all dll files executable.<br />
===I cannot start my sim===<br />
* See [[Configuration]]<br />
<br />
==Something Has Gone Wrong!==<br />
=== I get errors concerning 'owner_uuid' when starting up my grid after updating from svn beyond r3254 ===<br />
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:<br />
alter table `regions` add column `owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null, comment 'Rev.2';<br />
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.<br />
<br />
=== I get errors concerning 'State' when starting up my grid after updating from svn beyond r3786 ===<br />
After r3786, a new 'State' field has been added to the 'primshapes' table on SQLite. This field is used to persist trees and grass.<br />
You may have an empty region at startup, because OpenSim does not find this 'State' field and does not know what to do.<br />
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:<br />
alter table primshapes add column State integer default 0<br />
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.<br />
<br />
=== I get a timeout during region handshake ===<br />
* Do you have the correct IP in your Regions\* config files?<br />
* 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.<br />
<br />
=== I cannot connect to my OpenSim ===<br />
* See [[OpenSim: Connecting]]<br />
<br />
===I can connect but cannot move===<br />
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.<br />
* See [[OpenSim: Configuration]]<br />
<br />
=== From time to time my Avatar seems to get stuck ===<br />
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.<br />
<br />
=== I have problems with viewing the worldmap ===<br />
* This may happen when running OpenSim on a Linux server, both in grid or standalone mode.<br />
* 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...<br />
* Reason: your svn source trunk does not have the correct (or whatever...) <tt>libopenjpeg-libsl</tt> library.<br />
* Other reason: the file "defaultstripe.png" does not exists in the same OpenSim folder, or is corrupted.<br />
* 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.<br />
* Recompile & restart OpenSim<br />
<br />
==Exceptions on the Console==<br />
This is a list of Exceptions that you may see on the console, what they mean, and if they are a problem.<br />
<br />
===System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so===<br />
Failed generating terrain map: System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so<br />
at (wrapper managed-to-native) OpenJPEGNet.OpenJPEG:LibslAllocDecoded OpenJPEGNet.OpenJPEG/LibslImage&)<br />
at OpenJPEGNet.OpenJPEG.Encode (System.Byte[] decoded, Int32 width, Int32 height, Int32 components, Boolean lossless) [0x00000]<br />
at OpenJPEGNet.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000]<br />
at OpenSim.Region.Terrain.TerrainEngine.ExportJpegImage (System.String gradientmap) [0x00000]<br />
<br />
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:<br />
* You have an old processor (libopenjpeg has been compiled with optimizations)<br />
* You are running in 64bit mode (none of the native libs are built for 64bit)<br />
<br />
You can rebuild your own libopenjpeg from source, or run in a compatible environment.<br />
You can do this by:<br />
svn co svn://opensecondlife.org/libsl/trunk libsl<br />
cd libsl/openjpeg-libsl/<br />
make<br />
<br />
then copy libopenjpeg-libsl-2.1.2.0.so into OpenSim bin-folder.<br />
<br />
==Grid Mode==<br />
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.<br />
<br />
=== I start the sim and it doesn't connect to any grid ===<br />
<br />
When OpenSim is first started, it needs configuration.<br />
<br />
* See [[OpenSim: Configuration]].<br />
<br />
===I start the OpenSim.Grid.UserServer.exe and it gives an error===<br />
If this error is access denied for <tt>username@localhost</tt>, the mysql database is not set up.<br />
It will print some text and wait for input - either an enter to accept a default value, or another value you can supply.<br />
* See [[OpenSim: Configuration]].<br />
<br />
===I want to run my own Local Grid but one or more servers fail to start===<br />
* Be sure that you're able to start <tt>OpenSim.exe</tt> alone, in Standalone mode, and to be able to login.<br />
* Start the servers in the correct UGAS order and answer the questions as recommended (see [[OpenSim: Configuration]]).<br />
* 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.<br />
* Check again all the <tt>*.xml</tt> configuration files for any wrong settings or typing errors...!<br />
* Don't forget to connect with your SL-viewer to port 8002 (Grid User-Server) instead of 9000 (Standalone OpenSim-Server).<br />
* 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.<br />
<br />
===I get a bunch of asset not found errors, while connected to a online grid, and my inventory doesn't seem to work right===<br />
*Make sure your opensim.ini has ' asset_database = "grid" ' otherwise it will not work correctly.<br />
[[Category:Users]]</div>Dynehttp://opensimulator.org/wiki/Useful_QueriesUseful Queries2008-05-20T14:29:31Z<p>Dyne: rearrange for less ambiguity</p>
<hr />
<div>This page lists various SQL queries one can perform from a MySql console to check the database for various bits of information. They have not been tested in other SQL variants, and may or may not work as intended:<br />
<br />
==Listing things==<br />
* List the users presently logged in (may be inflated due to users not getting logged out properly, whether due to bugs or crashes):<br />
<br />
<nowiki>SELECT concat(username, ' ', lastname) AS 'Online Users' FROM opensim.users <br />
INNER JOIN opensim.agents ON opensim.users.UUID = opensim.agents.UUID WHERE opensim.agents.agentonline = '1';</nowiki><br />
<br />
* List the Regions in your database (only works for grid mode):<br />
<nowiki>SELECT regionName as 'Regions' FROM opensim.regions;</nowiki><br />
<br />
* Find the asset UUID of a given inventory Item (replace the name with the one you want). This may return multiple rows if more than one inventory item exists, and some entries may point to a single asset, while others point at different assets.<br />
<nowiki>SELECT inventoryName, InventoryID, assetID FROM inventoryitems WHERE inventoryName = 'My Inventory Item Name Here';</nowiki><br />
<br />
* Verify a particular asset exists, given the UUID (usually you want to replace the UUID here with an assetID from the previous query):<br />
<nowiki>SELECT name FROM opensim.assets WHERE hex(id) = replace('ef9c5edf-a9f8-4310-8048-97894453a614', '-', '');</nowiki><br />
<br />
* More complicated version - List inventory entries with a particular name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', replace(inventoryID, '-', '')) AS 'Inventory', <br />
concat(assets.name, ' - ', hex(assets.id)) AS 'Asset' FROM inventoryitems LEFT JOIN assets <br />
ON replace(assetID, '-', '')=hex(assets.id) WHERE inventoryName = 'My Inventory Item Here';</nowiki><br />
<br />
Given 'I can haz asset' as a name, and assuming several users had something called that in their inventories, this might return:<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Inventory | Asset |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| I can haz asset - 17b6ca75ca8444a1813718705c591be6 | Cheeseburger - 12345678123456781234567812345678 |<br />
| I can haz asset - 94ac2e6a26f74e03bedeff0e5747819a | lolcat in ur assets - 13371337133713371337133713371337 | <br />
| I can haz asset - 96a6dd77c3ec4ebf91ab7e182ebb7b41 | lolcat in ur assets - 13371337133713371337133713371337 |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
3 rows in set (0.00 sec)<br />
<br />
The last two entries are the same asset, but two different inventory entries. If you get a NULL result in the Asset column, that means the asset was not found (see the error checking section)<br />
<br />
<br />
Or, alternately, list all inventory items by asset name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', replace(inventoryID, '-', '')) AS 'Inventory', <br />
concat(assets.name, ' - ', hex(assets.id)) AS 'Asset' FROM opensim.inventoryitems INNER JOIN opensim.assets <br />
ON replace(assetID, '-', '')=hex(opensim.assets.id) WHERE opensim.assets.name = 'My Asset Name Here';</nowiki><br />
<br />
Which (given 'lolcat in ur assets' as the name) might return:<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Inventory | Asset |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Pretty Pikshurs - 7962c8de232042ce845c40653ca31a0a | lolcat in ur assets - 13371337133713371337133713371337 | <br />
| I can haz asset - 96a6dd77c3ec4ebf91ab7e182ebb7b41 | lolcat in ur assets - 13371337133713371337133713371337 | <br />
+----------------------------------------------------+--------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
<br />
<br />
==Counting things==<br />
<br />
* Count the total number of users:<br />
<br />
<nowiki>SELECT count(uuid) AS 'Users' FROM opensim.users;</nowiki><br />
<br />
* Count the number of users presently logged in (same issues as listing online users, above):<br />
<br />
<nowiki>SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE agentonline = '1';</nowiki><br />
<br />
* Count the number of Regions. There are different versions, depending on whether you run in standalone or grid mode, because standalone mode lacks the regions table.<br />
<br />
* Count the regions that have parcels:<br />
<nowiki>SELECT count(DISTINCT regionUUID) FROM opensim.land;</nowiki><br />
<br />
* Count the total number of parcels:<br />
<nowiki>SELECT count(UUID) AS 'Parcels' FROM opensim.land;</nowiki><br />
<br />
===Standalone mode===<br />
This may be slow if you have a lot of old terraforming revisions lying around your database:<br />
<nowiki>SELECT count(DISTINCT regionUUID) AS 'Regions' FROM opensim.terrain;</nowiki><br />
<br />
===Grid Mode===<br />
<br />
Version 1 counts unique Region names:<br />
<nowiki>SELECT count(DISTINCT regionName) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
Version 2 counts regionIDs, so if you have multiple entries for regions, this will catch them.<br />
<nowiki>SELECT count(UUID) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
<br />
<br />
==Error Checking==<br />
* List all inventory entries that point to assets that do not exist (this should never happen, but if there are items in your inventory that you can't seem to use something and/or the asset server complains about an asset missing, see if it turns up with):<br />
<nowiki>SELECT inventoryname, inventoryID, assetID FROM opensim.inventoryitems WHERE replace(assetID, '-', '') <br />
NOT IN (SELECT hex(id) FROM opensim.assets);</nowiki></div>Dynehttp://opensimulator.org/wiki/User_DocumentationUser Documentation2008-05-20T13:49:02Z<p>Dyne: Add link to database page</p>
<hr />
<div>{{Template:Quicklinks}}<br />
__NOTOC__<br />
==Initial Setup==<br />
* [[Download]] - Download instructions<br />
* [[OpenSim Build Instructions|Build Instructions]] - How to build and compile OpenSim from Source<br />
* [[OpenSim Configuration|Configuration]] - How to get your OpenSim server up and running<br />
* [[Connecting]] - How to connect a compatible viewer to OpenSim<br />
* [[Troubleshooting]] - How to trouble shoot your OpenSim installation.<br />
* [[Tips]] - Useful tips from users like you<br />
* [[FAQ]] - Frequently Asked Questions<br />
<br />
==Administrator Guide==<br />
* [[Server Commands]] - Commands to control OpenSim<br />
* [[OpenSim Database support]] - Dealing with databases<br />
* [[Custom Libraries]] - Describes how to add custom content to your OpenSim server<br />
* [[Automating Tasks]] - How to make administrating a walk in the park<br />
* [[Network Settings]] - NAT, Ports, Services and more...<br />
* [[Management]] - All about being an effective administrator/moderator<br />
* [[Performance]] - How to tweak OpenSim's performance<br />
* [[Console-less OpenSim]] - How to run OpenSim without console<br />
<br />
==Scripting==<br />
* [[Scripting Documentation]] - Everything you need to know about OpenSim scripting<br />
* [[Scripting Library]] - A list of example scripts<br />
<br />
==Tutorials==<br />
* [[OSGrid Region Registration]] - Describes how to link your region into OS-Grid<br />
* [[Hints & Tricks]] - A page for Hints and Tricks<br />
* [[Using L3DT]] - How to create custom terrains<br />
* [[Production environment]] - How to setup a production environment with Linux-servers <br />
<br />
==Contribution Policy==<br />
* [[User_Wiki_Conventions|User Wiki Conventions]] - Read this carefully, before adding content to the wiki<br />
[[Category:Users]]<br />
<cleanpage title=hide cats=hide /></div>Dynehttp://opensimulator.org/wiki/Useful_QueriesUseful Queries2008-05-20T13:45:07Z<p>Dyne: New page: This page lists various SQL queries one can perform from a MySql console to check the database for various bits of information. They have not been tested in other SQL variants, and may or...</p>
<hr />
<div>This page lists various SQL queries one can perform from a MySql console to check the database for various bits of information. They have not been tested in other SQL variants, and may or may not work as intended:<br />
<br />
==Listing things==<br />
* List the users presently logged in (may be inflated due to users not getting logged out properly, whether due to bugs or crashes):<br />
<br />
<nowiki>SELECT concat(username, ' ', lastname) AS 'Online Users' FROM opensim.users <br />
INNER JOIN opensim.agents ON opensim.users.UUID = opensim.agents.UUID WHERE opensim.agents.agentonline = '1';</nowiki><br />
<br />
* List the Regions in your database (only works for grid mode):<br />
<nowiki>SELECT regionName as 'Regions' FROM opensim.regions;</nowiki><br />
<br />
* Find the asset UUID of a given inventory Item (replace the name with the one you want). This may return multiple rows if more than one inventory item exists, and some entries may point to a single asset, while others point at different assets.<br />
<nowiki>SELECT inventoryName, InventoryID, assetID FROM inventoryitems WHERE inventoryName = 'My Inventory Item Name Here';</nowiki><br />
<br />
* Verify a particular asset exists, given the UUID (usually you want to replace the UUID here with an assetID from the previous query):<br />
<nowiki>SELECT name FROM opensim.assets WHERE hex(id) = replace('ef9c5edf-a9f8-4310-8048-97894453a614', '-', '');</nowiki><br />
<br />
* More complicated version - List inventory entries with a particular name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', replace(inventoryID, '-', '')) AS 'Inventory', <br />
concat(assets.name, ' - ', hex(assets.id)) AS 'Asset' FROM inventoryitems LEFT JOIN assets <br />
ON replace(assetID, '-', '')=hex(assets.id) WHERE inventoryName = 'My Inventory Item Here';</nowiki><br />
<br />
Given 'I can haz asset' as a name, and assuming several users had something called that in their inventories, this might return:<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Inventory | Asset |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| I can haz asset - 17b6ca75ca8444a1813718705c591be6 | Cheeseburger - 12345678123456781234567812345678 |<br />
| I can haz asset - 94ac2e6a26f74e03bedeff0e5747819a | lolcat in ur assets - 13371337133713371337133713371337 | <br />
| I can haz asset - 96a6dd77c3ec4ebf91ab7e182ebb7b41 | lolcat in ur assets - 13371337133713371337133713371337 |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
3 rows in set (0.00 sec)<br />
<br />
The last two entries are the same asset, but two different inventory entries. If you get a NULL result in the Asset column, that means the asset was not found (see the error checking section)<br />
<br />
<br />
Or, alternately, list all inventory items by asset name:<br />
<nowiki>SELECT concat(inventoryName, ' - ', replace(inventoryID, '-', '')) AS 'Inventory', <br />
concat(assets.name, ' - ', hex(assets.id)) AS 'Asset' FROM opensim.inventoryitems INNER JOIN opensim.assets <br />
ON replace(assetID, '-', '')=hex(opensim.assets.id) WHERE opensim.assets.name = 'My Asset Name Here';</nowiki><br />
<br />
Which (given 'lolcat in ur assets' as the name) might return:<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Inventory | Asset |<br />
+----------------------------------------------------+--------------------------------------------------------+<br />
| Pretty Pikshurs - 7962c8de232042ce845c40653ca31a0a | lolcat in ur assets - 13371337133713371337133713371337 | <br />
| I can haz asset - 96a6dd77c3ec4ebf91ab7e182ebb7b41 | lolcat in ur assets - 13371337133713371337133713371337 | <br />
+----------------------------------------------------+--------------------------------------------------------+<br />
2 rows in set (0.00 sec)<br />
<br />
<br />
<br />
==Counting things==<br />
<br />
* Count the total number of users:<br />
<br />
<nowiki>SELECT count(uuid) AS 'Users' FROM opensim.users;</nowiki><br />
<br />
* Count the number of users presently logged in (same issues as listing online users, above):<br />
<br />
<nowiki>SELECT count(UUID) AS 'Users Online' FROM opensim.agents WHERE agentonline = '1';</nowiki><br />
<br />
* Count the number of Regions. There are different versions, depending on whether you run in standalone or grid mode, because standalone mode lacks the regions table.<br />
<br />
===Standalone mode===<br />
This may be slow if you have a lot of old terraforming revisions lying around your database:<br />
<nowiki>SELECT count(DISTINCT regionUUID) AS 'Regions' FROM opensim.terrain;</nowiki><br />
<br />
===Grid Mode===<br />
<br />
Version 1 counts unique Region names:<br />
<nowiki>SELECT count(DISTINCT regionName) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
Version 2 counts regionIDs, so if you have multiple entries for regions, this will catch them.<br />
<nowiki>SELECT count(UUID) AS 'Regions' FROM opensim.regions;</nowiki><br />
<br />
* Count the regions that have parcels:<br />
<nowiki>SELECT count(DISTINCT regionUUID) FROM opensim.land;</nowiki><br />
<br />
* Count the total number of parcels:<br />
<nowiki>SELECT count(UUID) AS 'Parcels' FROM opensim.land;</nowiki><br />
<br />
<br />
==Error Checking==<br />
* List all inventory entries that point to assets that do not exist (this should never happen, but if there are items in your inventory that you can't seem to use something and/or the asset server complains about an asset missing, see if it turns up with):<br />
<nowiki>SELECT inventoryname, inventoryID, assetID FROM opensim.inventoryitems WHERE replace(assetID, '-', '') <br />
NOT IN (SELECT hex(id) FROM opensim.assets);</nowiki></div>Dynehttp://opensimulator.org/wiki/Talk:Automating_TasksTalk:Automating Tasks2008-05-01T02:09:21Z<p>Dyne: Comment on screen command</p>
<hr />
<div>Re: the Unix section on shutdown servers<br />
<br />
screen -r 8419.OpenSim<br />
shutdown<br />
<br />
You don't need to specify the whole session title (most importantly, the process number needn't be specified). You can just do "screen -r Ope", "screen -r User", or some other unique substring in the title. It is case sensitive, however.<br />
<br />
- [[User:Dyne|Dyne]] 19:09, 30 April 2008 (PDT)</div>Dynehttp://opensimulator.org/wiki/User:DyneUser:Dyne2008-04-30T14:31:13Z<p>Dyne: Note about</p>
<hr />
<div>I am posting this here for the time being; it will probably eventually be put somewhere else in the User Docs section.<br />
<br />
<br />
Below is a python script that takes one or more images (usually greyscale terrain maps, large enough for multiple sims) and splits them into sim-sized tiles. The tiles will be inverted along the Y axis to match OpenSim's axes (you could do this from L3DT, but I find it nicer to have a correctly-oriented full map handy).<br />
<br />
This basically does the same thing as <code>script terrain load-tile</code>, but since I wanted to use [http://www.spinmass.com/bailiwick Bailiwick] to fiddle with the channels of the sim, and it doesn't take multi-sim input files, I needed to do it a different way. Hopefully this will be useful.<br />
<br />
Copy the script into your text editor and name the thing terrain-split.py (or whatever). Note that it requires that the [http://www.pythonware.com/products/pil/ Python Imaging Library] be installed, or it won't work.<br />
<br />
===Usage===<br />
<br />
Assuming that your input is a 512x512 pixel image at the following path (relative to the where you invoke the script):<br />
<br />
:mysims/multisim.png<br />
<br />
Then you'd run it like:<br />
<br />
:<code>python terrain-split.py mysims/multisim.png</code><br />
<br />
This will do one of two things, depending on the value of the <code>__interactive__</code> variable (I haven't made that into a nice commandline switch yet). If it is 0, then the script will spit out these files (along with some text output):<br />
<br />
* mysims/multisim.0.1.png (the northwest piece)<br />
* mysims/multisim.1.1.png (the northeast piece)<br />
* mysims/multisim.0.0.png (the southwest piece)<br />
* mysims/multisim.1.0.png (the southeast piece)<br />
<br />
The numbers there are intended to aid you in picking grid positions for those sims. You choose a grid position for the lower left/southwest sim ... say (1575, 634). Then, for each sim, just add those two numbers to the base grid X and Y respectively:<br />
<br />
* NW: 1575, 635<br />
* NE: 1576, 635<br />
* SW: 1575, 634<br />
* SE: 1576, 634<br />
<br />
If the <code>__interactive__</code> variable is set to 1, the script will be slightly nicer and ask you for the base grid coordinate (always for the sim in the lower left corner) and then the name of each sim as it processes it. If I used the same input file and base coordinates as above, and named the above sims "alice", "bob", "charles", and "dan", then it'd spit out these files:<br />
<br />
* mysims/alice.1575.635.png<br />
* mysims/bob.1576.635.png<br />
* mysims/charles.1575.634.png<br />
* mysims/dan.1576.634.png<br />
<br />
The tilesize is defined in the script (256 pixels by default, to match the required size for a sim texture at present). The script will take images of arbitrary size (so you could use a 768x1024 input, which will produce 12 sims, in 3 rows and 4 columns), but any pixels along the right or bottom edges that aren't large enough to be a full tile will get ignored. You can also specify multiple input files, and it'll loop through them one by one.<br />
<br />
I left the noninteractive mode in, just in case someone wanted to use this in a more automatic fashion.<br />
<br />
This has ''not'' been fully tested, so there may well be stupid bugs.<br />
<br />
<br />
===Script===<br />
<code><pre><nowiki>#!/usr/bin/python<br />
'''This simple script takes the filename of an image that is a multiple of the tilesize (256 by default), and splits it into tiles of that size.<br />
<br />
USAGE: python terrain-split.py infile1 [infile2 ... infileN]<br />
<br />
Note that any extra pixels in the original image beyond an even multiple of the tilesize are ignored.<br />
'''<br />
<br />
__interactive__ = 1<br />
<br />
import Image, ImageOps<br />
import os.path, sys<br />
<br />
tilesize=256<br />
<br />
for infile in sys.argv[1:]:<br />
try:<br />
myimage = Image.open(infile)<br />
path, filename = os.path.split(infile)<br />
basename, extension = os.path.splitext(filename)<br />
(width,height) = myimage.size<br />
tileswide = width // tilesize<br />
tileshigh = height // tilesize<br />
twremain = width % tilesize # leftover pixels<br />
thremain = height % tilesize # leftover pixels<br />
<br />
print<br />
print "---------------------------------------------------------"<br />
print "Input file: " + infile<br />
print "Image dimensions: %s x %s pixels" % (width,height)<br />
print "Output: %s x %s tiles (%s files) of %s pixels square" % (tileswide, tileshigh, tileswide*tileshigh, tilesize)<br />
print "Pixels truncated: %s across, %s down" % (twremain, thremain)<br />
if __interactive__:<br />
print<br />
print "Note: Values in [brackets] are defaults."<br />
print<br />
xin = raw_input("What is the desired grid X coordinate of the lower-left sim [1000]? ")<br />
if xin == "":<br />
basegridX = 1000<br />
else:<br />
basegridX = int(xin)<br />
yin = raw_input("What is the desired grid Y coordinate of the lower-left sim [1000]? ")<br />
if yin == "":<br />
basegridY = 1000<br />
else:<br />
basegridY = int(yin)<br />
for y in range(tileshigh):<br />
print<br />
print "Tiling Row #%s" % str(y+1)<br />
for x in range(tileswide):<br />
# Compute the upper left corner<br />
xnew = x * tilesize<br />
ynew = y * tilesize<br />
yrelative = tileshigh-y-1<br />
<br />
# Decide how to name the file<br />
if __interactive__: # the filename will be based on individual names and will include the actual grid coordinates<br />
nameprompt = "What is the name of the sim at row %s, column %s [%s]? " % (y+1, x+1, basename)<br />
simname = raw_input(nameprompt)<br />
if simname == "":<br />
simname = basename<br />
newfile = simname + "." + str(x + basegridX) + "." + str(basegridY+yrelative) + extension<br />
else: # the filename of our output tile is based on the input file and includes relative positions<br />
newfile = basename + "." + str(x) + "." + str(yrelative) + extension<br />
outfile = os.path.join(path, newfile)<br />
<br />
# Create the tile<br />
# Flip the tile along the way (transpose) to account for inverted Y axis.<br />
borders = (xnew, ynew, xnew+tilesize, ynew+tilesize)<br />
tile = Image.new("RGB", (tilesize, tilesize))<br />
region = myimage.crop(borders).transpose(Image.FLIP_TOP_BOTTOM)<br />
tile.paste(region, (0,0) )<br />
<br />
# Attempt to save it <br />
try:<br />
tile.save(outfile)<br />
print "Writing: File %s with coords %s - %s" % (outfile, (xnew,ynew), (xnew+tilesize-1, ynew+tilesize-1) )<br />
except IOError:<br />
print "Cannot open output file ", outfile<br />
except IOError:<br />
print "Cannot open file ", infile<br />
print "---------------------------------------------------------"</nowiki></pre></code></div>Dynehttp://opensimulator.org/wiki/User:DyneUser:Dyne2008-04-30T13:46:27Z<p>Dyne: Terrain splitting script</p>
<hr />
<div>I am posting this here for the time being; it will probably eventually be put somewhere else in the User Docs section.<br />
<br />
<br />
Below is a python script that takes one or more images (usually greyscale terrain maps, large enough for multiple sims) and splits them into sim-sized tiles. The tiles will be inverted along the Y axis to match OpenSim's axes (you could do this from L3DT, but I find it nicer to have a correctly-oriented full map handy).<br />
<br />
Copy the script into your text editor and name the thing terrain-split.py (or whatever). Note that it requires that the [http://www.pythonware.com/products/pil/ Python Imaging Library] be installed, or it won't work.<br />
<br />
===Usage===<br />
<br />
Assuming that your input is a 512x512 pixel image at the following path (relative to the where you invoke the script):<br />
<br />
:mysims/multisim.png<br />
<br />
Then you'd run it like:<br />
<br />
:<code>python terrain-split.py mysims/multisim.png</code><br />
<br />
This will do one of two things, depending on the value of the <code>__interactive__</code> variable (I haven't made that into a nice commandline switch yet). If it is 0, then the script will spit out these files (along with some text output):<br />
<br />
* mysims/multisim.0.1.png (the northwest piece)<br />
* mysims/multisim.1.1.png (the northeast piece)<br />
* mysims/multisim.0.0.png (the southwest piece)<br />
* mysims/multisim.1.0.png (the southeast piece)<br />
<br />
The numbers there are intended to aid you in picking grid positions for those sims. You choose a grid position for the lower left/southwest sim ... say (1575, 634). Then, for each sim, just add those two numbers to the base grid X and Y respectively:<br />
<br />
* NW: 1575, 635<br />
* NE: 1576, 635<br />
* SW: 1575, 634<br />
* SE: 1576, 634<br />
<br />
If the <code>__interactive__</code> variable is set to 1, the script will be slightly nicer and ask you for the base grid coordinate (always for the sim in the lower left corner) and then the name of each sim as it processes it. If I used the same input file and base coordinates as above, and named the above sims "alice", "bob", "charles", and "dan", then it'd spit out these files:<br />
<br />
* mysims/alice.1575.635.png<br />
* mysims/bob.1576.635.png<br />
* mysims/charles.1575.634.png<br />
* mysims/dan.1576.634.png<br />
<br />
The tilesize is defined in the script (256 pixels by default, to match the required size for a sim texture at present). The script will take images of arbitrary size (so you could use a 768x1024 input, which will produce 12 sims, in 3 rows and 4 columns), but any pixels along the right or bottom edges that aren't large enough to be a full tile will get ignored. You can also specify multiple input files, and it'll loop through them one by one.<br />
<br />
I left the noninteractive mode in, just in case someone wanted to use this in a more automatic fashion.<br />
<br />
This has ''not'' been fully tested, so there may well be stupid bugs.<br />
<br />
<br />
===Script===<br />
<code><pre><nowiki>#!/usr/bin/python<br />
'''This simple script takes the filename of an image that is a multiple of the tilesize (256 by default), and splits it into tiles of that size.<br />
<br />
USAGE: python terrain-split.py infile1 [infile2 ... infileN]<br />
<br />
Note that any extra pixels in the original image beyond an even multiple of the tilesize are ignored.<br />
'''<br />
<br />
__interactive__ = 1<br />
<br />
import Image, ImageOps<br />
import os.path, sys<br />
<br />
tilesize=256<br />
<br />
for infile in sys.argv[1:]:<br />
try:<br />
myimage = Image.open(infile)<br />
path, filename = os.path.split(infile)<br />
basename, extension = os.path.splitext(filename)<br />
(width,height) = myimage.size<br />
tileswide = width // tilesize<br />
tileshigh = height // tilesize<br />
twremain = width % tilesize # leftover pixels<br />
thremain = height % tilesize # leftover pixels<br />
<br />
print<br />
print "---------------------------------------------------------"<br />
print "Input file: " + infile<br />
print "Image dimensions: %s x %s pixels" % (width,height)<br />
print "Output: %s x %s tiles (%s files) of %s pixels square" % (tileswide, tileshigh, tileswide*tileshigh, tilesize)<br />
print "Pixels truncated: %s across, %s down" % (twremain, thremain)<br />
if __interactive__:<br />
print<br />
print "Note: Values in [brackets] are defaults."<br />
print<br />
xin = raw_input("What is the desired grid X coordinate of the lower-left sim [1000]? ")<br />
if xin == "":<br />
basegridX = 1000<br />
else:<br />
basegridX = int(xin)<br />
yin = raw_input("What is the desired grid Y coordinate of the lower-left sim [1000]? ")<br />
if yin == "":<br />
basegridY = 1000<br />
else:<br />
basegridY = int(yin)<br />
for y in range(tileshigh):<br />
print<br />
print "Tiling Row #%s" % str(y+1)<br />
for x in range(tileswide):<br />
# Compute the upper left corner<br />
xnew = x * tilesize<br />
ynew = y * tilesize<br />
yrelative = tileshigh-y-1<br />
<br />
# Decide how to name the file<br />
if __interactive__: # the filename will be based on individual names and will include the actual grid coordinates<br />
nameprompt = "What is the name of the sim at row %s, column %s [%s]? " % (y+1, x+1, basename)<br />
simname = raw_input(nameprompt)<br />
if simname == "":<br />
simname = basename<br />
newfile = simname + "." + str(x + basegridX) + "." + str(basegridY+yrelative) + extension<br />
else: # the filename of our output tile is based on the input file and includes relative positions<br />
newfile = basename + "." + str(x) + "." + str(yrelative) + extension<br />
outfile = os.path.join(path, newfile)<br />
<br />
# Create the tile<br />
# Flip the tile along the way (transpose) to account for inverted Y axis.<br />
borders = (xnew, ynew, xnew+tilesize, ynew+tilesize)<br />
tile = Image.new("RGB", (tilesize, tilesize))<br />
region = myimage.crop(borders).transpose(Image.FLIP_TOP_BOTTOM)<br />
tile.paste(region, (0,0) )<br />
<br />
# Attempt to save it <br />
try:<br />
tile.save(outfile)<br />
print "Writing: File %s with coords %s - %s" % (outfile, (xnew,ynew), (xnew+tilesize-1, ynew+tilesize-1) )<br />
except IOError:<br />
print "Cannot open output file ", outfile<br />
except IOError:<br />
print "Cannot open file ", infile<br />
print "---------------------------------------------------------"</nowiki></pre></code></div>Dyne