web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

BC 25 Onprem Server Instance Failing to Restart

(4) ShareShare
ReportReport
Posted on by 629
Hi, 
I recently installed BC25 Onprem on my local machine. 
I linked my Database and Database Server to the Instance. 
Then I published my BC License. 

When I try to restart the server Instance the serverinstance fail to restart. 

The Event viewer call stack shows "A task was canceled", It must be something internal since I didn't cancel anything. 


Type: System.Threading.Tasks.TaskCanceledException
CancellationToken: System.Threading.CancellationToken
Message: A task was canceled.
HResult: -2146233029
StackTrace:
     at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
     at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
     at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
     at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.DisposeOrTerminateOnTimeout(ServiceBase serviceBase)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.<>c__DisplayClass12_0.<OnStop>b__0()
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.TryActionWithLogging(Action action)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.OnStop(ServiceBase serviceBase)
     at Microsoft.Dynamics.Nav.WindowsServices.WindowsService.NavWindowsServiceLifetime.OnStop()
     at System.ServiceProcess.ServiceBase.DeferredStop()
     at System.ServiceProcess.ServiceBase.<>c__DisplayClass71_0.<ServiceCommandCallback>b__2(Object _)
     at System.Threading.ThreadPoolWorkQueue.Dispatch()
     at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
  --- End of stack trace from previous location ---
  
StackTrace:
     at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
     at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
     at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
     at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.DisposeOrTerminateOnTimeout(ServiceBase serviceBase)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.<>c__DisplayClass12_0.<OnStop>b__0()
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.TryActionWithLogging(Action action)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.OnStop(ServiceBase serviceBase)
     at Microsoft.Dynamics.Nav.WindowsServices.WindowsService.NavWindowsServiceLifetime.OnStop()
     at System.ServiceProcess.ServiceBase.DeferredStop()
     at System.ServiceProcess.ServiceBase.<>c__DisplayClass71_0.<ServiceCommandCallback>b__2(Object _)
     at System.Threading.ThreadPoolWorkQueue.Dispatch()
     at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
  --- End of stack trace from previous location ---
  

Any idea how I can prevent the Cancellation?
 
I have the same question (0)
  • Montassar Krichi Profile Picture
    231 on at
    BC 25 Onprem Server Instance Failing to Restart
    Hi,
    I recommend you to check  Application log for root cause
    Response depend on the cause :)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,089 Super User 2025 Season 2 on at
    BC 25 Onprem Server Instance Failing to Restart

    This error usually happens when the server instance fails to start due to a timeout — often caused by:

    • Missing or incorrect database permissions
    • Invalid license file
    • Corrupt or mismatched extensions
    • Service tier config issue (wrong ports or parameters)

    Try this:

    1. Double-check your CustomSettings.config — especially DB connection and ports.
    2. Make sure the BC service account has access to the SQL DB.
    3. Temporarily move extensions from the Add-ins or Extension folder and restart.
    4. Re-upload your license using PowerShell.
     

    If it still fails, try restarting with logging enabled to pinpoint the failure.

     

    Mark below checkbox to make this answer Verified if it helps you.

  • Suggested answer
    RockwithNav Profile Picture
    8,370 Super User 2025 Season 2 on at
    BC 25 Onprem Server Instance Failing to Restart

    Many possible reasons like - 

    Pending operations: Something running in the background hasn’t finished yet.

    Timeout issues: Restart is taking too long and getting stuck.

    Database connectivity: There’s trouble connecting to the database.

    Deadlocks: The database is stuck because different parts are blocking each other.
     
    Try forcibly stopping and then Restart.
  • Suggested answer
    YUN ZHU Profile Picture
    92,831 Super User 2025 Season 2 on at
    BC 25 Onprem Server Instance Failing to Restart
    Can it be opened using the demo license?
    Is the license type the new .bclicense file type?
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Verified answer
    Hein Kruger Profile Picture
    629 on at
    BC 25 Onprem Server Instance Failing to Restart
    I found two issues that resolved my problem to some extent. 

    1. The license I imported was a ".bclicense", but I remembered in Upgrade steps there was a SQL Query that you can run to remove any ".flf" licenses. 
    #UPDATE [master].[dbo].[$ndo$srvproperty] SET [license] = null
    #UPDATE [<DatabaseName>:].[dbo].[$ndo$dbproperty] SET [license] = null
    #UPDATE [<DatabaseName>].[dbo].[$ndo$tenantproperty] SET [license] = null

    2. I noticed something in BC26 as well. 
    When changing the Database Server it was always possible in the older versions of BC to add the Database Instance as part of the DatabaseServer
    Example <MyServer>/<Database Instance> and BC will do the rest. 

    In BC26 you need to add the Database Instance as a seperate Configuration and not include it as part of the Database Server
    So the whole setup to connect your Database will now look like this: 

    Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseServer -KeyValue $DatabaseServer
    Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseInstance -KeyValue $DatabaseInstance
    Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseName -KeyValue $DatabaseName
    Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "DestinationAppsForMigration" -KeyValue '[{"appId":"63ca2fa4-4f03-4f2b-a480-172fef340d3f", "name":"System Application", "publisher": "Microsoft"},{"appId":"f3552374-a1f2-4356-848e-196002525837", "name":"Business Foundation", "publisher": "Microsoft"},{"appId":"437dbf0e-84ff-417a-965d-ed2bb9650972", "name":"Base Application", "publisher": "Microsoft"}]'
    Set-NavServerConfiguration -ServerInstance $NewBcServerInstance-KeyName "EnableTaskScheduler" -KeyValue false
    Set-NavServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "UsePermissionSetsFromExtensions" -KeyValue false

    3. Once I added the New Configuration, restart of the Server Instance did not help. I had to Restart my local machine. 
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,275

#2
Sumit Singh Profile Picture

Sumit Singh 2,677

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,526

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans