Wednesday, October 19, 2016

AX 2012 R3 - Retail POS - CDX Server/Client/Real-time service certificate has expired.

When dealing with the reail pos system in AX you need to create self-signed certs in order for the cdx server/client and real-time service calls to work. However these self-signed certs expire and when they do you notice the entire system come to grinding halt and will see something like the following in windows event viewer

Unable to communicate with server for upload. Please check username/password, server and database connections. Error Details: System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority '<server name>:8304'. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

In order to resolve the expired certificate we will need to do the following:
  • Generate new FQDN self-signed certs via iis on the machines that you need it (depending on the environment you are working with will determine which certs need to be created)
    • Add new certs to the servers that host cdx server, cdx client, real-time service and pos client via MMC under the Personal and Trusted root certification authorities
    • After the cert is generated you will need to grab the thumb from the cert.
      *Note paste the cert thumbprint into notepad++ and change encoding to ansi and to show special characters so you can remove any special characters within the thumbprint. You will also need to remove the spaces in the thumbprint
  • Update C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Async Server\Package\web.config to include new cert thumbprint
  • Update C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Real-time Services\6.3\web.config to include new cert thumbprint
  • Update C:\inetpub\AsyncServerSite\CDX_AsyncServer\web.config to include new cert thumbprint (if iis instance for cdx server created a new folder and not utilizing the folder above)
    • The setting with the thumbprint should be listed under the tag <serviceCertificate findValue=
  • Run issreset + restart the cdx client service
  • Verify in event viewer that the connection is now made successfully. on the cdx server, client, real-time service 
  • Run a sync in AX via /Retail/Periodic/Data distribution/Distribution schedule or /Retail/Setup/Retail scheduler/Channel integration 
  • Once this has been ran make sure the jobs are processing successfully via /Retail/Inquiries/Commerce Data Exchange/Download sessions if they are processing then the async server connection status (heartbeat) should have been updated as well that is located @ /Retail/Inquiries/Commerce Data Exchange/Async Server connection status

Everything should now be good to go and you can start processing POS transactions once again.