Skip to Content

How To: Troubleshoot an Advantage Connection Issue


Connection errors have been reduced over the years by improvements to the Advantage communication layer. However these errors still occur. There is a lot of great information in the Knowledge Base on the most common connection errors such as 6060, 6420 or 6610 . If these suggestions do not resolve the problem then you can use the Environment Check Utility included with Advantage Data Architect (ARC).

The Environment Check Utility will attempt to make a connection and generate a file called ENV_LOG.TXT which will be saved in the current user directory(C:\Users\[Current User]\AppData\Local\VirtualStore\Windows\SysWOW64). This file contains information about the client operating system and the dlls which are in use. This file will be very useful for Advantage Support if you cannot resolve the issues on your own.

The Advantage comm layer goes through a hierarchy to discover the server. As soon as the server is discovered a connection is attempted. Specifying an IP Address and Port number in the connection path (i.e. \\\Data) or in the ads.ini file will cause the comm layer to attempt a connection without discovery.  This connection method is the quickest since there is no polling of the network, however, if the servers IP address changes then all the paths must be updated. The Advantage comm layer hierarchy follows these steps.

  1. Check if ADS is on the same machine. This checks to see if we can make a connection using shared memory rather than the network (note: Advantage 8.1 and newer)
  2. See if the server name is an IP address and port or server name and port. If IP address and port, attempt to connect directly to it. If the address is in this format: \\<name>:<port>\share\xxx then attempt a DNS look up. If address is found then attempt to connect directly to it.
  3. Attempt to read the ads.ini file for an IP and Port number. If the address and port are found then a direct connection to the server will be attempted if the connection fails it will return 6097 error.
  4. Start the Advantage discovery process 
    1. Create a mailslot discovery thread
    2. Create an SAP discovery thread
    3. Create a multicast discovery thread
  5. The first discovery thread to successfully return wins and a connection is attempted using this value.
  6. If all the discovery threads fail then an error code is returned.

If you need more detailed information is required add COMMCALLTRACE=1 to the ADS.INI file under the [Settings] heading. This will generate a file called ADSCOM.TXT in the TEMP directory (c:\Windows\Temp) which is defined by the Temp environment variable. This file is generated by the Advantage communications layer (axcws32.dll) and logs all the steps taken to connect to Advantage. A snippet from the file is below

This file seems a bit cryptic but it can give you some information which may help diagnose your issue. As you can see it is divided into three columns; the first column is the time in milliseconds, the second column is the thread number and the third column is the action being performed. By reading through the file you can:

  • verify that the Server name was specified correctly (see: axConnect81 – pucServerName: …).
  • verify the connection type (see axConnect – Connection Type: …).
  • see the specified server’s IP address if it is found on the network.
  • see all the addresses on a multi-homed server and/or client
  • determine which discovery method located Advantage

If the multicast fails then a Winsock error will be reported. Look for the line containing WSAGetLastError which reports the Winsock error code. You can get a description of the Winsock error codes here or by doing a Google search.

Near the end of the file the actual error message will be reported for example:

WSFindAdvantage81 - GetRemoteAddress FAILED or ucFoundAdsAddr(0 means mailslot or multicast found ADS address) : 6420    Hex: 0x00001914

While this file can seem daunting there is some very valuable information contained in the file. Run some tests on your own since you can learn from both successful and unsuccessful connections. After you have read through several of these files you will be able to locate the important information quickly. If your still stuck send the files to Advantage Support and they can assist you.

No comments