Commit Graph

166 Commits (e041f09750419f60c819ee7e7a99044fe43a811c)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 5aec0ff207 Move Watchdog and MemoryWatchdog classes into OpenSim.Framework.Monitoring with other monitoring code from OpenSim.Framework 2012-07-25 23:27:00 +01:00
Justin Clark-Casey (justincc) dca04c7b61 Avoid a race condition where an incoming request to a script external URL can trigger an exception is the URL was being removed at the same time.
This involves three steps
1) Return gracefully in UrlModule.HttpRequestHandler() instead of throwing an exception when the url cannot be found in its index
2) Return true instead of false in HasEvents() if no matching request is found in the map.  This call will only happen in the first place for raced requests.
3) Return a 404 in GetEvents() if the request is not in the index, rather than a blank 200 OK.

Many thanks to Tom Haines in http://opensimulator.org/mantis/view.php?id=6051 for doing some of the work on this.
2012-06-22 23:16:18 +01:00
Justin Clark-Casey (justincc) ed513fc7be Fix bug introduced in commit c6e3752 (13 Jun 2012) where poll responses would always return OK even if some other status code had been set 2012-06-16 03:43:45 +01:00
Justin Clark-Casey (justincc) 94517c8d5c Make the "debug http" command available for robust as well as the simulator. This allows one to see incoming requests as they happen.
This required making everything use the common MainServer class for registering and retrieving http servers, rather than duplicate structures.
2012-06-15 02:51:52 +01:00
Justin Clark-Casey (justincc) 257b1b517d Add main instance to internal MainServer.m_Servers list to simplify internal logic.
This does require the server to be added before it is set as the main Instance
2012-06-15 02:03:50 +01:00
Justin Clark-Casey (justincc) 478acfff34 When setting debug http level, do this for all known http servers, not just the main instance. 2012-06-15 01:24:36 +01:00
Justin Clark-Casey (justincc) 9825861f4a Shuffle "debug http" levels so that 1 and 2 now cause different levels of warn to be logged if we receive invalid xml for xmlrpc. 2012-06-14 23:46:09 +01:00
Justin Clark-Casey (justincc) f4b02f8e39 Fix a regression in BaseHttpServer.HandleXmlRpcRequests() from recent c6e3752
Accidentally make responseString null by default instead of String.Empty.
It needs to be something in case the XmlRpcRequest deserialize throws an exception due to bad xml (a failure which we silently swallow!)
2012-06-14 04:29:15 +01:00
Justin Clark-Casey (justincc) c6e375291a Don't include time to transmit response back to requester when assessing slow handling of requests.
This is to avoid logging a 'slow' request when the source of delay is the viewer in processing a response.
This is not something we can do much about on the server end - it's server-side delay that we're interested in.
To ensure consistency, this commit also had to refactor and simplify inbound non-poll network request handling, though there should be no functional change.
IOSHttpResponse no longer exposes the Send() method, only classes in OpenSim.Framework.Servers.HttpServer should be doing this.
Only the GetTextureHandler was sending its own response.  Now it leaves this to BaseHttpServer, like all other core handlers.
2012-06-13 00:03:44 +01:00
BlueWall a1e857932a Make change to fix Windows builds 2012-06-07 10:17:37 -04:00
Justin Clark-Casey (justincc) 98b46d48fe Allow the thread watchdog to accept an alarm method that is invoked if the timeout is breached.
This alarm can then invoke this to log extra information.
This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered.
2012-06-07 02:44:13 +01:00
SignpostMarv 99cebec4ab adding status codes from rfc 6585
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-05-24 12:09:15 -04:00
SignpostMarv 87f9aa9d08 porting IDE tooltip-friendly documentation tweaks from Aurora-Sim
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-05-24 12:09:15 -04:00
Justin Clark-Casey (justincc) 6987aef38d Improve logging on the prim inventory script asset request path for future use.
This adds name and description of the request handler to http request logging when DebugLevel >= 1
2012-05-09 23:12:30 +01:00
Oren Hurvitz 15844da3af Log the full exception when errors occur in BaseHttpServer 2012-05-07 19:56:00 +01:00
Justin Clark-Casey (justincc) fb99ee6774 minor: Tweak BaseHttpServer message to make it clear that this relates to slow handling of inbound requests. 2012-05-04 01:16:56 +01:00
Justin Clark-Casey (justincc) 231a3bf147 Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable.
This is most useful for capabilities where the url is not self-describing.
2012-05-03 01:45:49 +01:00
Justin Clark-Casey (justincc) 737e177163 Revert "Log the full exception when errors occur in BaseHttpServer"
This reverts commit e31e7c68c8.

Applied for patch assessment and accidentally committed too early.
2012-04-27 23:46:46 +01:00
Oren Hurvitz e31e7c68c8 Log the full exception when errors occur in BaseHttpServer 2012-04-27 21:52:04 +01:00
Justin Clark-Casey (justincc) f3dda2d85d Add more exception detail to Exception and IOException throws in BaseHttpServer.HandleRequest() 2012-04-20 03:12:25 +01:00
Diva Canto cdbe34716f Thank you, BaseHttpServer, for telling me where things go wrong. 2012-04-06 11:21:27 -07:00
Justin Clark-Casey (justincc) f67f37074f Stop spurious scene loop startup timeout alarms for scenes with many prims.
On the first frame, all startup scene objects are added to the physics scene.
This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame.
This commit also slightly changes the behaviour of timeout reporting.
Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check.
Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-24 05:02:33 +00:00
Justin Clark-Casey (justincc) e6272b8d56 Stop also adding an ordinary http handler when we set up a poll http handler.
It appears that this is entirely unnecessary since the poll http handlers are dealt with on a separate code path.
2011-12-07 12:28:42 +00:00
Justin Clark-Casey (justincc) 4567555c49 Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead of OSHttpRequest/OSHttpResponse.
This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation.
This is also required to write regression tests that involve the HTTP layer.
If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse.
2011-12-05 20:44:20 +00:00
Justin Clark-Casey (justincc) fa63054c4f On "show caps", stop excluding the seed cap but do exclude it elsewhere 2011-11-29 20:37:03 +00:00
Justin Clark-Casey (justincc) 679a5f6c0b With "debug http 1", show the path with the query string instead of just the path.
Also simplifies debug levels to just 0 and 1
2011-11-29 17:26:45 +00:00
Justin Clark-Casey (justincc) b6b0bc7b32 Add "debug http" command for currently simple extra debug logging of non-event queue inbound http requests to a simulator 2011-11-29 16:15:52 +00:00
Justin Clark-Casey (justincc) ccae787d03 send a watchdog heartbeat for a poll worker thread when it's actually run 2011-11-15 22:20:44 +00:00
Justin Clark-Casey (justincc) 7e488cd635 Remove unused avariable in PollServiceRequestManager 2011-11-07 23:24:13 +00:00
Justin Clark-Casey (justincc) c275c22928 Restart the event queue worker threads that I accidentally disabled earlier today in 8a0a78c.
Also adds these to the watchdogs with very large timeouts (should really be infinite)
2011-10-25 23:26:21 +01:00
Justin Clark-Casey (justincc) 8a0a78cbcc Make OpenSim.Framework.Servers.HttpServer rely on OpenSim.Framework instead of the other way around.
This is necessary so that code in HttpServer can use framework facilities such as the thread watchdog for monitoring purposes.
Doing this shuffle meant that MainServer was moved into OpenSim/Framework/Servers
Also had to make OpenSim.Framework.Console rely on OpenSim.Framework rather than the other way around since it in turn relies on HttpServer
MainConsole and some new interfaces had to be moved into OpenSim/Framework to allow this.  This can be reverted if parts of OpenSim.Framework stop relying on console presence (cheifly RegionInfo)
2011-10-25 20:24:21 +01:00
Justin Clark-Casey (justincc) e14cb45b9b Drop some unnecessary ContainsKey() checking before Remove() in BaseHttpServer()
Remove() presumably does this check anyway since it just returns false if the key is not in the collection.
2011-10-24 23:26:41 +01:00
Justin Clark-Casey (justincc) 9ec672c70b Fix bugs in EventQueueGetModule.ClientClosed() and BaseHttpServer.RemovePollServerHTTPHandler() that stopped existing code in ClientClosed() from actually tearing down the poll handler
Actually doing the tear down appear to have no ill effects with region crossing and teleport.
2011-10-24 23:16:03 +01:00
Justin Clark-Casey (justincc) e742cffe15 Add Enabled switch in new [Attachments] section in OpenSimDefaults.ini to allow attachments to be temporarily turned off.
This is for debugging purposes.  Defaults to Attachments Enabled
2011-09-30 01:19:22 +01:00
Justin Clark-Casey (justincc) d74686fd51 read m_rpcHandlersKeepAlive under appropriate lock 2011-08-22 02:25:58 +01:00
Justin Clark-Casey (justincc) c587b0a3a3 oops, fix build break from last commit 2011-08-22 02:10:45 +01:00
Justin Clark-Casey (justincc) 9469c62098 improve locking of m_agentHandlers in BaseHttpServer 2011-08-22 02:07:51 +01:00
Justin Clark-Casey (justincc) f9a367e2f6 improve locking of m_HTTPHandlers in BaseHttpServer 2011-08-22 01:59:40 +01:00
Justin Clark-Casey (justincc) 5a11cffd23 improve locking of m_streamHandlers in BaseHttpServer 2011-08-22 01:58:50 +01:00
Justin Clark-Casey (justincc) 20a4367827 remove necessity to catch a KeyNotFoundException in BaseHttpServer.RemoveLLSDHandler() 2011-08-22 01:58:19 +01:00
Justin Clark-Casey (justincc) 8254116dc6 improve locking of m_llsdHandlers in BaseHttpServer 2011-08-22 01:52:08 +01:00
Justin Clark-Casey (justincc) 2f1ac1d144 minor: remove mono compiler warning 2011-08-22 01:45:46 +01:00
Justin Clark-Casey (justincc) 94a8ab80c8 improve locking of m_rpcHandlers in BaseHttpServer 2011-08-22 01:43:34 +01:00
Diva Canto fd57c91b4a First pass at making the V2 map work. Standalones only for now. There are some issues with the zoom level -- TBD. 2011-06-12 15:37:42 -07:00
BlueWall 8ca7938753 Adding ssl support
Adding ssl support for "Out of Band" applications such as the remote
	admin module or Robust services
2011-05-05 19:56:54 -04:00
Justin Clark-Casey (justincc) ccc26f7443 Get Viewer 2 voice working with OpenSim.
See http://opensimulator.org/mantis/view.php?id=5336
It turns out that viewer 2 was upset by the lack of a response to viv_watcher.php.  This would send it into a continuous login loop.
Viewer 1 was quite happy to ignore the lack of response.
This commit puts in the bare minimum 'OK' message in response to viv_watcher.php.  This allows viewer 2 voice to connect and appears to work.
However, at some point we need to fill out the watcher response, whatever that is.
2011-04-20 01:02:40 +01:00
Diva Canto 7592a033df Moved 3 request handlers from OpenSim.Framework.Servers.HttpServer up to OpenSim.Framework -- just pasted them in WebUtil. This is so that code that uses the Service connectors don't need to include the HttpServer dll -- that was odd. 2011-04-12 20:24:28 -07:00
BlueWall a3651eb5d0 Thanks Kevin Cozens for a patch that:
Fixes several spelling mistakes
2011-03-17 05:48:42 -04:00
Justin Clark-Casey (justincc) aadd0e8d42 minor: bring comment into line with code reality 2011-03-16 00:14:58 +00:00
Melanie cee5e3e264 Up the timeout on slow requests to 3000 to stop console spam. Make sure
request method and target are reported correctly and drop the txn id
as it's empty 99% of the time.
2011-03-14 14:51:13 +00:00