Sitecore 8.1 : SessionEndPipeline failed - sitecore

While going through the log files (of sitecore) I noticed more than 2K error entries for below. It's on CD server but the site seems to be running OK. I googled to see if anyone has faced this issue but no luck.
Exception: System.InvalidOperationException Message: Could not find
configuration node: databases/database[#id='master'] Source:
Sitecore.Kernel at
Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean
assert) at Sitecore.Configuration.Factory.CreateObject(String
configPath, String[] parameters, Boolean assert) at
Sitecore.Configuration.Factory.CreateObject(String configPath, Boolean
assert) at Sitecore.Configuration.Factory.GetDatabase(String name,
Boolean assert) at
Sitecore.Configuration.Factory.GetDatabase(String name) at
Sitecore.Analytics.Tracker.get_DefinitionDatabase() at
Sitecore.Analytics.Pipelines.VisitEnd.RunRules.Process(VisitEndArgs
endArgs) at (Object , Object[] ) at
Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) at
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs
args, String pipelineDomain, Boolean failIfNotExists) at
Sitecore.Analytics.Pipelines.VisitEnd.VisitEndPipeline.Run(VisitEndArgs
args) at
Sitecore.Analytics.Pipelines.SessionEnd.RaiseVisitEnd.Process(SessionEndArgs
endArgs) at (Object , Object[] ) at
Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) at
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs
args, String pipelineDomain, Boolean failIfNotExists) at
Sitecore.Pipelines.EndSession.SessionEndPipeline.Run(SessionEndArgs
sessionEndArgs) at
Sitecore.Web.Application.RaiseSessionEndEvent(HttpApplication context)
More info:
xDB is disabled.
Appreciate if I can get help to resolve this.

The error says :
Could not find configuration node: databases/database[#id='master']
I ran into same type of error some time ago and it turns out that when you switch your references to master database toward web database on CD server, any indexing mechanics that uses master database must be turned off. In my case, I checked all config files related to Lucene indexes which somehow pointing to master database, like this:
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore</Root>
</crawler>
</locations>
There are several indexing config files which might use this pattern, including analytics and other extra features. I turned them off and the error disappeared.

Related

Server Error when visiting page with experience editor?

A page renders fine when visiting it with sc_mode=normal, but I get a server error when visiting it with sc_mode=normal.
This is the error:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Sitecore.ExperienceEditor.Utils.WebUtility.FixEmptyPlaceholders(String layout) +362
Sitecore.ExperienceEditor.Utils.WebUtility.RenderLayout(Item item, HtmlTextWriter output, String siteName, String deviceId) +40
Sitecore.ExperienceEditor.Speak.Ribbon.PageExtender.RibbonWebControl.DoRender(HtmlTextWriter output) +619
Sitecore.Web.UI.WebControl.RenderAsText() +225
Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.SpeakRibbon.RenderPageEditorSpeakExtender.Render(TextWriter writer) +124
Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderPageExtendersProcessor.Process(RenderPageExtendersArgs args) +62
(Object , Object[] ) +73
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +468
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +21
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +191
Sitecore.Mvc.ExperienceEditor.PageExtenderResponseFilter.GetExtendersHtml() +157
Sitecore.Mvc.ExperienceEditor.PageExtenderResponseFilter.get_ExtendersHtml() +30
Sitecore.Mvc.ExperienceEditor.Pipelines.Request.RequestEnd.AddPageExtenders.Process(RequestEndArgs args) +189
(Object , Object[] ) +73
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +468
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +21
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +191
Sitecore.Mvc.Routing.RouteHttpHandler.EndProcessRequest(IAsyncResult result) +131
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +392
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +194
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +127
What is is a likely cause?
These error is telling you that you have rendering which is without placeholder defined and that one is causing the error.

"Post condition failed" error when upgrading from 8.1 to 8.2

I'm in process of upgrading sitecore from 8.1 to 8.2 and now splitting into CD and CMS but im having issue getting CD working its giving me following error.
Not able to figure out where its causing the issue,
Stack trace:
[InvalidOperationException: Post condition failed]
Sitecore.Diagnostics.Assert.ResultNotNull(T result, String message)
+85 Sitecore.Configuration.DefaultFactory.GetDatabase(String name) +86 Sitecore.Configuration.DefaultFactory.GetDatabases() +121 Sitecore.Data.Managers.DefaultItemManager.Initialize() +105 (Object
, Object[] ) +117 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs
args) +484 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName,
PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +259
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +704
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +618
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +343
[HttpException (0x80004005): Post condition failed]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+112 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +712
The problem is with DefaultFactory and its GetDatabases method. This method gets all the databases which are defined inside sitecore/databases/database configuration.
Looks like there is still master database in that configuration, but you already removed its connection string or some other configuration relating to that database.
If you look at Configure a content delivery server guide, there is information to remove configuration/sitecore/databases/database (Comment out the entire master database section).
Managed to solve the issue by enabling switchMasterToWeb.config in Z.switchMasterToWeb folder instead of switchMasterToWeb in include folder.

Sitecore with SolrCloud throws HTML tags error

We recently setup SolrCloud (Solr 4.10.3) with Sitecore 8.0 Update 2. We have also set it up so that it allows for Switch on Rebuild using this patch - https://github.com/SitecoreSupport/Sitecore.Support.449298/releases.
The setup works fine in one environment but in another environment it is throwing a strange error in the second environment. Some of the indexes rebuild fine but other indexes fail with the following error -
Job started: Index_Update_IndexName=Sitecore_web_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Xml.XmlException: The 'br' start tag on line 1 position 133 does not match the end tag of 'body'. Line 1, position 177.
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd)
at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddRange(IEnumerable`1 group, Int32 groupSize)
at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.Commit()
at Sitecore.Support.ContentSearch.SolrProvider.SwitchOnRebuildSolrSearchIndex.Rebuild(Boolean resetIndex, Boolean optimizeOnComplete) in D:\works\projects\gitHubRepo\Sitecore.Support.449298\src\Sitecore.Support.449298\ContentSearch\SolrProvider\SwitchOnRebuildSolrSearchIndex.cs:line 155
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Jobs.Job.ThreadEntry(Object state)
At first look, it looks like the error may be related to some corrupt BR tags without closing slash at the end. But where should I look is not clear.
Also, another issue is that after this happened, the content editor, index rebuild, and other interfaces have started failing with the same error.
Any help is appreciated.
Thanks

Sitecore Commerce Connect 8.1 - Exception after Product Sync

I'm trying to get the products from the hybris commerce system. So I wrote the two pipelines to get the product ids and to get a product by id.
Now when I click the "Synchronize all products" button in Sitecore, the products are saved to my Sitecore Product Repository, but at the end I get this error message:
ManagedPoolThread #5 09:15:10 ERROR Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Jobs.Job.ThreadEntry(Object state)
Nested Exception
Exception: System.AggregateException
Message: One or more errors occurred.
Source: mscorlib
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at Sitecore.Commerce.Pipelines.Products.SynchronizeProductList.SynchronizeProductList.Process(ServicePipelineArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Commerce.Services.ServiceProvider.RunPipeline[TRequest,TResult](String pipelineName, TRequest request)
at Sitecore.Commerce.Services.Products.ProductSynchronizationProvider.RunPipelineBody[TRequest,TResult](String pipelineName, TRequest request)
at Sitecore.Commerce.Services.Products.ProductSynchronizationProvider.SynchronizeProducts(SynchronizationRequest request)
Nested Exception
Exception: System.ArgumentException
Message: Empty strings are not allowed.
Parameter name: productId
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName)
at Sitecore.Commerce.Services.Products.ProductSynchronizationRequest..ctor(String productId)
at Sitecore.Commerce.Pipelines.Products.SynchronizeProductList.SynchronizeProductList.<>c__DisplayClass4.<Process>b__1(String productId)
at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
What is also strange is that I don't see the synched products in the repository, until I changed a config file or similar.
Any idea?

Sitecore Generallink is not showing Subitems under a Site node

I have used General Link field in one of the templates. In my lower environment when Insert Link is clicked I can traverse through all the sites and items under it.
In my higher environment one of the sites and the child items under it are not browsable. The items were moved to higher environment using a package hence not sure where is the issue.
Has anyone faced similar issue?
I faced the same problem after package installation. I inspected request in browser and saw:
{statusCode: 500, error: {message : "Template is null."}}
Also it was a error on log:
ERROR [Item Web API] Template is null.
Exception: System.InvalidOperationException
Message: Template is null.
Source: Sitecore.ItemWebApi
at Sitecore.ItemWebApi.Pipelines.GetProperties.GetProperties.Process(GetPropertiesArgs arguments)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.ItemWebApi.Pipelines.Read.GetResult.GetProperties(Item item)
at Sitecore.ItemWebApi.Pipelines.Read.GetResult.CreateItemMock(Item item)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Sitecore.ItemWebApi.Pipelines.Read.GetResult.Process(ReadArgs arguments)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.ItemWebApi.Pipelines.Request.ResolveAction.ExecuteReadRequest(RequestArgs args)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.ItemWebApi.Pipelines.HttpRequest.LaunchRequest.Process(HttpRequestArgs arguments)
After investigating the problem, I found that one of the "Home" children item`s template was missing in package. The problem was solved after deploying this missing template.
This is typically caused by different security permissions for your authors in the environment. Have you verified the items are in the content tree? If you login as an admin do the items show up?
I can't recall right now, but it is also possible that dialog drives off of cached/indexed data. Make sure you have cleared the cache and have rebuilt indexes to remove it as a possible source of the problem.