Umbraco Log Error Failed to load Xml from file - umbraco

I get lots of Errors in my Umbraco 7.2.6 log file. And sometimes the CMS is broken, needs to restart IIS or browser. All errors are somethings with the load or save XML Lock or Thread aborted. I use the default Umbraco config on a simple shared hosting environment.
But It often works well. (so no file permission or somethings I expect)
What is wrong?
2015-07-07 09:45:02,833 [10] INFO umbraco.BusinessLogic.Log - [T15/D3] Log scrubbed. Removed all items older than 2015-05-08 09:45:02
2015-07-07 09:45:40,726 [10] ERROR umbraco.content - [T8/D3] Failed to load Xml from file.
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout)
at Umbraco.Core.AsyncLock.Lock(Int32 millisecondsTimeout)
at umbraco.content.EnsureFileLock()
at umbraco.content.LoadXmlFromFile()
2015-07-07 09:45:40,741 [10] ERROR Umbraco.Web.WebServices.ScheduledPublishController - [T55/D3] Error executing scheduled task
System.Threading.ThreadAbortException: Thread was being aborted.
at umbraco.content.LoadXmlFromFile()
at umbraco.content.LoadXmlLocked(SafeXmlReaderWriter safeXml, Boolean& registerXmlChange)
at umbraco.content..ctor()
at umbraco.content.<.cctor>b__17()
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Umbraco.Web.WebServices.ScheduledPublishController.Index()
2015-07-07 09:45:40,757 [10] ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [T7/D3] An error occurred with the scheduled publishing. The base url used in the request was: http://acc.xxxxxxx.nl:80/umbraco/, see http://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/#ScheduledTasks documentation for details on setting a baseUrl if this is in error
System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
at System.Net.WebClient.UploadString(Uri address, String method, String data)
at System.Net.WebClient.UploadString(String address, String data)
at Umbraco.Web.Scheduling.ScheduledPublishing.PerformRun()
2015-07-07 09:46:14,905 [10] INFO Umbraco.Core.PluginManager - [T19/D3] Starting resolution types of Umbraco.Core.PropertyEditors.IParameterEditor
2015-07-07 12:55:10,801 [17] ERROR umbraco.content - [T18/D11] Failed to save Xml to file.
System.TimeoutException: Failed to enter the lock within timeout.
at Umbraco.Core.AsyncLock.Lock(Int32 millisecondsTimeout)
at umbraco.content.EnsureFileLock()
at umbraco.content.<SaveXmlToFileAsync>d__d.MoveNext()
2015-07-07 14:03:09,702 [9] ERROR umbraco.content - [T7/D3] Failed to load Xml from file.
System.TimeoutException: Failed to enter the lock within timeout.
at Umbraco.Core.AsyncLock.Lock(Int32 millisecondsTimeout)
at umbraco.content.EnsureFileLock()
at umbraco.content.LoadXmlFromFile()

This issue was related to http://issues.umbraco.org/issue/U4-6802
it is fixed in the Umbraco v7.2.8 release.

Related

Devops2019 JobAgent Down after URL Change

We are using Devops 2019 (App and data tiers are on two different servers),As part of our domain migration we have changed our Devops URL
from: https:\domain.wireless.com
to: https:\domain.wire.com
But post URL change, we have noticed all the build agents stopped working (self hosted agents ) and when admin console is launched and tried to send test mail I see below:
Exception Message: The underlying connection was closed:
An unexpected error occurred on a send. (type WebException)Exception Stack Trace:
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.TeamFoundation.Admin.Console.Models.DlgSendTestMailViewModel.SendEmail()
Inner Exception Details:
Exception Message: Unable to read data from the transport connection:
An existing connection was forcibly closed by the remote host. (type IOException)
Exception Stack Trace:
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
Need some assistance on how to resolve such issues
Probably not your ideal approach, but you could just remove and register the agents using the new URL. You'd have to reset any custom capabilities afterwards.
For windows, the URL is stored in a hidden file at the agent root folder. I don't think it works just modifying it in that agent configuration, but you could try changing one and stop/start the agent if it is running as a service. If it is running auto-login (maybe for UI testing), I've never had any success except for removing/reconfiguring.

How to check to see if Ruby-Kafka retries works?

In the documentation it is mentioned that producer retries to send the message to the queue based on max_retries.
So I shutdown the Kafka and then tried my producer. I get this error
Fetching cluster metadata from kafka://localhost:9092
[topic_metadata] Opening connection to localhost:9092 with client id MYCLIENTID
ERROR -- : [topic_metadata] Failed to connect to localhost:9092: Connection refused
DEBUG -- : Closing socket to localhost:9092
ERROR -- : Failed to fetch metadata from kafka://localhost:9092
Completed 500 Internal Server Error in 486ms (ActiveRecord: 33.9ms)
which it make sense, however the retries never happens after that. I have read the doc inside-out and I can't figure it out how this retries actually going to trigger?
Here is my code:
def self.deliver_message(kafka, message, topic, transactional_id)
producer = kafka.producer(idempotent: true,
transactional_id: transactional_id,
required_acks: :all,
max_retries: 5,
retry_backoff: 5)
producer.produce(message, topic: topic)
producer.deliver_messages
end
link to doc:
https://www.rubydoc.info/gems/ruby-kafka/Kafka/Producer#initialize-instance_method
Thank you in advance.
The retries are based on the type of Exception thrown by the producer callback. According to the Callback Docs there are the following Exception possible happening during callback:
The exception thrown during processing of this record. Null if no error occurred. Possible thrown exceptions include:
Non-Retriable exceptions (fatal, the message will never be sent):
InvalidTopicException
OffsetMetadataTooLargeException
RecordBatchTooLargeException
RecordTooLargeException
UnknownServerException
Retriable exceptions (transient, may be covered by increasing #.retries):
CorruptRecordException
InchvalidMetadataException
NotEnoughReplicasAfterAppendException
NotEnoughReplicasException
OffsetOutOfRangeException
TimeoutException
UnknownTopicOrPartitionException
Shutting down Kafka completely rather looks like a non-retriable Exception.

Template not saving 404 not found umbraco/RestServices/SaveFile/SaveTemplate UMBRACO

When I was trying to save the template, I can't able to save the template and also I didn't get any error message.
But in Chrome console I can able to see the following message "404 not found umbraco/RestServices/SaveFile/SaveTemplate".
In App_Data I was getting the following error,
ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [Thread 5] An error occurred with the scheduled publishing System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly. at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) at System.Net.WebClient.UploadString(Uri address, String method, String data) at System.Net.WebClient.UploadString(String address, String data) at Umbraco.Web.Scheduling.ScheduledPublishing.Run()
Possibly a permissions issue? Check that the identity the website is running under has permissions to read/write/modify the views folder.

AccessTokenAuthorizationCodeRequestC "error":"invalid_request"

At the second call to Client.ProcessUserAuthorization(); after I get the code from the oauth server, I get an exception: Error occurred while sending a direct message or getting the response.
Here is the last part from the log file taken with log4net, the full log is recorded in this gist: https://gist.github.com/tonyeung/5513769
2013-05-03 15:14:41,292 (GMT-5) [10] DEBUG DotNetOpenAuth.Messaging.Channel - Sending AccessTokenAuthorizationCodeRequestC request.
2013-05-03 15:14:41,393 (GMT-5) [10] DEBUG DotNetOpenAuth.Http - HTTP POST http://localhost:38828/OAuth/Token
2013-05-03 15:14:41,450 (GMT-5) [10] ERROR DotNetOpenAuth.Http - http://localhost:38828/OAuth/Token returned 400 BadRequest: Bad Request
2013-05-03 15:14:41,450 (GMT-5) [10] DEBUG DotNetOpenAuth.Http - WebException from http://localhost:38828/OAuth/Token:
{"error":"invalid_request"}
I've uploaded the solution to https://github.com/tonyeung/dotnetopenauth
The entry point is in the about action on the home controller of the Client project.
The solution is in VS2012, the latest nuget dnoa package. Nuget restore is on.
Please note that I'm implementing pieces as I need them in order to understand how the library works. I'm sure that this error is due to a missing implementation somewhere, but I'm not sure what it is?
So it looks like I was missing implementations for IsAuthorizationValid and CreateAccessToken in the Authorization Server. Please check the github repository for the stubs i put in that makes the error go away.
EDIT:
There was also a database validation error that I didn't trap. So basically any error on the server side will cause this message it looks like.
EDIT2:
There was also an issue where if the url of the page contains any non url encoded values it will throw an invalid request. In my case, my login page had a querystring parameter of returnUrl, and I had set it to /Home, which it DID NOT like, had to be: %2FHome

DotNetOpenAuth with Yahoo,AOL results in Timeout or NameResolutionFailure

I'm using DotNetOpenAuth 3.5.0.10357 and when attempting to authorize using Yahoo as the provider (https://me.yahoo.com) often times a ProtocolException is thrown at OpenIdRelyingParty.CreateRequest(Identifier). If another attempt is made immediately after the first attempt, the workflow behaves as expected. I've added a XRDS document as per this blog post and when the Yahoo provider responds it seems to detect the file as it no longer displays that verification message. All other providers, with the exception of AOL which has the same issues, work properly at all times. I've enabled logging and there seem to be two different causes, one is a timeout another is a NameResolutionFailure, both from WebException.
Here is the log from the instance resulting in NameResolutionFailure:
HTTP GET https://me.yahoo.com/ WebException NameResolutionFailure from
https://me.yahoo.com/, no response available. Error while performing
discovery on: "https://me.yahoo.com/":
DotNetOpenAuth.Messaging.ProtocolException: Error occurred while
sending a direct message or getting the response. --->
System.Net.WebException: The remote name could not be resolved:
'me.yahoo.com' at System.Net.HttpWebRequest.GetResponse() at
DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) --- End of inner
exception stack trace --- at
DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) at
DotNetOpenAuth.Messaging.UntrustedWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) at
DotNetOpenAuth.Yadis.Yadis.Request(IDirectWebRequestHandler
requestHandler, Uri uri, Boolean requireSsl, String[] acceptTypes)
at DotNetOpenAuth.Yadis.Yadis.Discover(IDirectWebRequestHandler
requestHandler, UriIdentifier uri, Boolean requireSsl) at
DotNetOpenAuth.OpenId.UriDiscoveryService.Discover(Identifier
identifier, IDirectWebRequestHandler requestHandler, Boolean&
abortDiscoveryChain) at
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.Discover(Identifier
identifier) at
DotNetOpenAuth.OpenId.RelyingParty.AuthenticationRequest.Create(Identifier
userSuppliedIdentifier, OpenIdRelyingParty relyingParty, Realm realm,
Uri returnToUrl, Boolean createNewAssociationsAsNeeded) Performing
discovery on user-supplied identifier: https://me.yahoo.com/ Filtering
and sorting of endpoints did not affect the list.
The following is the log from a timeout:
HTTP GET https://me.yahoo.com/ WebException Timeout from
https://me.yahoo.com/, no response available. Error while performing
discovery on: "https://me.yahoo.com/":
DotNetOpenAuth.Messaging.ProtocolException: Error occurred while
sending a direct message or getting the response. --->
System.Net.WebException: The operation has timed out at
System.Net.HttpWebRequest.GetResponse() at
DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) --- End of inner
exception stack trace --- at
DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) at
DotNetOpenAuth.Messaging.UntrustedWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) at
DotNetOpenAuth.Yadis.Yadis.Request(IDirectWebRequestHandler
requestHandler, Uri uri, Boolean requireSsl, String[] acceptTypes)
at DotNetOpenAuth.Yadis.Yadis.Discover(IDirectWebRequestHandler
requestHandler, UriIdentifier uri, Boolean requireSsl) at
DotNetOpenAuth.OpenId.UriDiscoveryService.Discover(Identifier
identifier, IDirectWebRequestHandler requestHandler, Boolean&
abortDiscoveryChain) at
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.Discover(Identifier
identifier) at
DotNetOpenAuth.OpenId.RelyingParty.AuthenticationRequest.Create(Identifier
userSuppliedIdentifier, OpenIdRelyingParty relyingParty, Realm realm,
Uri returnToUrl, Boolean createNewAssociationsAsNeeded) Performing
discovery on user-supplied identifier: https://me.yahoo.com/ Filtering
and sorting of endpoints did not affect the list.
I'm using the default configuration settings. I'm guessing I cat get around the timeout error by increasing the timeout setting, however I'm not sure how to go about the name resolution error.
From the exception this doesn't look like a DotNetOpenAuth-specific problem to me. It looks like your DNS server is slow or you have a bad connection to it. I'd look into that problem. And yes, increasing the timeout will help you in a pinch.

Resources