Tridion 2013 SP1; DD4T 2.0 (java) in use.
I created a MMC in cms which is using external URL where actual image file reside; say URL is http://sample.com/abc.gif. When I try to publish the Component which is using this MMC the publishing failed and got below traces in Event Logs:
An error occurred while trying to resolve URI: http://sample.com/abc.gif
The remote server returned an error: (503) Server Unavailable.
Component: Tridion.ContentManager.Publishing
Errorcode: 834
User: NT AUTHORITY\SYSTEM
StackTrace Information Details:
at System.Net.HttpWebRequest.GetResponse()
at Tridion.ContentManager.ContentManagement.DefaultBinaryContentProvider.WriteContentToStream(Uri uri, Stream outStream)
at Tridion.ContentManager.ContentManagement.BinaryContent.WriteToStream(Stream binaryStream)
at Tridion.ContentManager.ContentManagement.BinaryContent.WriteToStream(Stream binaryStream)
at Tridion.ContentManager.ContentManagement.BinaryContent.GetByteArray()
at Tridion.ContentManager.Templating.Engine.CreateMultimediaItem(Package package, Component component)
at Tridion.ContentManager.Templating.Package.CreateMultimediaItem(TcmUri componentURI)
at DD4T.Templates.Base.Utils.BinaryPublisher.PublishMultimediaComponent(String uri, BuildProperties buildProperties)
at DD4T.Templates.Base.Utils.BinaryPublisher.PublishMultimediaComponent(Component mmComponent, BuildProperties buildProperties)
at DD4T.Templates.Base.Builder.ComponentBuilder.BuildComponent(Component tcmComponent, Int32 currentLinkLevel, BuildManager manager)
at DD4T.Templates.Base.Builder.BuildManager.BuildComponent(Component tcmComponent, Int32 currentLinkLevel)
at DD4T.Templates.Base.Builder.FieldBuilder.BuildField(ItemField tcmItemField, Int32 currentLinkLevel, BuildManager manager)
at DD4T.Templates.Base.Builder.BuildManager.BuildField(ItemField tcmItemField, Int32 currentLinkLevel)
at DD4T.Templates.Base.Builder.FieldsBuilder.AddFields(FieldSet fields, ItemFields tcmItemFields, Int32 currentLinkLevel, BuildManager manager)
at DD4T.Templates.Base.Builder.BuildManager.BuildFields(ItemFields tcmItemFields, Int32 currentLinkLevel)
at DD4T.Templates.Base.Builder.ComponentBuilder.BuildComponent(Component tcmComponent, Int32 currentLinkLevel, BuildManager manager)
at DD4T.Templates.Base.Builder.BuildManager.BuildComponent(Component tcmComponent)
at DD4T.Templates.Base.BaseComponentTemplate.GetDynamicComponentPresentation()
at DD4T.Templates.Base.BaseComponentTemplate.Transform(Engine engine, Package package)
at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)
at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)
at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)
at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)
at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)
at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
at Tridion.ContentManager.Templating.Engine.TransformItem(Template template, IdentifiableObject itemToRender)
at Tridion.ContentManager.Templating.TemplatingRenderer.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderedItem renderedItem, RenderContext renderContext)
at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderContext context)
at Tridion.ContentManager.Publishing.Handling.DefaultPublishTransactionHandler.RenderAndPackage(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, List`1 processedItems, PublishTransaction publishTransaction, TransportPackage transportPackage)
at Tridion.ContentManager.Publishing.Handling.DefaultPublishTransactionHandler.HandlePublishRequest(PublishTransaction publishTransaction)
at Tridion.ContentManager.Publishing.Handling.DefaultPublishTransactionHandler.ProcessPublishTransaction(PublishTransaction publishTransaction)
at Tridion.ContentManager.Publishing.Publisher.QueueMessageHandler.HandleMessage()
I found below similar post raised for this issue; How to output URL of MMC which Resource Type is "External"; which says ECL to use.
#Q1: Whats restricting Tridion to publish the image in this case (when using external URL)? I was expecting it should at least publish the image to Tridion file-system (As configured in Deployer) and then render this published image to web-page.
#Q2: To Fulfill next level of requirement where we need image on web page to be served from external URL only (not from Tridion file system where it's published) is implementing ECL the only option to achieve this? If Yes, is there any documentation what it needs to implement same.