So a few things about the support files for the monit with opensim tutorial.
/etc/monit/monitrcCode:
set httpd port 2812 and
allow xxx.xxx.xxx.xxx
allow localhost
allow opensim:opensim
allow xxx.xxx.xxx.xxx - I had to add this line where the x's are the external ip of my cable modem. Couldn't connect to the web interface without that line. (Cam reports this wasn't necessary on his vps so it depends on the system)
allow localhost - not really needed but was useful to test with lynx on the ssh session
allow opensim:opensim - this is the user:password to access the monit page. *doesn't* have to be a valid linux user. It is just used by monit to allow access to the stats page. If it is left out, then anyone can access the stats without restriction.
/etc/monit/conf.d/opensim.confCode:
if failed url http://localhost:9100/jsonSimStats/
It was suggested on this other thread
viewtopic.php?f=14&t=3102&start=10 that monit will not show the web page if checking jsonSimStats using localhost so I was cautious that maybe it was giving me troubles, but it seems to work fine with my version of monit. I think maybe this was an issue that was fixed with the newest monit version.
/home/opensim/bin/OpenSim.iniCode:
ConsoleUser = "user"
ConsolePass = "password"
console_port = 0
http_listener_port = 9100
It seems there are 2 consoles in OpenSim. One is a seperate console client called 'rest' (OpenSim.ConsoleClient.exe) and the other is built-in to the OpenSim server. Unless the command line option '-console=rest' is used when OpenSim is started then the built-in console is used.
If the built-in console is used (like in the monit tutorial we are following) these three options seem to have no effect: ConsoleUser, ConsolePass and console_port. They can be set to anything and monit will still connect to jsonSimStats using the http_listener_port. *BUT* if the actual lines are missing from the ini file, then monit will fail to connect to the stats. Weird.
http_listener_port - this is the setting that allowed me to connect to jsonSimStats using monit. Without it I was unable to connect.
/home/opensim/opensimIn this script there are some vars set:
Code:
CONSOLE_PORT
CONSOLE_USER
CONSOLE_PASS
Theses vars are only used in the the function do_console() and it is run if the user starts the script like this:
Code:
opensim console your_sim
but this will hang because the server is started in the do_start() function without the -console=rest option. In other words that console option is meant to be used with the rest console not the built-in console.
so the CONSOLE_PORT, CONSOLE_USER and CONSOLE_PASS vars don't have any effect with this particular Monit tutorial since it is using the built-in console and they can be ignored.
Just want to say thanks again to Cam for posting the very helpful tutorial and Twisted for the suggestions also.