Awservices Failure with Media Sensing Enabled

Document ID : KB000056236
Last Modified Date : 14/02/2018
Show Technical Document Details


Awservices fails when the network cable is disconnected on Win200x or if the network connection goes down, This caused by the media sensing feature on this operating systems.

"Media Sensing" as described by Microsoft will detect a physical link to a Network device from the Network Adapter within a system. Should this link not exist "Media Sensing" will unbind TCP/IP from said adapter. This is discussed in a Microsoft Q Article Q239924 (;en-us;Q239924).


There are several options to resolve this problem depending on the nsm release:

  1. Disable media sensing on the OS

  2. NSM R3.1 with at least fix QO69565 applied , use new functionality to restart awservices when connection is restored

  3. NSM R11.x and above switch communication to named pipe instead of ports

Solution 1 Disable media sensing on the OS

Windows 2000 contains the "Media Sensing" feature. This feature can be used on a Windows 2000-based computer using TransmissionControl Protocol/Internet Protocol (TCP/IP) to detect whether or not your network media is in a "link state". A "link state" is defined as the physical media connecting or inserting itself on the network. Whenever Windows 2000 detects a "down" state on the media, it removes the bound protocols from that adapter until it is detected as "up" again. To enable communication between awservices during "down" state "Media Sensing" should be disabled.

To prevent your network adapter from detecting the link state:

  1. Use Registry Editor (Regedt32.exe) to view the following key in the registry:
    Add the following registry value:
      Value Name: DisableDHCPMediaSense
      Data Type: REG_DWORD -Boolean
      Value Data Range: 0, 1 (False, True) Default: 0 (False)
      Description: This parameter controls DHCP Media Sense behavior.
          If you set this value data to 1, DHCP, and even non-DHCP,
          clients ignore Media Sense events from the interface. By
          default, Media Sense events trigger the DHCP client to take
          an action, such as attempting to obtain a lease (when a
          connect event occurs), or invalidating the interface and
          routes (when a disconnect event occurs).
  2. Restart your computer.

Please, see the following Microsoft Knowledge Base article for more information:

Solution 2 NSM version 3.1 with at least fix QO69565 applied.

With the latest fixes of Atech Common Services, There is a new ca_media_sensing_cb.bat files which take care of this situation. fix: QO69565 (readme: CAI_media_sensing)

See ACS_NSM31_0403_cum05144_Windows_Configuration.htm included with the fix for details regarding enabling this option.

Solution 2 NSM R11.x switch communication to named pipe instead of sockets.

With NSM R11 there is a option in the atservices.ini file to change the transport from sockets to Pipes.

Transport    awm_qiksoc   awm_qikpipe - uses pipes for communications
                          (allows awservices to run disconnected from network) 
                          awm_qiksoc - uses sockets for communications 

The file could be found in : Install_Path\SharedComponents\CCS\AT\Services\Config

If you change the transport setting from sockets to pipes, awservices will not need to (and therefore will not) bind to ports 9990 and 9991. This will impact the servicectrl utility used for remote controls, because it has nothing to talk to.

This was necessary to operate with the Media Sense enabled.

To maintain backward compatibility, the default setting is sockets, which enables remote machine control of awservices through servicectrl (or the Service Control Manager on Windows).

Since this task requires the socket based protocol, disconnection from the network will operate the same way as with NSM 3.0, 3.1 in terms of the Media Sense setting. In other words, if the network goes down awservices continues to run, its agents continue to run, and the DSM does not have to rediscover its monitored resources when the network comes back up.

To disregard Media Sense, we use internal communications (shared memory or named pipes) that lets the services operate without considering this. It disables servicectrl, but awservices is now protected from any malicious attack from a remote machine as well.

Important! Modification of the awservices.txt file while the Agent Technology services are running is not supported. If changes to this file are required, you must stop awservices before any updates to this file are made.