Installing Multiple AOS With CU1 Issue there is already a listener on IP endpoint 0.0.0.0:8201

When working in a Dynamics AX development environments it is usually general practice to have many AOS services running on a single machine.  I have observed some strange behaviour when installing CU1 when it has been slipstreamed into the installation files.

In my case I had two AOS services running (CU1) and I wanted to add a third instance to the same server.  When running the installer and selecting the AOS component from the install options, the installer asked if I would like to upgrade an existing instance. I selected “No” here as I want to install a new instance. During the installation I was prompted to stop one of my exiting AOS services but, surprisingly, not both. The installation ran through and installed successfully. Happy days…or so I thought.

On restarting all the AOS services I noticed first the following error in the event log:

Object Server 01:  Internal version mismatch. Microsoft Dynamics AX client from ALV067-AXSRS (6.2.1000.156) tried to attach with 6.2.158.0 revision of kernel

Object Server 02:  Internal version mismatch. Microsoft Dynamics AX client from ALV067-AXSRS (6.2.1000.156) tried to attach with 6.2.158.0 revision of kernel

Interesting, installing the third AOS seems to have removed CU1 from the exiting to instances. Although somewhat painful, it’s not a big issue just to run the CU1 axupdate.exe on it’s own and upgrade the two instances, so that’s what I did and all is looking ok now with all instances running CU1 but…

    1. Start the first AOS – all OK
    2. Start the second AOS –  the AOS starts but logs lots of items in the event log as follows.

Object Server 02:  System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:8201. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. —> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.ServiceModel.Channels.SocketConnectionListener.Listen()
— End of inner exception stack trace —
at System.ServiceModel.Channels.SocketConnectionListener.Listen()
at System.ServiceModel.Channels.ConnectionAcceptor.StartAccepting()
at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.Dynamics.Ax.Services.WCFController.StartWCF()

It appears that, when running CU1 axupdate.exe on multiple AOS instances, a file in the AOS server folder C:\Program Files\Microsoft Dynamics AX\60\Server\{AOS INSTANCE}\bin\Ax32Serv.exe.config is getting updated. This file (contents shown below) was updated with wrong values for the service port. I have highlighted the values that need correcting / checking in pink. You should also check the WSDL port values (also highlighted below in pink).

<?xml version=”1.0″ encoding=”utf-8″?>
<configuration>
<appSettings>
<add key=”ServicePort” value=”8201” />
<add key=”WsdlPort” value=”8101” />
<add key=”ODataQueryPageSize” value=”1000″ />
</appSettings>
<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<probing privatePath=”XppIL;VSAssemblies” />
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.IntegrationFramework.WebService.Process” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.AX.Services.Metadata” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.AX.Xpp.Support” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.Ax.Xpp.AxShared” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.AX.Framework.Workflow.Runtime” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.AX.Framework.Workflow.Model” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.AX.Framework.MetaModel” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.Dynamics.AX.ManagedInterop” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” />
<bindingRedirect oldVersion=”6.0.0.0″ newVersion=”6.2.0.0″ />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name=”ste-net” publicKeyToken=”5542884f620dbde5″ culture=”neutral” />
<bindingRedirect oldVersion=”1.0.1.59-1.0.1.60″ newVersion=”1.0.1.60″ />
</dependentAssembly>
</assemblyBinding>
<gcServer enabled=”true” />
</runtime>
<startup useLegacyV2RuntimeActivationPolicy=”true”>
<supportedRuntime version=”v4.0.30319″ />
<requiredRuntime version=”v4.0.30319″ safemode=”true” />
</startup>
<system.diagnostics>
<trace autoflush=”false” indentsize=”4″>
<listeners>
<add name=”AxTraceListener” type=”System.Diagnostics.EventLogTraceListener” initializeData=”Dynamics AX Services” />
</listeners>
</trace>
<switches>
<add name=”ServiceTraceLevel” value=”Off” />
</switches>
</system.diagnostics>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name=”QueryServiceBinding” sendTimeout=”00:10:00″ transferMode=”StreamedResponse” maxBufferSize=”65536″ maxReceivedMessageSize=”104857600″ listenBacklog=”200″ maxConnections=”200″>
<readerQuotas maxStringContentLength=”104857600″ />
</binding>
<binding name=”InteractionServiceBinding” maxReceivedMessageSize=”524288″ listenBacklog=”200″ maxConnections=”200″ />
<binding name=”MetadataServiceBinding” sendTimeout=”00:05:00″ receiveTimeout=”00:10:00″ maxBufferSize=”1048576″ maxBufferPoolSize=”3145728″ maxReceivedMessageSize=”1048576″ listenBacklog=”200″ maxConnections=”200″>
<readerQuotas maxDepth=”128″ maxStringContentLength=”1048576″ maxArrayLength=”524288″ maxBytesPerRead=”1048576″ maxNameTableCharCount=”1048576″ />
</binding>
<binding name=”NetTcpBinding_SysWorkflowConfigurationService” closeTimeout=”00:05:00″ openTimeout=”00:05:00″ receiveTimeout=”00:10:00″ sendTimeout=”00:05:00″ transactionFlow=”false” transferMode=”Buffered” transactionProtocol=”OleTransactions” hostNameComparisonMode=”StrongWildcard” listenBacklog=”10″ maxBufferPoolSize=”524288″ maxBufferSize=”2147483647″ maxConnections=”10″ maxReceivedMessageSize=”2147483647″>
<readerQuotas maxDepth=”64″ maxStringContentLength=”2147483647″ maxArrayLength=”2147483647″ maxBytesPerRead=”4096″ maxNameTableCharCount=”2147483647″ />
<reliableSession ordered=”true” inactivityTimeout=”00:10:00″ enabled=”false” />
<security mode=”Transport”>
<transport clientCredentialType=”Windows” protectionLevel=”EncryptAndSign” />
<message clientCredentialType=”Windows” />
</security>
</binding>
<binding name=”DocumentManagementServiceBinding” maxBufferSize=”65536″ maxReceivedMessageSize=”104857600″ transferMode=”StreamedResponse” listenBacklog=”200″ maxConnections=”200″ />
</netTcpBinding>
<webHttpBinding>
<binding name=”ODataQueryServiceBinding” maxBufferSize=”65536″ sendTimeout=”00:10:00″ maxReceivedMessageSize=”104857600″ transferMode=”StreamedResponse”>
<security mode=”TransportCredentialOnly”>
<transport clientCredentialType=”Windows” proxyCredentialType=”Windows” />
</security>
</binding>
</webHttpBinding>
<customNamedPipeBinding>
<binding name=”ConversionServiceBinding” />
</customNamedPipeBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name=”MetadataEndpointBehaviour”>
<dataContractSerializer maxItemsInObjectGraph=”524288″ />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name=”MetadataServiceBehavior”>
<serviceMetadata httpGetEnabled=”true” httpGetUrl=”http://localhost:8101/DynamicsAx/Services/MetadataService” />
<serviceDebug includeExceptionDetailInFaults=”False” />
<serviceThrottling maxConcurrentCalls=”200″ maxConcurrentSessions=”200″ maxConcurrentInstances=”200″ />
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme=”net.tcp” port=”8201” />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
<behavior name=”QueryServiceBehavior”>
<serviceMetadata httpGetEnabled=”true” httpGetUrl=”http://localhost:8101/DynamicsAx/Services/QueryService” />
<serviceDebug includeExceptionDetailInFaults=”False” />
<serviceThrottling maxConcurrentCalls=”200″ maxConcurrentSessions=”200″ maxConcurrentInstances=”200″ />
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme=”net.tcp” port=”8201” />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
<behavior name=”InteractionServiceBehavior”>
<serviceMetadata httpGetEnabled=”true” httpGetUrl=”http://localhost:8101/DynamicsAx/Services/InteractionService” />
<serviceDebug includeExceptionDetailInFaults=”False” />
<serviceThrottling maxConcurrentCalls=”200″ maxConcurrentSessions=”200″ maxConcurrentInstances=”200″ />
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme=”net.tcp” port=”8201” />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
<behavior name=”DocumentManagementServiceBehavior”>
<serviceMetadata httpGetEnabled=”true” httpGetUrl=”http://localhost:8101/DynamicsAx/Services/DocumentManagementService” />
<serviceDebug includeExceptionDetailInFaults=”False” />
<serviceThrottling maxConcurrentCalls=”200″ maxConcurrentSessions=”200″ maxConcurrentInstances=”200″ />
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme=”net.tcp” port=”8201” />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
<behavior name=”ODataQueryServiceBehavior”>
<serviceMetadata httpGetEnabled=”true” httpGetUrl=”http://localhost:8101/DynamicsAx/Services/ODataQueryService/mex” />
<serviceDebug includeExceptionDetailInFaults=”False” />
<serviceThrottling maxConcurrentCalls=”200″ maxConcurrentSessions=”200″ maxConcurrentInstances=”200″ />
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add scheme=”http” port=”8101” />
</defaultPorts>
</useRequestHeadersForMetadataAddress>
</behavior>
<behavior name=”ConversionServiceBehavior”>
<serviceDebug includeExceptionDetailInFaults=”true” />
<serviceThrottling maxConcurrentCalls=”200″ maxConcurrentSessions=”200″ maxConcurrentInstances=”200″ />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration=”MetadataServiceBehavior” name=”Microsoft.Dynamics.AX.Framework.Services.Metadata.Service.AxMetadataService”>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/MetadataService” behaviorConfiguration=”MetadataEndpointBehaviour” binding=”netTcpBinding” bindingConfiguration=”MetadataServiceBinding” name=”MetadataServiceEndpoint” contract=”Microsoft.Dynamics.AX.Framework.Services.Metadata.Service.IAxMetadataService” />
</service>
<service behaviorConfiguration=”QueryServiceBehavior” name=”Microsoft.Dynamics.AX.Framework.Services.QueryService.QueryService”>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/QueryService” binding=”netTcpBinding” bindingConfiguration=”QueryServiceBinding” name=”QueryServiceEndpoint” contract=”Microsoft.Dynamics.AX.Framework.Services.QueryService.IQueryService” />
</service>
<service behaviorConfiguration=”InteractionServiceBehavior” name=”Microsoft.Dynamics.AX.Framework.Services.InteractionService.InteractionService”>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/InteractionService” binding=”netTcpBinding” bindingConfiguration=”InteractionServiceBinding” name=”InteractionServiceEndpoint” contract=”Microsoft.Dynamics.AX.Framework.Services.InteractionService.IInteractionService” />
</service>
<service behaviorConfiguration=”DocumentManagementServiceBehavior” name=”Microsoft.Dynamics.AX.Framework.Services.DocumentManagementService”>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/DocumentManagementService” binding=”netTcpBinding” bindingConfiguration=”DocumentManagementServiceBinding” name=”DocumentManagementServiceEndpoint” contract=”Microsoft.Dynamics.AX.Framework.Services.IDocumentManagementService” />
</service>
<service behaviorConfiguration=”ODataQueryServiceBehavior” name=”Microsoft.Dynamics.AX.Framework.Services.ODataQueryService.ODataQueryService”>
<endpoint address=”http://localhost:8101/DynamicsAx/Services/ODataQueryService” binding=”webHttpBinding” bindingConfiguration=”ODataQueryServiceBinding” contract=”System.Data.Services.IRequestHandler” name=”ODataQueryServiceEndpoint” />
</service>
<service behaviorConfiguration=”ConversionServiceBehavior” name=”Microsoft.Dynamics.AX.Framework.Services.ConversionService”>
<endpoint address=”net.pipe://localhost/8201/DynamicsAX/Services/ConversionService” binding=”customNamedPipeBinding” bindingConfiguration=”ConversionServiceBinding” contract=”Microsoft.Dynamics.AX.Framework.Services.IConversionService” name=”ConversionServiceEndpoint” />
</service>
</services>
<client>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/AxClient” binding=”netTcpBinding” bindingConfiguration=”NetTcpBinding_SysWorkflowConfigurationService” contract=”Microsoft.Dynamics.AX.Framework.Services.Client.AxClient.SysWorkflowConfigurationService” name=”NetTcpBinding_SysWorkflowConfigurationService”>
</endpoint>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/MetadataService” binding=”netTcpBinding” bindingConfiguration=”MetadataServiceBinding” contract=”Microsoft.Dynamics.AX.Framework.Services.Metadata.Service.IAxMetadataService” name=”MetadataServiceEndpoint”>
</endpoint>
<endpoint address=”net.tcp://localhost:8201/DynamicsAx/Services/QueryService” binding=”netTcpBinding” bindingConfiguration=”QueryServiceBinding” contract=”Microsoft.Dynamics.AX.Framework.Services.QueryService.IQueryService” name=”QueryServiceEndpoint”>
</endpoint>
</client>
<extensions>
<bindingExtensions>
<add name=”customNamedPipeBinding” type=”Microsoft.Dynamics.AX.Framework.Services.CustomNamedPipeBindingCollectionElement, Microsoft.Dynamics.AX.Services.QueryService” />
</bindingExtensions>
</extensions>
</system.serviceModel>
<system.net>
<connectionManagement>
<add address=”*” maxconnection=”100″ />
</connectionManagement>
</system.net>
</configuration>