Friday, June 27, 2008

Troubleshooting Advantage Connection Issues

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 6420, 6060 and 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 ARC directory (C:\Program Files\Advantage 9.0\ARC). 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.

Environment Check Utility

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. \\192.168.0.10:6262\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 found attempt to connect directly, If fail return 6097.
  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

  0.696   5844  WIN32     32-bit Windows comm dll version :  9.0.0.1
  7.975   5844  Special Build : BD0817a
 14.947   5844  WSCOMM32  Winsock 32-bit dll
 21.928   5844  Start ____axCommInit____
 31.334   5844  End ____axCommInit____SUCCESS
 38.840   5844  Start ____axConnect81____
 46.295   5844      axConnect81 - pucServerName : Server
 53.817   5844  axConnect81 - Connection Type : 2    Hex: 0x00000002
 61.535   5844      axConnect81 - !usFoundViaWS
 69.458   5844  Start ____AdsIsLocal____  Server Name:  : Server
 78.459   5844  Start ____GetAddressFromSharedMemory____
 86.758   5844  Start ____OpenIPCSharedMem____
 94.944   5844  End ____OpenIPCSharedMem____  SUCCESS
103.113   5844  GetAddressFromSharedMemory - Shared mem name does not match:  : CFRANZXP
111.439   5844  End ____GetAddressFromSharedMemory____  No match found
119.825   5844  End ____AdsIsLocal____  Result:  : 0    Hex: 0x00000000
128.239   5844  Start ____WSFindAdvantage81____
136.753   5844  Start ____GetRemoteAddress____
146.141   5844  Start ____QuickDiscovery____
156.498   5844  Start ____ServerNameHasAddr____  : Server
166.249   5844  End ____ServerNameHasAddr____ Server name does not have a port value
175.911   5844  Start ____GetAddressFromSharedMemory____
185.711   5844  Start ____OpenIPCSharedMem____
195.630   5844  End ____OpenIPCSharedMem____  SUCCESS
205.747   5844  GetAddressFromSharedMemory - Shared mem name does not match:  : CFRANZXP
215.761   5844  End ____GetAddressFromSharedMemory____  No match found
228.758   5844  QuickDiscovery - pstSin->sin_port == 0 
243.513   2468  Start ____MailSlotDiscoveryThread____
254.666   2468  MailSlotDiscoveryThread - CreateMailslot SUCCEEDED : 203    Hex: 0x000000CB
268.448   5332  Start ____MulticastDiscoveryThread____
287.190   4576  Start ____SAPDiscoveryThread____

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.

2 comments:

Phil Higgs said...

I have just upgraded a windows7 64 bit PC with XpMode vmware. ADS Server is running Ads 8.1 ( not on VM ware )
Under the 64 bit OS I can access ADS both a Local & Remote connection.
However on the XpMode server I can only connect with a local connecton. 6420 error. The environment checker fails but doesn't appear to generate an error file. Using Arc for a remote connection adds a 7008 error into the Ads_err table
Are there any other blogs specific to Vmware configuration ?

Ice Dragon said...

Cập nhật những tin tức về sức khỏe và đẹp ở chuyên trang về sức khỏe của chúng tôi.
Bạn có sở thích tìm hiểu về các vấn đề như tâm lý học, sức khỏe gia đình, tình dục, nha khoa,...
Hãy để cuộc sống thường ngày của bạn luôn vui vẻ cùng chuyên mục vitamin 365 nhé.