Sunday, May 1, 2011

AX Service start error, SQL diagnostic error.

When a new database is installed for an existing application instance, sometimes new does not have get configured properly and following error is shown, when AOS is started, in the event viewer .

Error ---
SQL diagnostics: [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.. Connect information was: Userid = [], Database = [CN_Dev1], Server = [MDT753], DSN = [], Other = []
Object Server 01: Server main session is being destroyed.
Object Server 01: Fatal SQL condition during login. Error message: "[Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'."
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]

Resolution /Cause --
If it is a new database then check the user in security node, there must be some user that is missing from the list.Usually the users that syatem should add are network service & the machine-name$. If the users are not there, add these users in security node and in schema list.
While adding user in the user list, In new user window -> Securables page add two Stored procedures "CREATESERVERSESSIONS" & "CREATEUSERSESSIONS"  that is responsible for Server session and User Session. These can be found using search option and adding the two. Also provide execute permission on them. If this step is not taken then the AOS will not start.

Windows could not start AX service, AOS crashed, AOCP revision mismatch

All of us would have faced AX service start/crash issue for one or the other reason. A couple of them has been listed below --

Error -- at services.msc
windows could not start the DAX AOS 5.0$01-xyz_ax on local computer.For more information,review the system event log. If this is a non-microsoft service, contact the service vemdor, and refer to service-specific error code 110.
Log at Event viewer --
Concurrent number of AOS' for this application exceeds the licensed number
Resolution/cause -- Get another license for AOS.
-- This issue comes in a scenario where multiple AOS has to connect to a single instance of DB and Application server (clusterred environment).

Error--at services.msc
windows could not start the DAX AOS 5.0$01-xyz_ax on local computer.For more information,review the system event log. If this is a non-microsoft service, contact the service vemdor, and refer to service-specific error code 10.
log at eventvwr --
The home directory for Axapta (file://sqldb/AOSFS/Program Files\Microsoft Dynamics AX\50\Application) does not match the required structure or can not be accessed. Please check installation, configuration and access rights.The directory "file://sqldb/AOSFS/Program Files\Microsoft Dynamics AX\50\Application\bin" does not exist or access to it has been denied by the operating system.

Resolution/cause -- The directory structure should be like --
file://sqldb/Program Files\Microsoft Dynamics AX\50\Application ".
------- The mistake I commited was that there was an additional folder structure layer above "Program Files" .

Error -- Internal aocp revision mismatch
At event viewer --
Faulting application Ax32Serv.exe, version 5.0.1500.3761, time stamp 0x4cd58bba, faulting module Ax32Serv.exe, version 5.0.1500.3761, time stamp 0x4cd58bba, exception code 0xc0000005, fault offset 0x00147b3a, process id 0x%9, application start time 0x%10.
Resolution/cause -- This error is raised due to the mismatch between client the AX server. It happens since the client machine is not patched properly. Ideally the client machine should also get patched with the same pack as AX Server.

Error -- Cannot restart AOS, Logon failure , error code 1069
Resolution/Cause -- Goto --> services.msc --> AXService --> Properties --> Logon tab --> Re-enter the user name and password.
Since the user with which the AX Service is running has property "password never expires" not checked and  the pwd has been reset, system throws this error. System verifies the user with AD at the time of restarting the service and finds user/pwd combinantion incorrect.

Error -- AOS crash
Cause/Resolution -- Due to change in code system was getting stuck in a deadlock and it was first hanged and then getting crashed.
Sol :: check the code, if there is any code ambiguity, any infinite loop, memory leak, reference mismatch while passing parameter by reference. In such cases system does not throw any specific/detail error so it is difficult to find the issue sometimes.

Friday, April 22, 2011

IIS in running 32-bit emulation mode, please fix this error to continue

On x64 machines sometimes there could be situation where IIS is 32 bit enabled. I got error while I tried to
configure sharepoint on a server 2008 x64 machine. The error message is :
'IIS in running 32-bit emulation mode, please fix this error to continue'

Just execute the following command to reset the IIS to its default configuration of x64 --

CScript "%SystemDrive%\InetPub\AdminScripts\adsutil.vbs" set w3svc/AppPools/Enable32bitAppOnWin64 0

Then restart the sharepoint installation !!!