# View client name resolution

**URL:** <https://forum.inductiveautomation.com/t/view-client-name-resolution/41740>\
**Category:** Ignition\
**Created:** [December 22, 2020, 9:35pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740 "2020-12-22T21:35:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [December 22, 2020, 9:35pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/1 "2020-12-22T21:35:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 22, 2020, 10:13pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/2 "2020-12-22T22:13:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [December 22, 2020, 10:21pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/3 "2020-12-22T22:21:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 22, 2020, 10:24pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/4 "2020-12-22T22:24:38Z")

</div>

Please show a snipped of your sendMessage call.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [December 22, 2020, 10:30pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/5 "2020-12-22T22:30:42Z")

</div>

Message:

```auto
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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 22, 2020, 10:32pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/6 "2020-12-22T22:32:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [December 22, 2020, 10:53pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/7 "2020-12-22T22:53:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 22, 2020, 11:10pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/8 "2020-12-22T23:10:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [December 23, 2020, 10:42pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/9 "2020-12-23T22:42:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [February 8, 2021, 2:50pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/10 "2021-02-08T14:50:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 8, 2021, 4:48pm UTC](https://forum.inductiveautomation.com/t/view-client-name-resolution/41740/11 "2021-02-08T16:48:11Z")

</div>

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