KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to check for the presence of 4D Server on the network
PRODUCT: 4D Server | VERSION: 2004 | PLATFORM: Mac & Win
Published On: June 2, 2006

There are several ways that you can check for the presence of 4D Server (assuming that you cannot connect to it with 4D Client).

To begin with you may want to establish that the machine that 4D Server should be running on is "visible" to you. The "ping" command, which sends a UDP packet to the specified server, can be used to do this. The "ping" command exists on both Mac OS and Windows and uses the syntax:

ping <IP Address>

If you do not know the IP address of the machine you can also use the domain name of the machine, for example:

ping www.4d.com

Note that the ping command will also give you the IP address of the machine. Also note that the ping command will not be able to test for the presence of the 4D Server itself, but instead is used to test for the presence of the machine that the 4D Server should be running on.

After you have established that the machine that should be running 4D Server is visible you can test for the presence of the 4D Server in a few ways:

-A "TELNET" client can be used to connect to 4D Server.
-A port scanning utility can be used to check for the open 4D Server port.
-You can use the 4D Internet Commands plug-in to create a TCP/IP connection to the 4D Server.

Note that for any of these tests you will need to know the port that the 4D Server is running on (default 19813).

TELNET:

TELNET is a network protocol that is typically used to provide user oriented command line login sessions between hosts on the Internet. When you make a TELNET connection to a 4D Server the server will respond with the name of the current running database. Of course, if there is not response, then the server is not available.

Port scanning:

Port scanning utilities allow you to scan for open ports on the specified machine. Unfortunately, since a port scanner cannot really tell what any open port is used for, you still need to know the port that the 4D Server is expected to be running on. For example, the port scanner might report that port 19813 is open. However any Web server could be configured to occupy this port so you are not guaranteed that a 4D Server is running on that port. Still the likelihood of this occurring, especially if you are using a custom port for 4D Server, is low so port scanning is still a useful technique for checking for the presence of 4D Server.

On Mac OS the ability to scan ports is built into the Network Utility application. On Windows you will need to find a third-party application to accomplish port scanning.

4D Internet Commands:

You can use the TCP/IP commands from the 4D Internet Commands plug-in to create a TCP/IP connection to a machine on a specific port. 4D Server uses TCP/IP protocol for client/server communication. If the connection is not successful, then the server is not present on whichever port you tried to connect to. For more information about the TCP/IP commands available in 4D Internet Commands see:

http://www.4d.com/docs/ICU/ICU00007.HTM

Commented by Josh Fletcher on October 3, 2011 at 2:07 PM
The telnet, port scan, and TCP techniques should NOT be used with 4D v11 SQL or newer. Because of changes in the way 4D handles new connections all 3 of these techniques can cause network problems for 4D.