0
Fixed

A task was cancelled

Carol Wapshere 2 years ago updated by Beau Harrison (Software Developer) 1 month ago 12

When running connector imports in IdB 5.2 (PowerShell connector) I am seeing a message "A task was cancelled" though there doesn't actually seem to be any problem. MD says this is a known issue but I need to ask for a patch for 5.2.

This is the full error:



System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Connect.Web.Client.ConnectorClient.d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Connect.Web.Client.ProfiledConnectorClient.d__108.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Unify.Framework.Web.UnifyController.d__39.MoveNext()
Affected Versions:
Fixed by Version:

Answer

Answer
Under review

Hi Carol,

Could you please try applying the following patch, and let me know if the issue persists? Patch.zip

Answer
Under review

Hi Carol,

Could you please try applying the following patch, and let me know if the issue persists? Patch.zip

I dropped Unify.IdenityBroker.Connector.Api.dll in the Services folder, and the other two in the Web folder, and restarted IdB. I'm still seeing the message appear during an Import - looks to be exactly the same. Did I put the files in the right places? Should it have been Web\bin?

My apologies, yes please try in Web\bin. The two DLLs should be in that directory already.

Hi Carol,

Did you have any luck with this patch?

Back on site today and haven't noticed the error message so I think we're good.

I am now seeing this problem with version 5.2.2 just installed tonight.

System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Unify.Connect.Web.Client.AdapterClient.<SimulateChangesAsync>d__181.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Unify.Connect.Web.Client.ProfiledAdapterClient.<SimulateChangesAsync>d__94.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Unify.Framework.Web.UnifyController.<HandleRemoteException>d__39.MoveNext() 

Hi Bob,

Have you attempted to use the patch provided for this issue? If it doesn't resolve the issue, please create a new topic with full details.

No Beau it wasn't clear from the ticket if the patch was for v5.2.1 or 5.2.2 (the latter being the version just installed).  If it is for 5.2.2 then I will be happy to go ahead and try?

Also, the process of creating a new issue automatically tries to match your problem with existing issues presumably to avoid creating duplicate tickets.  Are you saying that a ticket is never re-opened if the published fix turns out to be ineffective?  Do we want the user searching for an exception to come up with 2 entries instead of one?

+1

The patch would have been for 5.2.1 based on the date, though it doesn't appear to have been rolled into 5.2.2. However, there shouldn't be an issue using it with 5.2.2.

Trying the patch would have determined if it was the same issue or not. Also, there are already several other "a task was cancelled" issues, with the underlying cause fixed in 5.3.1. The cause is the UI request to the Broker service timing out.

If you decide not to try the patch and it doesn't cause any actual problems, then the error can be ignored.

After getting the error again tonight I tried installing the patch but got the following error on attempting to browse to the IdB console (and subsequently backed out the change to recover):

Log Name:   Application
Source:        ESENT
Date:          21/08/2019 12:00:34 AM
Event ID:      455
Task Category: Logging/Recovery
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      D-OCCCP-IM201.dbb.local
Description:
svchost (4888) Error -1032 (0xfffffbf8) occurred while opening logfile C:\windows\system32\LogFiles\Sum\Api.log.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ESENT" />
    <EventID Qualifiers="0">455</EventID>
    <Level>2</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-08-20T14:00:34.000000000Z" />
    <EventRecordID>1664182</EventRecordID>
    <Channel>Application</Channel>
    <Computer>D-OCCCP-IM201.dbb.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>svchost</Data>
    <Data>4888</Data>
    <Data>
    </Data>
    <Data>C:\windows\system32\LogFiles\Sum\Api.log</Data>
    <Data>-1032 (0xfffffbf8)</Data>
  </EventData>
</Event>

Log Name:      Application
Source:        ESENT
Date:          21/08/2019 12:00:34 AM
Event ID:      489
Task Category: General
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      D-OCCCP-IM201.dbb.local
Description:
svchost (4888) An attempt to open the file "C:\windows\system32\LogFiles\Sum\Api.log" for read only access failed with system error 5 (0x00000005): "Access is denied. ".  The open file operation will fail with error -1032 (0xfffffbf8).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ESENT" />
    <EventID Qualifiers="0">489</EventID>
    <Level>2</Level>
    <Task>1</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-08-20T14:00:34.000000000Z" />
    <EventRecordID>1664181</EventRecordID>
    <Channel>Application</Channel>
    <Computer>D-OCCCP-IM201.dbb.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>svchost</Data>
    <Data>4888</Data>
    <Data>
    </Data>
    <Data>C:\windows\system32\LogFiles\Sum\Api.log</Data>
    <Data>-1032 (0xfffffbf8)</Data>
    <Data>5 (0x00000005)</Data>
    <Data>Access is denied. </Data>
  </EventData>
</Event>

I see. Then if you're not prevented from doing anything, and I'm guessing you won't want to do an upgrade just to fix a minor UI bug, just ignore it. It doesn't affect the service in any way.