How Can I Tell Where a Connection is Coming From?

Each client connection in AMPS has two distinct names.

When a client connects, AMPS generates a connection name that identifies the connection itself. When the client logs on, the client provides a client name that identifies the session.

The connection name includes the name of the Transport that accepts the connection and serial numbers that ensure that the connection name is unique for this instance of AMPS. Before a logon command is received on the connection, the connection name is also used as the client name. After the client logs in, the client name is replaced with the session identifier that the client provides. If a client disconnects and then reconnects, the second connection will have the same client name, but a distinct connection name.

For example, given a connection message like the following:

20XX-YY-ZZT09:07:09.4391160-08:00 [73] info: 07-0023 New Client Connection: 
client info:
  client name = prodAMPS23-json-tcp-17-212477879229439106
  description = 192.0.1.4:42760 -> 192.0.1.1:9007

This means that the name of the AMPS instance is prodAMPS23, the connection was received on the json-tcp transport, and the connection was made from 192.0.1.4:42760 to 192.0.1.1:9007.

(In this case, you can also tell that thread 73 accepted the connection. This is the only work for the client that thread 73 will do. The logon command will be processed on a different thread than the thread that accepted the connection, and other commands from the client will be processed on a thread different than the thread that accepted the connection or the thread that processed the logon).

The connection name and the 07-0023 message can be helpful for troubleshooting connectivity issues, especially in cases where the error is preventing AMPS from receiving a logon command.

keywords: 07-0023, connection troubleshooting, client name, IP address, connection name

Last updated