TCP Networking FAQ


ACI - Documentation Français English German ACI Technical Notes ACI Technical Notes, By Subject Back Previous Next Find

TCP Networking FAQ

By Thomas D'Urso

Technical Note 00-35

Technical Notes for Technical Notes for 00-07 July 2000

Introduction


This technical note covers a series of issues regarding the TCP protocol, and networking with the TCP protocol. If you are using 4D Server or 4D Web Server, it would be worth your time to skim this document, since it covers many issues that 4D Technical Support is often asked. If you are troubleshooting an existing TCP networking problem, you may want to go directly to Section 5 for a list of problems and possible solutions. This technical note does not deal with issues specifically related to the 4D Internet Commands plug-in. Unless stated otherwise, this technical note assumes that you are using 4D version 6 or 6.5 applications.

Outline


Basic Configuration Issues

1.1 A brief introduction to TCP/IP terms

1.2 Simple TCP/IP network configuration settings

1.3 Minimum network requirements

1.4 Connecting 4D Client to 4D Server over the Internet

1.5 Manually entering a 4D Server address in 4D Client

Network Components

2.1 What are network components?

2.2 Network components on Macintosh

2.3 Network components on Windows

2.4 Compatibility issues related to network components

2.5 Network components and port numbers

Port Numbers

3.1 What is a port number?

3.2 What port numbers are used by 4D applications?

3.3 Running multiple 4D Servers on the same computer

3.4 Port numbers and 4D Open connections, before version 6.5

3.5 Port numbers and 4D Open connections, in version 6.5

3.6 Web server port number setting

Networking and TCP/IP Diagnostic Tools

4.1 Ping and Trace Route

4.2 TCP utilities for Macintosh

4.3 TCP and networking utilities for Windows

Troubleshooting TCP Networking Problems

5.1 When a 4D application displays the error message, "You need at least one network component to run…" during startup

5.2 When a client application cannot see the server

5.3 When 4D Client displays the error message, "The version number of 4D Server is incompatible with the version number of 4D Client."

5.4 When a client application is unable to connect, or loses its connection to the server. (TCP-specific. Errors -10001, -10002, -10030, -10031, or -10032)

5.5 TCP/IP network troubleshooting

5.6 Crashing problems versus networking problems

Basic Configuration Issues


1.1 A brief introduction to TCP/IP terms

Here are a few terms related to TCP/IP that you will find useful when installing and troubleshooting 4D applications over a network:

TCP/IP (Transmission Control Protocol/Internet Protocol) is a combination of networking protocols that facilitate the transfer of data over a network.

An IP address ("IP" as in Internet Protocol) is the address for a computer or device on a TCP/IP network. Each computer, or device such as a router, on a network, should have a unique address. IP addresses are comprised of four numbers, with a dot (".") between each number. The value of each number can range from 0 to 255. An example of an IP address would be "100.100.100.5". An IP address is comprised of two parts. The first part is a subnet, followed by the address of the device.

A subnet is a group of computers and devices on a network that share part of a network (IP) address. These computers can see and transfer data between themselves. Computers that are on the same network but have a different subnets cannot directly access each other. The subnet portion of an IP address consists of a sequence of the high-order bits starting at the left of the IP address.

A subnet mask is used in combination with the subnet of an IP address to determine what the subnet of a computer is. (Sorry if this seems like a simplistic answer. The full explanation is beyond the scope of this technical note.) A subnet mask is written in the same form as an IP address: it is comprised of four numbers, with a dot (".") between the numbers.

A port number is a number that identifies a program running on a computer. Specific port numbers are usually associated with certain programs. For example, web servers use port number 80.

A packet is a piece of data being sent over the network. The packet not only contains data, but also includes the IP address of the destination computer and the port number of the destination application.

A default gateway is a device, such as a router, that acts as a connection point between two networks.

1.2 Simple TCP/IP network configuration settings

When working with programs that use the TCP/IP protocol, the computers these programs are running on need to be configured to support the TCP/IP protocol. If the computers are on a network that is administered by the information services department, or is connected to an Internet service provider, you can consult the network administrator the Internet service provider regarding what TCP/IP configuration (IP addresses and subnet masks, router address, etc.) to use.

If your computers are on a small network and are not connected to another network such as the Internet, here is a simple strategy for configuring the computers on the network. To support the TCP/IP protocol, the minimum requirement for an operating system is to assign IP addresses and subnet masks to the computers on the network. For a small network, this is easiest done by manually entering the configuration settings.

IP addresses and subnet masks are comprised of four numbers, with a dot (".") separating each number. Each number can range in value from 0 to 255. An example IP address would be "100.100.100.5". The default range of IP addresses for private Class C networks is 192.168.x.0 through 192.168.x.255. "X" needs to be any value from 0-255, but the exact same number must be used there throughout your network. By default, most computers will not use IP addresses that end with 0 or 255, because those IP addresses are usually reserved for the network itself.

The default subnet mask of 255.255.255.0 is commonly used for a Class C network when the subnet is not already defined. What this subnet mask does is act as a mask that will break the IP address into two parts. In this case the result is that the first three numbers, reading from left to right, in the IP address will define what network the computers are on. The remaining, right-most number of the IP address differentiates the computer from the other computers on the network.

If the above subnet mask is the same for all the computers on the network, defining the IP addresses for all the computers will be easy. The first three numbers in the address should be the same, and the last number should be unique for each computer. For example:

Computer A's Subnet Mask: 255.255.255.0

Computer A's IP Address: 192.168.68.2

Computer B's Subnet Mask: 255.255.255.0

Computer B's IP Address: 192.168.68.3

Computer C's Subnet Mask: 255.255.255.0

Computer C's IP Address: 192.168.68.4

Note: The information and steps provided here are simplified, just to enable you to get the computers on a simple network configured to support TCP/IP.

1.3 Minimum network requirements

For the Macintosh and Windows operating systems to support a network protocol, the operating system must think the computer is on a network. If you have a computer that is not on a network, the easiest way to make a computer behave as if it is on a network is to have an Ethernet card installed in the computer and have a cable connect the card to a network device such as a hub. Then the computer will technically be on a network, and the operating system can support a network protocol.

The IP address 127.0.0.1 (also sometimes 127.0.0.0 or 127.0.0.8) is commonly referred to as the "loopback address." The purpose of a loopback address is to refer to the computer that the program is running on. So if you enter 127.0.0.1 in a web browser, it will look for the web server running on that computer. The problem with a loopback address is that it does not always work, especially on Macintosh operating systems before Mac OS X.

1.4 Connecting 4D Client to 4D Server over the Internet

Note: 4D, Inc. does not officially support the use of 4D Client to connect to 4D Server across the Internet. There are some people who have tried this and found that it works great for them. But there are other people for whom, depending on how many hops and jumps there are between their client and server computers across the Internet, there will be too much latency in the network for the 4D Client/Server connection to work reliably, or to even work at all. Whether or not it will work for you depends on various factors such as how close your client and server computer are to the main trunk lines of the Internet. Therefore, 4D, Inc. cannot guarantee that it will work for you. Even if you do get it to work, there's no guarantee that something in your local Internet infrastructure will change in the future, that could cause it to stop working. It would be a risky strategy to deploy a business database that could stop working at any time due to factors that neither you nor 4D, Inc. have any control over. This is why we do not support this configuration. If you wish to pursue this, it is entirely at your own risk. We do not provide technical support for this configuration.

It is possible to connect to a 4D Server over the Internet with 4D Client. The server computer and the client computer will both need to have access to the Internet. The server computer should be on a computer with a static IP address (a fixed address that does not change). Then start 4D Client and manually enter the IP address of the 4D Server, as described in the next Section 1.5.

Some possible issues regarding accessing 4D Server via 4D Client over the Internet are:

— Your connection between the two sites is probably going to be slow.

— Unless you encrypt the data while it is traveling over the network, you are not ensured privacy.

— If for any reason the connection between the client and server gets broken, 4D Client will display an error alert, and changes to unsaved data will be lost.

It would be a good idea to listen to the experiences of some of the people who are connecting 4D Client to 4D Server over the Internet, to get an idea of how well connecting over the Internet works, before trying it yourself.

1.5 Manually entering a 4D Server address in 4D Client

1. Start the 4D Client application.

2. In the first dialog that appears, choose the TCP/IP network component. If it isn't already chosen, you can choose it by clicking the "Other…" button.

3. Expand the window to display the list of manually entered servers. On Windows, click the "More Choices…" button. On Macintosh, click the flag icon in the upper-right corner of the window.

4. In the entry area at the lower-right corner of the window, enter the IP address of the server.

5. In the entry area above that, enter a name for the database. (Note: This name is just for the convenience of the user. It does not need to match the actual name of the database or server.)

6. Click the New button. The name you entered will then appear in the scrolling list on the right side of the window.

7. To connect to the server, highlight the server name in the list on the right, then click the OK button at the bottom of the dialog.

The screen shot below shows the 4D Client Network Component connection dialog with the cursor pointing to a manually entered server:

Network Components


2.1 What are network components?

The communication between 4D Client and 4D Server is made possible by the use of a common network interface that allows clients and the server to transfer data over the network. The network interface is implemented in programs called network components (commonly referred to as "NC"). More detailed information on network components can be found in the "Network Components Reference Manual" <http://www.4D.com/acidoc/NCC/NCCMDUS.HTM>

2.2 Network components on Macintosh

On Macintosh, the network components are embedded inside 4D applications. The benefit of this is that each application by default has its own set of network components. So it is possible for two applications on the same computer to use two different versions of the network components. The various 4th Dimension, 4D Server, 4D Client, and 4D Insider applications come with all the network components already installed in them. Anytime you download one of these applications from www.4D.com or use a 4D installer, there is no need to perform any additional steps to install the network components. For more information on installing network components for Macintosh, refer to: "Removing and Re-installing NCs on Macintosh" <http://www.4D.com/acidoc/cmu/cmu52982.htm>

2.3 Network components on Windows

On Windows, the network components are installed in the ACI folder in the Windows operating system folder, in the form of DLLs. DLL stands for "Dynamic Link Library," a Windows convention where any application can access the functions of a DLL. The benefit of DLLs is that you only need to have one copy of the network components installed on the computer, which are then used by any 4D application on that computer. The disadvantage of storing network components as DLLs is that there can only be one version of the network components used by a Windows operating system at any one time. The network components are only installed when you use an installer. Downloading and extracting a 4D application does not install the network components. For more information on installing network components for Windows, refer to: "Removing and Re-installing NCs on Windows" <http://www.4D.com/acidoc/CMU/CMU52983.HTM>

2.4 Compatibility issues related to network components

Each new release of 4D has been accompanied by new versions of network components. Currently, the latest versions of network components are 1.5.3f1 for 4D Server 1.5.4, 6.0.5f10 for 4D Server 6.0.6, and 6.5f20 for 4D Server 6.5.x.

Each version of network components works with specific releases of 4D. The 1.5 versions of the network components will only work with version 1.5.x 4D applications. The 6.0 versions of the network components will work with version 1.5.x and 6.0.x applications. The 6.5 versions of network components work with 6.0.x and 6.5.x versions of 4D applications. It is not possible for 1.5.x and 6.5.x versions of 4D applications to use the same version of network components.

The above issues have a side effect on Windows computers. If you want to run a version 6.0.x 4D Server with version 6.0.x network components, and on the same computer also run a 6.5.x version of 4D Server with version 6.5 network components, that is not possible. In this situation, you only have one network components choice: to use the version 6.5 network components for both the 6.0.x and 6.5.x versions of 4D Server.

Macintosh computers do not have the same limitation as Windows computers because the network components are located inside the application, so each application can have a different version of network components. For example, a 1.5.x version of 4D Server can run on the same Macintosh as a 6.5.x version of 4D Server.

2.5 Network components and port numbers

By default, the 1.5 and 6.0 versions of network components use port number 14566, and the 6.5 versions of network components use port number 19813. When an application tries to connect to another application, it must use the correct port number, or the program will not be able to see or connect to the other application. The effect of using a different port number with the version 6.5 network components is that (assuming that you are using the default port numbers) a 1.5.x and a 6.0.x client will not see a 6.5.x server, and a 6.5.x client will not see a 1.5.x or 6.0.x server.

Note: You may ask, "Why would two different versions of 4D use different port numbers?" The difference between the version 6.5 network components and the previous versions is that the amount of data sent in a packet has been increased in version 6.5. If more data can be sent in fewer packets, the data can be sent in less time. The conflict with this is that the older versions of 4D network components cannot work with these larger amounts of data. By using a different port number, the old network component will not see or interact with the new network component.

Port Numbers


3.1 What is a port number?

A computer can run many different applications, each potentially capable of transferring and receiving data over the network. Each of these applications must have a way of identifying itself to the network. This identifier is called a port number. Packets of data need to know not only what computer to go to, but also what their destination application is. Thus, the packet not only includes the IP address, but also the port number of the destination application. There is a pre-defined port number for many types of applications. For example, if a packet is being sent to a web server, the packet will contain the IP address of the web server computer, as well as the port number 80, which is the default port number for a web server. If a program tries to connect to another program and it uses the wrong port number, the program will not be able to see or access the other program.

Port numbers can range from 0 to 65,535. A list of the defined port numbers for commonly used applications is located in Appendix B of the "4D Internet Commands Reference Manual" <http://www.4D.com/acidoc/cmu/cmu88907.htm>

The Internet Assigned Numbers Authority, the governing body for port numbers, keeps a list of all registered port numbers, which is available online at: <http://www.ian6.org/>

Before implementing a new port number, it is a good idea to check to see if the port number might already be assigned to an application, to avoid port number conflicts. For example, port numbers 0 through 1024 are reserved, and should not be used for other purposes.

3.2 What port numbers are used by 4D applications?

The default TCP port number for 4D version 6.5 is 19813. The default TCP port number for all previous versions of 4D was 14566. The default port number is the "factory setting" that the products ship with. Actually, any port number could be used. The port number can be modified by the user, though this is seldom done.

It is easy to determine the port number that 4th Dimension is using on a computer. The port number is stored in a file named "tcp.opt" (short for "TCP Options"). The tcp.opt file is created the first time a network component is used on the computer. Typically, this happens when 4D Server or 4D Client is started. The tcp.opt file is usually located in the system ACI folder. On a Macintosh, this folder is the System Folder:Preferences:ACI folder. On Windows, this folder's path is typically something like: C:\Windows\ACI. (There is an exception to storing the tcp.opt file in the system ACI folder. See the next section, "Running multiple 4D Servers on the same computer," for details.)

If the tcp.opt file is opened up in Customizer Plus, we can see and set the port number used on the computer. The screen shot below shows 4D's TCP port number displayed in Customizer Plus:

To change the TCP port number, all you have to do is change the port number value in Customizer Plus, save the changes, and restart the 4D application.

3.3 Running multiple 4D Servers on the same computer

If you want to run multiple copies of 4D Server on one computer, and have clients access the servers via the TCP protocol, each copy of 4D Server must have a unique port number. If there is more than one instance of 4D Server running on the same computer, and each server application is using the same port number, you will only be able to see and access the server instance that was started first.

To assign and use different TCP port numbers for multiple copies of 4D Server, you need to have a separate copy of the tcp.opt file for each server. There needs to be a separate copy of the tcp.opt file in the folder of each instance of 4D Server. And there MUST NOT BE a copy of the tcp.opt file located in the system ACI folder. The reason for this is the sequence of events that occurs when 4D Server starts:

1. It first checks the system ACI folder for the tcp.opt file.

2. If 4D Server does not find the tcp.opt file in the ACI folder, it will look in the same folder where the 4D Server application resides in.

3. If 4D Server does not find the tcp.opt file in the folder where the 4D Server application resides, it will create a new tcp.opt file in the system ACI folder.

To configure multiple 4D Servers with unique port numbers for TCP/IP:

1. Launch one instance of 4D Server with the TCP/IP protocol and network component installed. This will cause 4D Server to create the tcp.opt file, if it did not already exist.

2. Quit 4D Server and make a copy of 4D Server by duplicating the folder containing the 4D Server application.

3. Go to the system ACI folder and copy the tcp.opt file.

4. Paste a copy of the tcp.opt file into the folder of each instance of 4D Server.

5. Use Customizer Plus to assign a unique port number to the tcp.opt files in each of the server folders. Do this by opening the tcp.opt file with Customizer Plus, changing the port number, and saving the changes. Each port number MUST be unique. A suggested strategy is to use the default port number for one server, and increment that value by 1 for each additional server. For example: 19813, 19814, 19815, etc.

6. Remove the tcp.opt file from the operating system's ACI folder.

7. Launch each instance of 4D Server.

8. Open the 4D Client application.

9. Choose the TCP/IP network component. You can do this by clicking the "Other" button.

10. Expand the window to display the list of manually entered servers. On Windows, this is done by clicking the "More Choices…" button. On Macintosh, click the flag in the upper-right corner of the window.

11. In the list of servers on the left side of the window, click the name of the visible instance of your multiple 4D Servers.

12. In the entry area at the lower-right side of the window, add the port number for one of the invisible instances of 4D Server to the IP address shown.

13. In the entry area above that, change the name of the server to a name representing the particular invisible server. (Note: This name is just for the convenience of the user. It does not need to match the actual name of the database or server.)

14. Click the New button. This adds a listing for the invisible server to the list of manual server connections on the right side of the window.

15. To connect to that server, highlight the server name in the list on the right, then click the OK button at the bottom of the dialog.

The screen shot below shows the 4D Client connection dialog with a manually entered server entry:

3.4 Port numbers and 4D Open connections, before version 6.5

If you are using 4D Open and TCP with version 6.5 network components, the port number will need to be included in the address. This is easy to do: just add a comma and the port number to the end of the server's IP address. For example, in the address, "192.9.200.13,19813:Customer_DB", 19813 is the port number.

Here is some example code for establishing a 4D Open connection:

   C_STRING (80; sServer; Database; $Address)
   C_LONGINT ($TCP; $ErrCode; iServerID; iConnID)
   
   $Address := "192.168.68.34,14566"  ` default port for the 6.0.x network components
   $Address := "192.168.68.34,19813"  ` default port for the 6.5 network components
   
   $Database := "Connect4D2.4DB" + Char (9) + "SQL_STATION2"
   $TCP := GetCompID ("TCP")  ` get the ID number of the TCP/IP Network Component
   sServer := $Address + ":" + $Database
   $ErrCode := OP Load network component ($TCP)
   $ErrCode := OP Find 4D Server ($TCP; sServer; iServerID)
   If ($ErrCode = 0)
      $ErrCode := OP Open connection 
      (iServerID; iConnID; "TestStation"; "Administrator"; "admin"; "TaskName")
      If ($ErrCode = 0)
         $ErrCode := OP Close connection (iConnID)
      End if 
   End if 
   $ErrCode := OP Delete 4D Server (iServerID)
   $ErrCode := OP Unload network component ($TCP)

The "GetCompID" method listed below allows you to retrieve the reference number of a network component whose name you pass as the parameter:

   `… Function: GetCompID
   `… GetCompID (Component name) -> Component ID
   C_STRING (255; $1; $Component)
   C_LONGINT ($ErrCode; $Count; $CompID; $0; $i)
   $ErrCode := OP Count network components ($Count)
   For ($i; 1; $Count)
      $ErrCode := OP Get network component info ($i; $CompID; $Component)
      If ($ErrCode = 0) & (Position ($1; $Component) > 0)
         $0 := $CompID
         $i := $Count + 1
      End if
   End for

For more information on configuring 4D Open, consult the description of the OP Find 4D Server command in the 4D Open for 4D documentation <http://www.4D.com/ACIDOC/CMU/CMU10134.HTM>

3.5 Port numbers and 4D Open connections, in version 6.5

If you are using version 6.5 network components, the port number does not need to be part of the address. In fact, the value for the serverName parameter of the command OP Find 4D Server is different than it would be when using earlier versions of the network components. Fortunately, there is an easy way to find out what the value should be. When executing the following code,

   $NC := GetCompID ("TCP")
   $ErrCode := OP Load network component ($NC)
   TRACE
   $ErrCode := OP Select 4D Server ($NC; serverName; ServerID)

4D Open will display a dialog asking you to select a database. After you select the database and close the dialog, the serverName parameter will have the correct value to use with OP Find 4D Server. Copy the value of the serverName variable from the debugger. Now go back to the method containing the 4D Open connection code. Paste the value of serverName into the location of the serverName variable, and change the name of the command from OP Select 4D Server to OP Find 4D Server. The following code sample shows the finished result:

   $NC := GetCompID ("TCP")
   $ErrCode := OP Load network component ($NC)
   $ErrCode := OP Find 4D Server ($NC; "Accounts.db AccountServer"; ServerID)

3.6 Web Server port number setting

4D version 6 and higher allows you to define the port that 4D Web Server uses. The default port number for any web server is port 80. If you were developing a web site and did not want other people to access the site while you were developing it, it might make sense to use a different port number, such as 100. The web server port number is set in the TCP Port option in the "Web Server" options page of the Database Properties dialog. To access a web server using a port number other than the default port number, add a colon and the port number to the end of the address. In the screen shots below, the screen on the left shows an IP address entered in the web browser to access a web server. Because the port number is not specified, the default port number (80) will be used. In the screen on the right, an alternate port number (100) has been explicitly specified.

3.7 Port Authority

If while you are at the docks, you have any questions about what port you should use, consult the local Port Authority.

Networking and TCP/IP Diagnostic Tools


4.1 Ping and Trace Route

Here are some utilities that are helpful in determining where problems exist in a network.

Ping

The most commonly used of these diagnostic utilities is "Ping." You can think of Ping as being similar to sonar. If everything goes correctly, a packet gets sent to another device on the network and is bounced back to the original device.

The three tests you can do with Ping are:

— Pinging the computer that is performing the test. This helps establish that the TCP protocol is working on that computer.

— Pinging the server computer from the client computer. If this test fails, the client application will not be able to connect to the server.

— Pinging the client computer from the server computer. This test might detect problems that pinging from the client to the server might not find.

When pinging, the ping should be executed several times. With each test, you are interested in seeing if the ping was successful at reaching its destination and returning back to the sender, and you want to measure the time it took to perform the test. If a very small percentage of the tests are unsuccessful and the rest of the tests are successful, this is generally considered okay. As the number of tests that fail increases, it becomes more indicative that there is a problem with the network.

The time it takes to complete the test is relative to the particular type of test. If the test is just on the computer, the time should be below 10 ms (milliseconds). If the test is on a local network, the response is usually below 10 ms, but might be a bit higher. On WANs and the Internet, the response can vary greatly. You might need to perform a number of different tests to get a picture of what response times should be expected.

Trace Route

A trace route test is a more elaborate version of a ping. It tests not only response times and whether the test was successful, but also includes each hop between the start and end points, and the time it took to reach each hop. This can prove useful in determining where the trouble points might be on the network.

4.2 TCP utilities for Macintosh

On Macintosh, it is easy to find the TCP/IP address of a computer. The TCP control panel displays the IP address, the subnet mask, the router address, etc. If the computer is getting its TCP settings from a DHCP server, the settings will not be available until after the computer has requested them. This will happen the first time that a program using the TCP protocol, such as a web browser, is used. Performing other diagnostic operations, such as pinging, requires the use of a utility. Here are two popular utilities for Macintosh:

WhatRoute 1.6b7 — freeware

<http://crash.ihug.co.nz/~bryanc>

Capabilities: Trace route, Ping, DNS, Finger client, WhoIs client

Anarchie 3.7 (and Mac TCP Watcher 2.0) — $35 shareware

<http://www.stairways.com/info/products.html>

Capabilities: Ping, DNS, Trace route, and more

4.3 TCP and networking utilities for Windows

The various versions of the Windows operating system include a number of built-in tools that can assist you in troubleshooting network/TCP connections from a Windows computer. These commands are found in the DOS terminal window, which can be opened by selecting "Command Prompt" from the Start menu's Programs menu. The commands include: ARP, HOSTNAME, IPCONFIG, NBSTAT, NETSTAT, PING, ROUTE, and TRACERT.

To get the IP address, subnet mask and default gateway of a computer, enter the "IPCONFIG" command.

To use ping, type "PING" followed by a space and the IP address, or the URL:

ping 10.97.10.111

ping www.4D.com

The "TRACERT" command is the trace route function. It is used just like ping. Just type "TRACERT" and the address, or the URL, at the DOS prompt:

tracert 10.97.10.111

tracert www.4D.com

To learn details such as what ports are being used on this computer, use the "NETSTAT" command.

For more information about these commands, there are two good sources. In DOS, it is sometimes possible to find the parameters for commands by either typing the command with no parameters, or by typing the command with a "?" parameter. Microsoft's web site is an excellent source of information about these commands, and for troubleshooting information. To search for technical support or troubleshooting information online, use: <http://support.microsoft.com/support/search/c.asp?> or select the category "Support & the Knowledge Base" in Microsoft's general web site search.

Helpful Hints: Some of these commands return more information than can be displayed in one screen. DOS provides a "MORE" command that displays only one screen at a time, allowing the user to view its contents before displaying more information. To use this capability, type " | more" at the end of a command line, for example:

C:\>netstat -se | more

It is also possible to save the output to a text file by using the ">" character. For example, to create a file called "results.txt", use the command "C:\>netstat -se > results.txt". To view a text file, use the "EDIT" command. For example, type "C:\>edit results.txt".

Note: The MORE command and ">" do not work with all commands. Also, Windows NT has all of these commands, but Windows 95 and 98 only have some of these commands.

If the version of the Windows operating system you are using does not have the desired utility, there are many TCP utilities available for Windows. For example:

Cyberkit 2.5 — Postcardware

<http://www.cyberkit.net/>

Capabilities: Ping, Trace route, Finger, WhoIs, and more

To find utilities like these for any platform, two web sites worth checking out are www.shareware.com and www.download.com. A search for keywords like "ping," "TCP," and "traceroute" will bring up lots of possibilities.

Troubleshooting TCP Networking Problems


This section describes a number of steps you can take to help analyze and solve networking problems. These steps are similar to the steps that a technical support engineer would pursue. This section should be read from beginning to end, instead of jumping around in it, because it lists the steps in the logical progressive order in which they should be pursued. In this section, the term "client application" refers to any application that connects to the server application.

5.1 When a 4D application displays the error message, "You need at least one network component to run…" during startup (general networking issue)

5.1.1 Are there any network protocols installed and turned on in the computer? Your options are: ADSP (AppleTalk), TCP/IP, and IPX. Details on these protocols, and the basic steps for configuring them, are provided in the "Network Components Reference Manual" <http://www.4D.com/acidoc/NCC/NCCMDUS.HTM>

5.1.2 Are network components installed? See Section 2, "Network Components."

5.1.3 Are the network protocols and the network components supporting the same protocol? Having only the ADSP network component installed on a computer that only supports the TCP/IP protocol will not work.

5.2 When a client application cannot see the server. (TCP specific)

5.2.1 Is the client using the correct port number? See Section 3, "Port numbers."

5.2.2 Is the client out of range of the broadcast? The reason 4D Client sees a 4D Server is that 4D Server sends out a broadcast. Network devices such as routers can recognize packets in a broadcast and limit their ability to be forwarded to other parts of a network. This management of packets can be important as it helps free the network of extraneous packets. Such a feature becomes even more important for larger networks like the Internet. This is the reason why you will never see a 4D Server broadcast its presence over the Internet.

Even if a client application cannot see a 4D Server's broadcast, it is possible to access the server by manually entering the server's computer address. Refer to Section 1.5, "Manually entering a 4D Server address in 4D Client."

5.2.3 Is there a problem with the network? 4D assumes that the computers and the network are in good working order. This means that: the application can run on the computer, the computer is connected to the network correctly, and there are no networking problems between the client computer and the server computer. Fortunately, there are ways of isolating most problems on a network. For assistance on troubleshooting a network, see Section 4, "Networking and TCP/IP Diagnostic Tools."

5.3 When 4D Client displays the error message, "The version number of 4D Server is incompatible with the version number of 4D Client." (general networking issue)

5.3.1 You are attempting to use a version of software that is different than the server application that you are connecting to. You must use the same version of the client application (4D Client, 4D Insider, 4D Open, etc.) as the server, as well as using the same version of network components on both. Differences between even minor revisions of programs might make a big difference in client/server connections. For example, version 6.6r5 might not be completely compatible with version 6.6r6.

5.4 When a client application is unable to connect, or loses its connection to the server. (TCP-specific. Errors -10001, -10002, -10030, -10031, or -10032)

5.4.1 If the client reports error -10001 or -10002

The problem that these errors basically refer to is that your connection has timed out. The client tried to establish a network connection to the server, but was unable to do so in a set amount of time. Or, if the connection was already established, the client program lost access to the server and was not able to reestablish the connection in a set amount of time. A list of the network component errors can be found online at: <http://www.4D.com/acidoc/cmu/cmu52981.htm>

There are many reasons for getting these errors. Here are some of the most likely issues:

— There is a problem with the network. See Section 5.5 for suggestions on analyzing network issues.

— A problem with the tcp.opt file can cause this. It might have become damaged. This is easily resolved by throwing away the tcp.opt file that is in the system ACI folder, and restarting the application.

— The versions of the client and server applications, or the versions of the network components might be different. A slight difference in versions might be all it takes to cause a problem.

— There can be a problem with the database. The way to test this is to start 4D Server with a new database, and try to connect 4D Client to the server, to see if the same problem does not occur then.

— A problem with the computer, such as bad network card drivers, two network cards, or a version of the operating system that does not support TCP very well. For Macintosh, it is recommended that you use Mac OS 7.6.1 or later, and Open Transport 1.1.2 or later. (Consult with Apple for information on what versions of the Mac OS are appropriate for your Macintosh computer.) Windows, Windows 95 and later handle TCP/IP fine. Just make sure that you have installed the latest fixes for the operating system that Microsoft has provided. If you cannot find any other reason for networking problems, especially with a new installation on this computer, then definitely revisit the possibility of the problem being with computer itself.

5.4.2 If the client reports error -10030, -10031, or -10033

(Note: this is a general networking issue, and not specific to just TCP/IP)

When data is sent over the network from one program to another, the data is sent in the form of packets of information. The function of sending and receiving the packets occurs at a low-level, typically within the operating system and network. Most applications like 4th Dimension interact with the operating system to send and receive data and are not involved in the low level aspects of networking.

Problems can occur within a network which result in missing packets, or packets becoming corrupted. Most of the time, a network will compensate for these problems by re-sending the packets. If the problem persists and data is not being transferred over the network, 4D might use one of the following error codes to tell you that it is having a problem with the network:

-10030 Desynchronization has occurred during the write cycle.

-10031 Desynchronization has occurred during the read cycle.

-10033 Incorrect data size during the read cycle.

If you encounter these errors, there is a problem occurring at a low level on your network. To troubleshoot these types of problems, it is recommended that you focus on networking issues such as networking hardware, including network cards, cables, software drivers, and printers.

A list of the network component errors can be found online at: <http://www.4D.com/acidoc/cmu/cmu52981.htm>

5.5 TCP/IP network troubleshooting

It is recommended that you read Sections 4.1-4.3 and 5.4 before reading this section.

At a basic level, isolating a problem on a network is not that hard. The steps provided here will walk you through the process of determining where the problem is. The first troubleshooting step is to verify that the other issues listed in Section 5.4.1 are not the problem. The rest of these steps should be performed in the order listed:

A) The next step is to confirm that the computer supports the TCP/IP protocol. The first step in doing this is to see if the computer has at least an IP address and a subnet mask. On Macintosh, go to the TCP control panel and the setting should be there. If you are using a server, such as a DHCP server, to provide the TCP settings, and you have not used a program that uses TCP/IP, then the setting will be blank. To fix this, just use a program like a web browser and the settings will be updated.

If you are using a Windows computer, go to the Network Control Panel. On the "Protocols" tab page, you should see "TCP/IP." Select "TCP/IP" and click the "Properties…" button. Assuming that you entered the IP setting manually, you will see the setting here. If the IP settings are obtained via a DHCP server or the settings appear blank, use the IPCONFIG command in the "DOS prompt" window. See Section 4.3 for information on how to obtain the settings.

If the computer is not set up correctly at this point:

— Consult the manuals for the operating system about installing and configuring for networking and the TCP protocol.

— For assistance on TCP/IP configuration, refer to the "Network Components Reference Manual" <http://www.4D.com/ACIDOC/NCC/NCCMDUS.HTM>

B) Besides confirming that the computer has TCP settings, it is a good idea to ping the computer itself. No packets should be lost, and the response times should be around 0 milliseconds (ms).

If you are not successful at pinging the computer, you might look at:

— The version of the operating system

— The patches for the operating system

— The drivers for the network card

— Other software installed on the computer

— The network card (is there more than one network card)

C) The next step is to ping the server computer. Just enter the IP address of the server computer into the ping utility and execute at least five pings. If the two computers are on a local network, the ping times should be less than 20 ms, preferably less than 10 ms, and very few if any packets should be lost. If you are going over a WAN (wide area network), or the Internet, your times could vary greatly. If the times are long (many seconds or greater), this is the reason why the connection between the client application and the server is going to be slow. If you lose a lot of packets, this can spell trouble and should be looked into.

If you are not able to ping the server computer:

— See if any other network applications work. Can you get e-mail, or surf the Web?

— Use Traceroute. See Sections 4.1-4.3 to see if you can isolate the location of the problem on the network.

— The issue could also be a configuration issue such as duplicate IP addresses, a different subnet, subnet masks, or different router/gateway settings.

D) Ping the client computer from the server computer. If this is not successful, the problem is often a device like a router. Use Traceroute, to help isolate the device.

E) If you are going through a gateway, a router, or a firewall, the problem might be that a port is closed. See Sections 3.1-3.5. The device might need to be reconfigured, or the port number might need to be changed.

Note: 4D Technical Support does not solve issues with networking or computers. This information is provided to assist you in analyzing where a problem exists.

5.6 Crashing problems versus networking problems

Sometimes it is not clear if you are experiencing an application crash or a network problem.

Here are some general guidelines for making that type of judgement:

— If a client application reports a networking error like -10001 or -10002, it is a networking problem between the server and that client application.

— If a client crashes without reporting an error, the problem is probably with the 4D Client application.

— If 4D Client crashes hard enough to force you to restart the computer (Macintosh, Windows 95 or Windows 98), the problem is probably with the 4D Client application.

— If the server application crashes, and the clients all report an error like -10001 or -10002, the problem is with the 4D Server application. Yes, the client application experienced a network problem, but that was only after the fact that the server crashed.

— If the server reports a -10001 or -10002 error, there is a data corruption problem with the data file. This will require using 4D Tools to fix the data file.

Summary


This technical note covered a series of issues regarding the TCP protocol, and networking with the TCP protocol, including many of the issues that 4D Technical Support is frequently asked. It also reviews some of the diagnostic tools you can use, and describes the steps you can take to troubleshoot TCP networking problems.


ACI - Documentation Français English German ACI Technical Notes ACI Technical Notes, By Subject Back Previous Next Find