Server not always avaialable after restart - System.badimage. License issue?

Tomigs
Member Posts: 88
Hi,
We have a customer that has problems with the NAV service not being available on some mornings, but only happens sometimes, say 2/3 times a month. Every night both the NAV and SQL servers are restarted, with some delay between them.
In some days, the users cannot log in and it is fixed by manually restarting the NAV service.
I've been digging on the event viewer and the below (I think) are the distinctive errors.
Any suggestion on it?
Reviewing some other posts I think it could be caused by some component not being ready on the SQL server in the moment of the start, but is strange as the NAV server is started 10 mins later than the SQL and restarted twice after it (SQL starts at 06.30, NAV service at 06.40 and is restarted at 07.00).
Also I can see that it points to the License upload so maybe something wrong on that direction, but haven't found the issue yet.
Dynamics NAV 2017 (build 17501)
Thanks!
Tomas
Error 15/08/2019 06:59:03 MicrosoftDynamicsNavServer$DynamicsNAVProd 216 (13):
Server instance: DynamicsNAVProd
Tenant ID:
<ii>User:
Type: System.BadImageFormatException
Message: <ii>An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)</ii>
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.NavLicense.NativeMethods.UnpackLicense(Byte[] license, Int32 licenseSize, StringBuilder header, Int32 headerSize)
at Microsoft.Dynamics.Nav.Runtime.NavLicense.Create(Byte[] license, LicenseExpiredHandler licenseExpiredHandler)
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseSecurityAndLicense.get_License()
at Microsoft.Dynamics.Nav.Runtime.NavSession.get_License()
at Microsoft.Dynamics.Nav.Runtime.NavSession.SetAndValidateLicense(Byte[] licenseToUse)
at Microsoft.Dynamics.Nav.Runtime.NavSession.Open(Boolean useUserPersonalization, Byte[] licenseToUse, Boolean allowAppsDisabledMode)
at Microsoft.Dynamics.Nav.Runtime.NavSession.Open()
at Microsoft.Dynamics.Nav.Runtime.NavApplicationServer.<RunOnceAsync>d__10.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.Dynamics.Nav.Runtime.NavApplicationServer.<StartAsync>d__7.MoveNext()
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2147024885
</ii>
Note: this one seems very similar to my issue:
https://stackoverflow.com/questions/56459259/microsoft-dynamics-nav-instance-running-after-windows-restart-but-not-responding
We have a customer that has problems with the NAV service not being available on some mornings, but only happens sometimes, say 2/3 times a month. Every night both the NAV and SQL servers are restarted, with some delay between them.
In some days, the users cannot log in and it is fixed by manually restarting the NAV service.
I've been digging on the event viewer and the below (I think) are the distinctive errors.
Any suggestion on it?
Reviewing some other posts I think it could be caused by some component not being ready on the SQL server in the moment of the start, but is strange as the NAV server is started 10 mins later than the SQL and restarted twice after it (SQL starts at 06.30, NAV service at 06.40 and is restarted at 07.00).
Also I can see that it points to the License upload so maybe something wrong on that direction, but haven't found the issue yet.
Dynamics NAV 2017 (build 17501)
Thanks!
Tomas
Error 15/08/2019 06:59:03 MicrosoftDynamicsNavServer$DynamicsNAVProd 216 (13):
Server instance: DynamicsNAVProd
Tenant ID:
<ii>User:
Type: System.BadImageFormatException
Message: <ii>An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)</ii>
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.NavLicense.NativeMethods.UnpackLicense(Byte[] license, Int32 licenseSize, StringBuilder header, Int32 headerSize)
at Microsoft.Dynamics.Nav.Runtime.NavLicense.Create(Byte[] license, LicenseExpiredHandler licenseExpiredHandler)
at Microsoft.Dynamics.Nav.Runtime.NavDatabaseSecurityAndLicense.get_License()
at Microsoft.Dynamics.Nav.Runtime.NavSession.get_License()
at Microsoft.Dynamics.Nav.Runtime.NavSession.SetAndValidateLicense(Byte[] licenseToUse)
at Microsoft.Dynamics.Nav.Runtime.NavSession.Open(Boolean useUserPersonalization, Byte[] licenseToUse, Boolean allowAppsDisabledMode)
at Microsoft.Dynamics.Nav.Runtime.NavSession.Open()
at Microsoft.Dynamics.Nav.Runtime.NavApplicationServer.<RunOnceAsync>d__10.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.Dynamics.Nav.Runtime.NavApplicationServer.<StartAsync>d__7.MoveNext()
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2147024885
</ii>
Note: this one seems very similar to my issue:
https://stackoverflow.com/questions/56459259/microsoft-dynamics-nav-instance-running-after-windows-restart-but-not-responding
0
Answers
-
Depending in many factors 30 mins wouldn't be enough. SQL is "thinked" for continuos working.0
-
Thanks KTA8.
I think we'll recommend to test it increasing the time allowance between servers for the moment.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions