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:
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 an error (for example, invalid credentials, ) is preventing AMPS from receiving a logon command.
Last updated