Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007518opensim[REGION] OpenSim Corepublic2015-03-30 07:292015-04-08 03:58
ReporterRichardus Raymaker 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007518: Opensium 0.8.1 [Const] section incomplete and makes it partly useless
DescriptionBusy with configuring my grid, everything fine the new [Const] looked good and make things easy. But it's incomplete ! The const section now looks like this.

[Const]
    ;# {BaseURL} {} {BaseURL} {"http://example.com","http://127.0.0.1"} [^] "http://127.0.0.1" [^]
    BaseURL = http://127.0.0.1 [^]
    
    ;# {PublicPort} {} {PublicPort} {8002} "8002"
    PublicPort = "8002"

    ;# {PrivatePort} {} {PrivatePort} {8003} "8003"
    PrivatePort = "8003"

Ok, now the problem, you dont need to have port 8003 open for internet if your regions are running on the local grid. only port 8003 need to be open to the internet. Problem, the [Const] section only allow a baseurl adres. In my case i need to replace all lines like this.

    AssetServerURI = "${Const|BaseURL}:${Const|PrivatePort}"

for my own ownes and i need to replace BASEURL for the internel network ip.
It would be better if opensim is add a new const and change another one so it looks more like this. (it's only example)

[Const]
    ;# {BasePublicURL} {} {BasePublicURL} {"http://example.com","http://127.0.0.1"} [^] "http://127.0.0.1" [^]
    BasePublicURL = http://127.0.0.1 [^]

    ;# {BasePrivateURL} {} {BasePrivateURL} {"http://example.com","http://127.0.0.1"} [^] "http://127.0.0.1" [^]
    BasePrivateURL = http://127.0.0.1 [^]
    
    ;# {PublicPort} {} {PublicPort} {8002} "8002"
    PublicPort = "8002"

    ;# {PrivatePort} {} {PrivatePort} {8003} "8003"
    PrivatePort = "8003"

so in the ini file you get things like this

    AssetServerURI = "${Const|BasePrivateURL}:${Const|PrivatePort}"

    GridInfoURI = "${Const|BasePublicURL}:${Const|PublicPort}"

For now i changed the lines that use port 8002 to how it where in the past.
But things are not more easy this way, need a little tweak so you can configure the url adres for port 8002 and 8003 different

TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
Environment.NET / Windows64
Mono VersionNone
Viewersingularity 1.8.6
Attached Files

- Relationships

-  Notes
(0027955)
Richardus Raymaker (reporter)
2015-03-31 06:22

After problems with Hypergrid "unable to verify identity" I have decideded to wipe the $const section and everything out of the robustHG.ini file to. And now it works perfect.

$Const seems very buggy and incomplete.
(0027958)
smxy (reporter)
2015-04-01 20:40

I have to disagree with your assessment. It works fine for me. If you combine it's usage with the feature that lets you pull in values from the Environment, you can really simplify your ini changes.
(0027959)
Richardus Raymaker (reporter)
2015-04-02 04:13

I know, justin knows.
But with the current setup it's useless because port 8002 and 8003 need to have different url adresses. and with $Const you cannot configure that at this moment.
(0027960)
smxy (reporter)
2015-04-02 05:46

>port 8002 and 8003 need to have different url adresses.

All that should be needed is for packets destined for port 8003, coming in via the external interface, to be blocked with a firewall rule. Packets destined for port 8003, that come in via internal interfaces, would still be allowed, such as the packets that will be then sent back inside, due to Loopback NAT.
(0027961)
Richardus Raymaker (reporter)
2015-04-02 05:59
edited on: 2015-04-02 06:18

That did in first case did not work at all here. what you say also it could be config error. but nothing worked at that moment. need to retest it.

Let m,e restest it again.

(0027962)
Jak Daniels (reporter)
2015-04-02 06:17
edited on: 2015-04-02 06:18

So why can't you just do something like this or am I missing the point?
What's in the ini now is just an example.

[Const]
PrivateURL="http://privatehost.domain" [^]
PublicURL="http://publichost.domain" [^]
PrivatePort=8003
PublicPort=8002

[SomeIniSection]
ServiceName1URI="${Const|PrivateURL}:${Const|PrivatePort}"
ServiceName2URI="${Const|PublicURL}:${Const|PublicPort}"

;or any such combination of URLs and Ports defined in [Const]

(0027963)
Richardus Raymaker (reporter)
2015-04-02 07:31
edited on: 2015-04-02 07:40

Ok, and here's the reason why the current setup is not working. I use FQDN in $(Const) firewall on the system is open for 8002 and 8003 region and robust are running on the same powerfull system. port 8003 is closed in the router, no port forwarding needed for that port (you dont want that) because the FQDN it's just a fail.


2015-04-02 15:22:54,734 DEBUG - OpenSim.Framework.SynchronousRestObjectRequester [SynchronousRestObjectRequester]: Exception in making request POST <FQDN>:8003/assets/: Unable to connect to the remote server at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at OpenSim.Framework.SynchronousRestObjectRequester.MakeRequest[TRequest,TResponse](String verb, String requestUrl, TRequest obj, Int32 pTimeout, Int32 maxConnections, IServiceAuth auth) in p:\opensim-0.8.1-source\OpenSim\Framework\WebUtil.cs:line 1240
2015-04-02 15:22:54,745 DEBUG - OpenSim.Services.Connectors.AssetServicesConnector [ASSET CONNECTOR]: Storing of asset ac223dfd-8dcd-4452-8c3a-cc39e5f0dec5 returned null; assuming the asset already exists
2015-04-02 15:22:55,794 ERROR - OpenSim.Framework.SynchronousRestObjectRequester [SynchronousRestObjectRequester]: WebException for DELETE <FQDN>:8003/assets/70f083b6-6618-485d-a071-869e864bf8b3 System.Boolean
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it <external isp ip>:8003
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()

(0027964)
smxy (reporter)
2015-04-02 16:36

Yeah, you can create and use any constant you want. You can change the ones that are in the file to suit your needs, too. All they are is a way of defining commonly set things in one place, rather than all through the files, to simplify the configuration. If you need 8003 to be on a different URL, then just create a new constant for it and use that everywhere for 8003 instead. You can create other constants, too, if they reduce the number of places you have to edit values in the ini files. Think of the out-of-box constants more as suggestions and examples of what you can do with them, rather than something cast in stone that you can't change.
(0027966)
Richardus Raymaker (reporter)
2015-04-03 03:19

Ok, that's cool. It's more flexible then expected. Thanks
(0027967)
smxy (reporter)
2015-04-03 05:53

Yes, it's really very useful. Here, let me give you an example. There are several places in my robust config, where I use the name of my grid. So, I turned it into a constant, by adding this in the [Const] section:

GridName = Sanctuary

Then, I use it in various places:

...
LibraryName = "${Const|GridName} Library"
...
WelcomeMessage = "Welcome to ${Const|GridName}!"
...
gridname = "${Const|GridName}"
...
gridnick = "${Const|GridName}"

You can do that for ANYTHING you would like to define once but use in multiple places.

Let me take this further and show you a related feature. I have written a number of scripts to automate the handling of my grid. I also have robust and the simulators write any files they make to a location other than opensim/bin. I define where those locations are, in my environment and then pass them in to the configuration using a feature similar to the constants feature. An example from my robust ini. First, in my environment, I have a variable named "var", that's set to "/opensim/var". There's another variable, called "SIM", that I set in my environment. In this example, it's set to "robust_hg". At the top of my ini file, I put:

[Environment]
    SIM=""
    var=""

That tells the system to fetch those values from the environment. Later I use them just like a constant:

ConsoleHistoryFile = "${Environment|var}/console_histories/${Environment|SIM}.txt"

So, when everything is executed, that turns into:

ConsoleHistoryFile = /opensim/var/console_histories/robust_hg.txt

See? Between Const and Environment, you can really do a lot. :)

The only place you (currently) can't use a Const or Environment variable, are in "include" lines in your ini files.
(0027988)
JeffKelley (reporter)
2015-04-08 03:58

Here is mine:

  BaseURL = "http://my.public.host" [^]
  PrivURL = "http://localhost" [^]

Then substitute every occurence of
  ${Const|BaseURL}:${Const|PrivatePort}
for
  ${Const|PrivURL}:${Const|PrivatePort}

- Issue History
Date Modified Username Field Change
2015-03-30 07:29 Richardus Raymaker New Issue
2015-03-31 06:22 Richardus Raymaker Note Added: 0027955
2015-04-01 20:40 smxy Note Added: 0027958
2015-04-02 04:13 Richardus Raymaker Note Added: 0027959
2015-04-02 05:46 smxy Note Added: 0027960
2015-04-02 05:59 Richardus Raymaker Note Added: 0027961
2015-04-02 06:17 Jak Daniels Note Added: 0027962
2015-04-02 06:18 Richardus Raymaker Note Edited: 0027961 View Revisions
2015-04-02 06:18 Jak Daniels Note Edited: 0027962 View Revisions
2015-04-02 07:31 Richardus Raymaker Note Added: 0027963
2015-04-02 07:40 Richardus Raymaker Note Edited: 0027963 View Revisions
2015-04-02 16:36 smxy Note Added: 0027964
2015-04-03 03:19 Richardus Raymaker Note Added: 0027966
2015-04-03 05:53 smxy Note Added: 0027967
2015-04-08 03:58 JeffKelley Note Added: 0027988


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker