Sitecore with SolrCloud throws HTML tags error - sitecore

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

Related

Microsoft.ML --version 0.3.0 -- Unable to Get started with ML.NET in 10 minutes

I have follow the steps provide in (https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet/get-started/windows) to get started with ML.NET in 10 minutes.
But on running the app. Console is through below runtime error.
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Parsing failed with an exception: Stream reading encountered exception ---> System.FormatException: Stream reading encountered exception ---> System.IO.FileNotFoundException: Could not find file 'C:\XXXX\MLNetExampleA\iris-data.txt'.
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Microsoft.ML.Runtime.SimpleFileHandle.OpenReadStream()
at Microsoft.ML.Runtime.Data.FileHandleSource.OpenTextReader(Int32 index)
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.LineReader.ThreadProc()
--- End of inner exception stack trace ---
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.LineReader.GetBatch()
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.ParallelState.Parse(Int32 tid)
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.ParallelState.ThreadProc(Object obj)
--- End of inner exception stack trace ---
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.<ParseParallel>d__33.MoveNext()
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.MoveNextCore()
at Microsoft.ML.Runtime.Data.RootCursorBase.MoveNext()
at Microsoft.ML.Runtime.Data.TermTransform.Train(IHostEnvironment env, IChannel ch, ColInfo[] infos, ArgumentsBase args, ColumnBase[] column, IDataView trainingData)
at Microsoft.ML.Runtime.Data.TermTransform..ctor(ArgumentsBase args, ColumnBase[] column, IHostEnvironment env, IDataView input)
at Microsoft.ML.Runtime.Data.TermTransform..ctor(IHostEnvironment env, Arguments args, IDataView input)
at Microsoft.ML.Runtime.Transforms.TextAnalytics.TermTransform(IHostEnvironment env, Arguments input)
--- 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 Microsoft.ML.Runtime.EntryPoints.EntryPointNode.Run()
at Microsoft.ML.Runtime.EntryPoints.EntryPointGraph.RunNode(EntryPointNode node)
at Microsoft.ML.Runtime.EntryPoints.JsonUtils.GraphRunner.RunAllNonMacros()
at Microsoft.ML.Runtime.EntryPoints.JsonUtils.GraphRunner.RunAll()
at Microsoft.ML.LearningPipeline.Train[TInput,TOutput]()
at MLNetExampleA.Program.Main(String[] args) in C:\XXXX\MLNetExampleA\Program.cs:line 70
The error indicates
Could not find file 'C:\XXXX\MLNetExampleA\iris-data.txt'
Have you followed
(source: microsoft.com)
and verified that the file is actually copied to the output folder?

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?

Error in contenttestingupdate.aspx while performing a Sitecore upgrade

I'm currently carrying out an upgrade to 8.1, but when running the contenttestingupdate.aspx admin page, it fails with the following error:
Exception: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation.
---> System.ArgumentNullException: Value cannot be null. Parameter name: fieldNameTranslator
at Sitecore.ContentSearch.Linq.Solr.SolrIndexParameters..ctor(IIndexValueFormatter valueFormatter, IFieldQueryTranslatorMap`1 fieldQueryTranslators, FieldNameTranslator fieldNameTranslator, IExecutionContext[] executionContexts, IFieldMapReaders fieldMap, Boolean convertQueryDatesToUtc)
at Sitecore.ContentSearch.SolrProvider.LinqToSolrIndex`1..ctor(SolrSearchContext context, IExecutionContext[] executionContexts)
at Sitecore.ContentSearch.SolrProvider.SolrSearchContext.GetQueryable[TItem](IExecutionContext[] executionContexts)
at Sitecore.ContentTesting.ContentSearch.TestingSearch.GetAllTests()
at Sitecore.ContentTesting.Upgrade.PostUpgradeRunner.GetTests()
at Sitecore.ContentTesting.Upgrade.PostUpgradeRunner.Run(StepOptions steps)
at Sitecore.ContentTesting.Upgrade.ContentTestingUpgrade.StartUpgrade(StepOptions options) --- 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 Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Jobs.Job.ThreadEntry(Object state)
All lucene configs are disabled, as it's using SOLR.
What could be the problem? Additionally, is this a step that could be skipped to continue with the upgrade?

Sitecore 8.1 : SessionEndPipeline failed

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.

F# Web API - Exception has been thrown by the target of an invocation

I am trying to create an F# web service using OWIN, I have found 2 tutorials online and both are give me the same error of "Exception has been thrown by the target of an invocation" on the same line of code but I can not figure out why this is happening
use server = WebApp.Start<Startup>(baseAddress)
Below is a a short piece of code I am using the second and more complex example can be found here on the forfunandprofit website example number 3
namespace FSharpWebAPIOwin
open Owin
open System.Web.Http
open System.Collections.Generic
open Microsoft.Owin.Hosting
open System
module main =
type Startup() =
member this.Configuration(app : IAppBuilder) =
let config = new HttpConfiguration()
let route = config.Routes.MapHttpRoute(
"Default",
"api/{controller}/{id}" )
route.Defaults.Add("id", RouteParameter.Optional )
app.UseWebApi(config) |> ignore
type HelloController() =
inherit ApiController()
member this.Get() =
"hello"
[<EntryPoint>]
let main argv =
let baseAddress = "http://localhost:8000"
use server = WebApp.Start<Startup>(baseAddress)
Console.WriteLine("Press enter to exit ... ")
Console.ReadLine() |> ignore
0
Exception Details
System.Reflection.TargetInvocationException was unhandled
HResult=-2146232828
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
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 Owin.Loader.DefaultLoader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder)
at Owin.Loader.DefaultLoader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder)
at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.Owin.Hosting.Starter.DirectHostingStarter.Start(StartOptions options)
at Microsoft.Owin.Hosting.Starter.HostingStarter.Start(StartOptions options)
at Microsoft.Owin.Hosting.WebApp.StartImplementation(IServiceProvider services, StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start[TStartup](StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start[TStartup](String url)
at FSharpWebAPIOwin.main.main(String[] argv) in C:\Users\amulligan\Desktop\Api\ConsoleApplication2\ConsoleApplication2\Program.fs:line 30
InnerException: System.IO.FileLoadException
HResult=-2146234304
Message=Could not load file or assembly 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source=ConsoleApplication2
FileName=System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog==== Pre-bind state information ===
LOG: User = CCS\amulligan
LOG: DisplayName = System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/amulligan/Desktop/Api/ConsoleApplication2/ConsoleApplication2/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : ConsoleApplication2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\amulligan\Desktop\Api\ConsoleApplication2\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Users/amulligan/Desktop/Api/ConsoleApplication2/ConsoleApplication2/bin/Debug/System.Web.Http.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
StackTrace:
at FSharpWebAPIOwin.main.Startup.Configuration(IAppBuilder app)
InnerException: