View client name resolution

I’m trying to send a message to a client with system.util.sendMessage but although the message is sent it never arrives. I can successfully send a message to the gateway.

I’ve noticed that the list of connected Vision clients in the gateway lists all of the clients with the address of the local DNS server rather than their actual IP address. I’ve also noticed that the output of the sendMessage command lists the client address as this address. so I think the messages are being sent to the wrong place.

Anyone have any thoughts on why the client addresses are pointing at the wrong address? There is no hostname to IP address resolution on the network - DNS only works for external addresses.

I’ve only ever used the client IDs to target messages from the gateway. Have you tried that?

When I try using the client session id instead of the hostname in the Script Console, the clientAddress is still listed as the address of the local DNS server and I don’t get any response.

Please show a snipped of your sendMessage call.

Message:

system.util.sendMessage(
	project="production",
	messageHandler="Test",
	scope="C",
	clientSessionId='A7E35F41',
)

Reply:

[type=Client,sessionId=A7E35F41,clientAddress=10.0.0.1,clientHostName=MACHINE1,project=production,messageHandler=Test,filterParams={userZones=, clientSessionId=A7E35F41, userRoles=–snip–, scope=C},sendStatus=SENT]

The IP address shown is not the IP of the client. This works on another network, so it definitely seems to be a name resolution issue.

Is the client getting the message when the client Id is supplied? (In not a fan of relying on DNS…)

No, and the same IP address is shown whether I specify the client session id or the hostname. I’ve never managed to send a message to a client on this network, only to the gateway.

Could you place a startup script in a client to report what it thinks its client Id is to the diagnostic log?

Joe in support helped me solve this. It turns out there was no name resolution on the network so everything was being passed to the default gateway. He also pointed out that if you are sending a message to a client, you have to monitor the client for any logger messages, not the gateway!

It turns out there’s an (undocumented) option in system.util.sendMessage that allows you to send the message using the client’s IP address: clientAddress. This means that as long as you’re using fixed IP addresses you don’t have to depend on any form of name resolution.

Thanks for looking at this with me Phil.

3 Likes

It turns out this didn’t actually work. All clients were still receiving the message, so we reverted to running client event scripts and filtering in the script which client should respond.

Did you add a logger in the client to show what it thinks its ID is?