# Problem with Gateway Message Handler - doesn't execute

**URL:** <https://forum.inductiveautomation.com/t/problem-with-gateway-message-handler-doesnt-execute/65481>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 20, 2022, 6:32pm UTC](https://forum.inductiveautomation.com/t/problem-with-gateway-message-handler-doesnt-execute/65481 "2022-10-20T18:32:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_Goralczyk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michal_goralczyk/32/55564_2.png) [@Michal\_Goralczyk](https://forum.inductiveautomation.com/u/Michal_Goralczyk)\
**Post date:** [October 20, 2022, 6:32pm UTC](https://forum.inductiveautomation.com/t/problem-with-gateway-message-handler-doesnt-execute/65481/1 "2022-10-20T18:32:40Z")

</div>

Hi I have a problem. I need to run a script on an IO server from a Frontend server, it is used to control a DNP3. On the IO server I have the connection to the device and on the frontend I have the control.

I'm planning to implement this: system.util.sendMessage but in truth I'm also having trouble running it on the local fronted project... Why is the message handler not executing? I attach screen shots below.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/d/2d63e7cf5bb43e857ef701a90d62885d33f34182.png)  
 ![Przechwytywanie2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/e/5e9f44fcf39241e670bd9c285ad6ded3fa3433ed.png)  
 ![Przechwytywanie3](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c75ce83a658b0a376b1580d4c018692830a31ab4.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bbaf2eb4a6f94804bff997020c4233a68027a35.png)

Best Regards

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [October 20, 2022, 6:50pm UTC](https://forum.inductiveautomation.com/t/problem-with-gateway-message-handler-doesnt-execute/65481/2 "2022-10-20T18:50:27Z")

</div>

If you are expecting to return a value, you should use `system.util.sendRequest()`. If you are messaging a remote server, then you need to also specify the remote server.

```auto
def runAction(self, event):
    self.getSibling('TextArea').props.text = system.util.sendRequest(project='Nomad_Global', messageHandler='Testy',remoteServer='Your Server Name')

```

However, why not just set up the Back end server as a Remote Tag Provider to the Front End Server? Then there would be no need for a message handler at all.

Also, you should really be using the `onActionPerformed` as opposed to the `onClick`, the `onClick` will occur even if the button is disabled.
