NAV2016 server not available for client connections

EvREvR Member Posts: 178
Hi all,

One of my databases has a problem. The NAV service starts but when clients (or powershell) try to connect we get the following error in the windows event viewer:
Server instance: DynamicsNAV90
Tenant ID:
User:
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.NCLCaptionStrings.GetValueOrDefault()
at Microsoft.Dynamics.Nav.Runtime.NCLMetaTable.get_TableCaptionSafe()
at Microsoft.Dynamics.Nav.Runtime.NCLMetaTable.GetFieldByNo(Int32 fieldNo)
at Microsoft.Dynamics.Nav.Runtime.NCLMetaTable.ResolveFieldTriggerHandlers()
at Microsoft.Dynamics.Nav.Runtime.NCLMetaTable.OnClrTypeLoaded()
at Microsoft.Dynamics.Nav.Runtime.NCLMetaApplicationObject.CompileAndLoadClrObject()
at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.GetMetaApplicationObjectInternal(ApplicationObjectId appObjectId, Boolean requireCompiled, Boolean onlySearchCache, Int32 appGroupId)
at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.TryGetMetaApplicationObject(ApplicationObjectId appObjectId, NCLMetaApplicationObject& metaApplicationObject, Int32 appGroupId, Boolean requireCompiled, Boolean onlySearchCache)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventSubscription..ctor(NCLMetaCodeunit subscriberCodeunit, MethodInfo subscriberMethodInfo, NavAppGroup subscriberNavAppGroup)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventSubscription.<FindDefinedEventSubscriptions>d__22.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventSubscriptionMetadata.CreateNavEventSubscriptionsFromCodeunitIds(IEnumerable`1 codeunitIds, NavAppGroup appGroup)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventSubscriptionMetadata.Initialize(Boolean bindSubscriptions)
at Microsoft.Dynamics.Nav.Runtime.NavEnvironment.OnApplicationMounted(NavTenantCollection tenantCollection)
at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSystemTenant(String appDatabaseServerName, String appDatabaseName, String appDatabaseUserName, ProtectedDatabasePassword appDatabasePassword, Boolean verifyConnection, String newEncryptionKey, IDatabasePasswordPublicEncryptionKeyStorage keyStorage, Boolean allowOverwritePublicKey, Boolean verifyServerInstanceKey)
at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings)
at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings)
at System.Threading.Tasks.Task.Execute()
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2147467261

The service remains in the 'started' state but when clients connect, they get this error:
The Microsoft Dynamics NAV server is currently not ready to serve requests. Try again later or contact your system administrator.

I do have to admit that the database is not in a perfect state. We've had to remove a partner add-on that had many additional fields in many standard NAV tables. These field deletes have not been synced because even powershell commands fail with this same error message.
All standard NAV codeunits compile successfully. I've also tried to connect the database to a new service on a new machine without success. The service does work when connected to a standard demo database.

Any ideas on how to proceed?

Comments

  • soetiesoetie Member Posts: 61
    Are there any errors in the event viewer When starting the service?
  • EvREvR Member Posts: 178
    Yes, that same error.
    The problem is solved though. A couple of tables had compiler errors.
    After solving those, the service responded and I was able to run the sync-tenant command.
Sign In or Register to comment.