Issue during rendering using C# in Compound Templating
Asked Answered
G

1

11

A sudden issue appeared on one of the environments when publishing/rendering a certain piece of code in Compound Templating. It is an DTAP environment, and the issue is only happening on the Production environment (as always ;-), where there are two CMS machine and two publishers. All showing the same behavior.

The code which causes the problem is:

StructureGroup SG = (StructureGroup)engine.GetObject("/webdav/pub/root/etc/etc...");

The error in the Template builder is:

System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.77.66.136:80 
   bij System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 
   bij System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) 
   bij System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) 
   --- Einde van intern uitzonderingsstackpad --- 
   bij System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) 
   bij System.Net.HttpWebRequest.GetRequestStream() 
   bij System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
   bij Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.Proxy.CompoundTemplateWebService.GetDebuggingState(String debuggerSessionId, String lastLogMessageId) 
   bij Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.DebugObject.Start(Template template, Object debugItem, LoggingOptions loggingOptions) 

What is odd that we are not really trying to get to an external server. At least, that's what it looks like. Maybe I am missing something in how Tridion works. I am fairly certain it is a security issue, but I don't know where to look.

Gamic answered 7/5, 2012 at 11:53 Comment(5)
It looks like you got an IP address in your stack trace. Ping it, and find out what server in your architecture that is.Keyte
Can you specify your version of SDL Tridion?Spleenful
I suspect your error is in Template builder? TOM.NET will NOT open a remote connection anywhere, and your error is in network communication... Can you try previewing or publishing in the CMS?Nina
Thanks for the comments guys! It made me figure out there were two unrelated issues. One was about the location where I tried to run the Template Builder from, the other one had to do with some obscure content-created referencing loop in the Template Builder. Which I, of course, should never have allowed to happen in the first place!Gamic
Hi Hendrik, if you answer your own question you can accept that and may gain some up votes!Reuven
G
5

I figured out the problem of the error with the help of Nickoli and Nuno's advice.

This error is shown when the Template Builder is trying to run from a location in a network, which doesn't have access to the code. I thought it was related to the engine.GetObject method, because the error would only appear when that method was run.

There was an error in the code in the end as well, but that had to do with a bad recursive method.

Gamic answered 8/5, 2012 at 20:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.