From cb6791fb30ce0fbe416f42d95b9737f9f30e02a7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 26 Apr 2012 22:35:25 +0100 Subject: Tweak log messages on local region to region teleport path to help with problem resolution. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 +- .../EntityTransfer/EntityTransferModule.cs | 51 ++++++++++++++-------- .../EntityTransfer/HGEntityTransferModule.cs | 3 +- .../Simulation/LocalSimulationConnector.cs | 10 ++--- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 ++- 5 files changed, 48 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index d05f72f..edf91cb 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -916,7 +916,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; - m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); + m_log.DebugFormat( + "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} from {1}", + uccp.CircuitCode.Code, buffer.RemoteEndPoint); remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index a36d0fe..0f3ed27 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer destinationRegionName = sp.Scene.RegionInfo.RegionName; m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: RequestTeleportToLocation for {0} to {1} within existing region {2}", + "[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}", sp.Name, position, destinationRegionName); // Teleport within the same region @@ -231,7 +231,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer GridRegion finalDestination = GetFinalDestination(reg); if (finalDestination == null) { - m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent."); + m_log.WarnFormat( + "[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport {0} {1}", + sp.Name, sp.UUID); + sp.ControllingClient.SendTeleportFailed("Problem at destination"); return; } @@ -320,10 +323,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this. + { + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.", + sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); + return; + } m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}", + "[ENTITY TRANSFER MODULE]: Teleporting {0} {1} from {2} to {3} ({4}) {5}/{6}", + sp.Name, sp.UUID, sp.Scene.RegionInfo.RegionName, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); uint newRegionX = (uint)(reg.RegionHandle >> 40); @@ -444,7 +454,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); } - SetInTransit(sp.UUID); // Let's send a full update of the agent. This is a synchronous call. @@ -656,7 +665,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer public virtual void TeleportHome(UUID id, IClientAPI client) { - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); //OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId); GridUserInfo uinfo = m_aScene.GridUserService.GetGridUserInfo(client.AgentId.ToString()); @@ -671,14 +681,20 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", - regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", + client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY); // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... ((Scene)(client.Scene)).RequestTeleportLocation( client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); } + else + { + m_log.ErrorFormat( + "[ENTITY TRANSFER MODULE]: No grid user information found for {0} {1}. Cannot send home.", + client.Name, client.AgentId); + } } #endregion @@ -1362,19 +1378,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // after a cross here Thread.Sleep(500); - Scene m_scene = sp.Scene; + Scene scene = sp.Scene; - uint x, y; - Utils.LongToUInts(reg.RegionHandle, out x, out y); - x = x / Constants.RegionSize; - y = y / Constants.RegionSize; - m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint + ")"); + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})", + sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY); string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); string reason = String.Empty; - bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); + bool regionAccepted = scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); if (regionAccepted && newAgent) { @@ -1391,7 +1405,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " + "and EstablishAgentCommunication with seed cap {4}", - m_scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath); + scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath); eq.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID); eq.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); @@ -1402,10 +1416,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // TODO: make Event Queue disablable! } - m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint); } + if (!regionAccepted) - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Region {0} did not accept agent: {1}", reg.RegionName, reason); + m_log.WarnFormat( + "[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}", + reg.RegionName, sp.Name, sp.UUID, reason); } /// diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 634fb43..6696997 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -201,7 +201,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer public override void TeleportHome(UUID id, IClientAPI client) { - m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); // Let's find out if this is a foreign user or a local user IUserManagement uMan = m_aScene.RequestModuleInterface(); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 85e7e94..90f27c4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { if (s.RegionInfo.RegionHandle == destination.RegionHandle) { - m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Found region {0} to send SendCreateChildAgent", destination.RegionName); +// m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Found region {0} to send SendCreateChildAgent", destination.RegionName); return s.NewUserConnection(aCircuit, teleportFlags, out reason); } } @@ -209,9 +209,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { if (s.RegionInfo.RegionHandle == destination.RegionHandle) { - m_log.DebugFormat( - "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", - s.RegionInfo.RegionName, destination.RegionHandle); +// m_log.DebugFormat( +// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", +// s.RegionInfo.RegionName, destination.RegionHandle); s.IncomingChildAgentDataUpdate(cAgentData); return true; @@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { if (s.RegionInfo.RegionID == origin) { - m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); +// m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); AgentTransferModule.AgentArrivedAtDestination(id); return true; // return s.IncomingReleaseAgent(id); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7a94215..6b38027 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1142,7 +1142,10 @@ namespace OpenSim.Region.Framework.Scenes if ((m_callbackURI != null) && !m_callbackURI.Equals("")) { - m_log.DebugFormat("[SCENE PRESENCE]: Releasing agent in URI {0}", m_callbackURI); + m_log.DebugFormat( + "[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}", + client.Name, client.AgentId, m_callbackURI); + Scene.SimulationService.ReleaseAgent(m_originRegionID, UUID, m_callbackURI); m_callbackURI = null; } -- cgit v1.1