Sitecore Log File Repeated Error - sitecore

I have a sitecore 7.2 site and it is upgraded from 6.6, Any ideas what cause the following error to be appears many times in log file:
ManagedPoolThread #3 2015:07:14 10:03:48 ERROR Exception occurred in retryer scope :
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Sitecore.Data.DataProviders.Retryer.ExecuteNoResult(Action action, Action recover)
at Sitecore.Analytics.Automation.Data.Sql.SqlAutomationProvider.GetDueStates(AutomationStatesDataTable dataTable, Int32 maxEntries)
at Sitecore.Analytics.Automation.AutomationWorker.GetDueStates(AutomationStatesDataTable dataTable)
at Sitecore.Analytics.Automation.AutomationWorker.Process()
at Sitecore.Analytics.Automation.AutomationWorker.<Wakeup>b__4(Object state)
at Sitecore.Threading.ManagedThreadPool.ProcessQueuedItems()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

The reason you see the same error multiple times is because of the retryer which will retry failed database requests a number of times equal to that set in the number of tries param.
Below is the retryer section taken from web.config v7.2:
<!-- RETRYER
When enabled, the Retryer resends failed database requests a specified number of times.
For example, this is useful if you configure a Sitecore instance to support hot failover for database calls.
Default value: disabled="true"
-->
<retryer disabled="true" type="Sitecore.Data.DataProviders.Retryer, Sitecore.Kernel">
<param desc="Number of tries">6</param>
<param desc="Interval between tries">00:00:00.500</param>
<param desc="Log each exception (should be used for debug only)">true</param>
</retryer>

The exception you see is thrown when the Analytics database connection string is incorrect.
Try to connect to the database using SQL Server Management Studio using credentials from this connection strings.
It is displayed multiple times because of Retryer which tries to re-execute the query after failing (see Jason Home answer for more detailed explanation of retryer).

Related

Sitecore: Server Error in '/' Application : Empty strings are not allowed. Parameter name: handleId

My regression testing is on going to an upgraded Sitecore instance of 8.0-U3 to 8.1-U2. And one piece of the testing is to check if the workflow is properly working as expected.
So I created a new sample item named PAGE ABC (template: /sitecore/templates/Sample/Sample Item) under the /sitecore/content/home node.
The workflow of the PAGE ABC is 'Sample workflow' (template: /sitecore/system/Workflows/Sample Workflow) which was provided on a freshly installed Sitecore instance.
The PAGE ABC was created without any issue, but when I submitted the PAGE ABC, I encountered an ArgumentException shown below:
Server Error in '/' Application.
________________________________________
Empty strings are not allowed.
Parameter name: handleId
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.ArgumentException: Empty strings are not allowed.
Parameter name: handleId
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:
[ArgumentException: Empty strings are not allowed.
Parameter name: handleId]
Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName) +204
Sitecore.Workflows.WorkflowUIHelper.ExtractFieldsFromFieldEditor(String handleId) +48
Sitecore.Shell.Framework.Commands.Workflow.Run(ClientPipelineArgs args) +900
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89
Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +313
Sitecore.Web.UI.Sheer.ClientPage.ResumePipeline() +224
Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +825
Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +197
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7763
________________________________________
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0
Note: In this case, all the required fields are populated. I also tried leaving one (1) required field empty but same problem persist.
I searched for the keyword 'handleId' parameter on the entire website and I found this section on my \temp folder _UpgradeHistory which I suspected has something to do with the above issue inside the Sitecore.Kernel.xml
<member name="M:Sitecore.Workflows.WorkflowUIHelper.ExtractFieldsFromFieldEditor(System.String)">
<summary>
Extract the field values set by the field editor
</summary>
<param name="handleId">The Id of the handle holding the return values from the field editor</param>
<returns>A NameValueCollection containg the fields</returns>
</member>
I also tried searching over the internet, but I didn't find any relative solution to my problem.
Edited: I created a freshly instance of Sitecore v.8.1-U2. Replace the master db in the ConnectionString.config of the upgrade instance and the workflow submit action works, then I attached back the upgraded master database and I encountered again the issue.
Edited: I actually also noticed that there's a difference in the dialog box of the workflow. It is small compared to the working instance, which is a bigger dialog box. See supporting screenshots below:
Figure 1 : Not working workflow
Figure 2 : Working workflow
I will post a more detailed investigation when I got new information. Appreciate any help. Thanks.
I found the fix and the root cause.
First, I recreated the issue by creating a new workflow 'WORKFLOW ABC' under /sitecore/system/Workflows, I added the necessary actions, such as Draft and Published, and then create a new template and assign the 'WORKFLOW ABC'. I also created an actual item and tried to change the workflow of the item from Submit to Published. The error appeared once again. (successful replication of the issue)
Then I did the same process to a freshly installed instance and I wasn't able to replicate the issue.
Root cause:
So I compared both values and there's a discrepancy, the Default Comment Template field was empty (why it took me so long to figured this out) but is existing to the freshly installed 8.1-U2 instance.
Resolution:
I changed the value of the Default Comment Template field from empty to \Templates\System\Workflow\Standard Comment Template and test again and it works.
Screenshot for easy visualization:
You may also want to update the Default Comment Dialog Height field value to 250, but this one is optional.
EDITED
Since when changing the master database, the workflow works. Then the issue comes with the items. Can you check if the template of the workflow is the same as compared with the working instance.
Path is /sitecore/templates/System/Workflow

Sitecore Error: Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found

Has anyone ran into the issue below? Basically, I am trying to upgrade the Web forms for Marketers from 8.0-U3 to 8.0-U4(successful) to 8.1-Initial release (not successful).
The error was during the update installation process:
http://upgrade/sitecore/admin/UpdateInstallationWizard.aspx
It says:
The installation has encountered a critical error.
This Sitecore installation cannot be used for either testing or
production purposes until Sitecore support is contacted. Make sure to
download and include the file containing diagnostic information about
your Sitecore installation.
Server Error in '/' Application.
Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found.
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: Sitecore.Exceptions.ConfigurationException: Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found.
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:
[ConfigurationException: Could not create instance of type: Sitecore.Form.Core.WffmActionHandler. No matching constructor was found.]
Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +272
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +131
Sitecore.Events.EventSubscribers.Add(String eventName, XmlNode configNode) +545
Sitecore.Events.Event.GetConfigSubscribers() +564
Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) +338
Sitecore.Data.DataProviders.Sql.SqlDataProvider.SetProperty(String parameterName, String value, CallContext context) +259
Sitecore.Data.DataProviders.DataProvider.SetProperty(String name, String value, CallContext context, DataProviderCollection providers) +124
Sitecore.Data.DataManager.SetProperty(String name, String value) +103
Sitecore.Web.Authentication.TicketManager.IsTicketExpired(Ticket ticket, Boolean useProlongation) +330
Sitecore.Web.Authentication.TicketManager.GetTicket(String ticketId, Boolean returnExpired) +93
Sitecore.Web.Authentication.TicketManager.IsTicketValid(String ticketId) +37
Sitecore.Shell.Web.ShellPage.IsLoggedIn(Boolean returnAfterLogin) +409
Sitecore.Shell.Web.UI.SecurePage.OnLoad(EventArgs e) +22
System.Web.UI.Control.LoadRecursive() +68
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4498
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0
I was able to fixed the issue. I reinstalled the update package of WFFM 8.1. But prior to that, I copy and pasted the DLLs and configuration files of WFFM 8.1-Initial release to my instance before undergoing under run of update.
Edited: Root cause, forgot to update the Sitecore.Forms.config with the patch below:
<handler type="Sitecore.Form.Core.WffmActionHandler, Sitecore.Forms.Core" method="OnWffmActionEventFired" >
<param name="actionManager" ref="/sitecore/wffm/wffmActionExecutor" /> </handler>
In my case i had fixed by copying entire DLL from clean-sitecore installation folder, When more dig on it who is black sheep is below they are
Sitecore.Forms.Core.dll
Sitecore.Forms.Custom.dll
Sitecore.Forms.Mvc.dll
Above dll's version differed.

Azure Web Job-The remote server returned 404

I have a continuos running web job which listens to a start queue and a stop queue with their respective functions. There are 3 predefined process in the web job and the start queue contains a message which mentions the process name to be started while the stop queue contains a message which mentions the process name to be stopped.
When ever the webjob stops a process it crashes and restarts with the above exception since last 4 weeks.
Executing: 'Functions.StartProcess' because New queue message detected on 'start'.
Updated the status of Process A to 1
Process A Started
Process A processed 200 records
Process A processed 200 records
Process A processed 200 records
Process A processed 200 records
Process A processed 200 records
Executing: 'Functions.StopProcess' because New queue message detected on 'stop'.
Process A stopped
Disposed Process A
Updated the status of Process A to 3
Unhandled Exception: Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode expectedStatusCode, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobSharedImpl.<DeleteBlobImpl>b__1b(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx)
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse[T](IAsyncResult getResponseResult)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult result)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.EndDelete(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.<>c__DisplayClass4.<CreateCallbackVoid>b__3(IAsyncResult ar)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Host.Protocols.PersistentQueueWriter`1.<DeleteAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Host.Loggers.CompositeFunctionInstanceLogger.<DeleteLogFunctionStartedAsync>d__e.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueTriggerExecutor.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener.<ProcessMessageAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.WebJobs.Host.Timers.BackgroundExceptionDispatcher.<>c__DisplayClass1.<Throw>b__0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The webjob does not even contain any code to delete a blob file.
While debugging, the debugger does not point to any specific line while throwing the exception and hence I have no clue as to what is the actual cause.
PS : It used to run perfectly prior to that and every function's body is enclosed in try catch block. The catch block does not rethrow the exception but just logs the stacktrace and continues.
EDIT
I had to check if the below containers were there
in the webjob's storage and also updated the Microsoft.Web.WebJobs.Publish nuget package. I am really not sure if this fixes the problem for sure though.
It looks like you were right, you do in fact need to manually create the blob containers, or publish the web job, in which case it looks like the environment will create the containers for you.
When I tried it out initially, I did the publish first, and it worked like a charm. Second project, I am doing it differently, so I ran the console app first, and it kept failing with 404.
So, you need to create:
azure-webjobs-dashboard
azure-webjobs-hosts
azure-jobs-hosts-archive
azure-jobs-hosts-output
Hope it helps someone.
I was getting this same error.
What worked for me was updating the WindowsAzure.Storage package in my case from 4.3.0 to 7.1.2, but I would go with latest or whatever your other WebJobs are using (if they are running without issue).
Our WebJob encountered this issue in the middle of a Friday afternoon. Previous deployment was 9 days prior and the WebJob functioned up until it suddenly did not. Not sure why it stopped working.
After much reading I believe this means simply that it cannot connect to the storage account for one reason or another, while initializing the WebJob.
Our solution was to add the AzureWebJobsStorage and AzureWebJobsDashboard connection strings to the connection strings config of the App Service via our ARM Template.
"AzureWebJobsDashboard": {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]",
"type": "Custom"
},
"AzureWebJobsStorage": {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]",
"type": "Custom"
}
These values already existed in the app settings config of the App Service, which must have been how it was functioning prior.
We did update libraries per other suggestions to some other answers to this issue. That alone did not solve it.
We also migrated the WebJob from .Net Framework 4.5 to 4.6 to match the rest of the solution, though I don't think this was really part of the fix, just FYI in case it helps someone.

Client Certificate Web Service Call

I have a requirement to call server web service with client certificate. They have provided me one .crt file. I am hosting my project in WindowsServer2008 IIS7.
I install .crt from right click properties, as i can't add certificate to Server Certificates by Complete Certificate Request. I got the error:
CertEnroll::CX509Enrollment::p_InstallResponse: ANSI bad tag value met.
I googled and found nothing on how to install .crt client certificate. Also tried installing as explaining here on step4.
And when i called like this
string certPath = Server.MapPath("../certificate/iot01.servername.crt");
X509Certificate2 cert = new X509Certificate2(certPath);
ws.ClientCertificates.Add(cert);
res = ws.methodName(params);
I got the error:
System.IO.IOException: The handshake failed due to an unexpected packet format. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.TlsStream.CallProcessAuthentication(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async)
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at .....
Is this is related to my certificate installing and calling. Can someone point me where am i gone wrong.
The error clearly mentions "handshake failed". I suspect it is an SSL auth error because of a WSDL format mismatch.
You should check whether the format of your request, and that of the response are the same. They need to match to be able to communicate.
Microsoft Network Monitor can help you figure out the format.

Why do I get an error in Firefox when uploading an image to the sitecore media library?

Every time I try to upload an image to the Media Library using Firefox, I get a pop up error that says "An error occured while uploading a file". Upon examination of the sitecore logs, I see the following in the stacktrace:
288 11:29:27 ERROR Application error.
Exception: System.ArgumentException
Message: Illegal characters in path.
Source: mscorlib
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.File.GetLastWriteTimeUtc(String path)
at Sitecore.Resources.Media.MediaData.get_MediaId()
at Sitecore.Resources.Media.MediaCache.CanCache(Media media, MediaOptions options)
at Sitecore.Resources.Media.MediaCache.GetStream(Media media, MediaOptions options)
at Sitecore.Resources.Media.Media.GetStream(MediaOptions options)
at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context, MediaRequest request, Media media)
at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context)
at Sitecore.Resources.Media.MediaRequestHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Heartbeat 11:30:04 WARN Memory usage exceeded the MemoryMonitor threshold.
Heartbeat 11:30:04 WARN Memory usage: 1,680,764,928
Heartbeat 11:30:04 WARN Number of suppressed logs due to the minimum time between log entries: 10
I can tell there is some kind of illegal character exception, but I don't know where to look from here. What could be the cause of this issue and how might I fix it? Is there somewhere to configure the file path in sitecore?
I am using Sitecore 6.5
I had this problem also on Firefox and Safari.
Please change setting Upload.Classic to true.
It will be :
<setting name="Upload.Classic" value="true" />