# UDP Node Trigger not responding

**URL:** <https://forums.losant.com/t/udp-node-trigger-not-responding/4807>\
**Category:** Help\
**Tags:** edge, workflow\
**Created:** [November 10, 2022, 10:42am UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807 "2022-11-10T10:42:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruba\_jabal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/ruba_jabal/32/4251_2.png) [@ruba\_jabal](https://forums.losant.com/u/ruba_jabal)\
**Post date:** [November 10, 2022, 10:42am UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/1 "2022-11-10T10:42:53Z")

</div>

Hello dears,

i have an edge agent running and up with deployed edge workflow that include UDP Node listen to port 3001, i tried to send udp packet from the cli using " echo ‘Hello Losant’ \> /dev/udp/0.0.0.0/3001"m how ever it doesn’t trigger the workflow  
below the agent logs and snapshot of workflow debug  
Note: i started the agent using the With “Environment Config” as i am always face issue with config.toml

 ![edge agent log](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/1/1d8a32427c6391c5931071c3389d70372837cc4a.png)  
 ![workflow debug](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/7/74eff0a3a1ad95fe529edb5eaba9b1258b11fbee.jpeg)

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [November 10, 2022, 1:04pm UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/2 "2022-11-10T13:04:51Z")

</div>

When you started the container, did you [map a UDP port](https://docs.docker.com/config/containers/container-networking/#published-ports) on the host machine to port 3001 in the Docker container?

Attached is a simple workflow for testing. Note that, without doing the port mapping, this workflow will work fine as the UDP message is originating from within the Docker container but sending a message through the CLI on the host machine will fail.

But, if you start the GEA with this configuration …

```auto
docker run -d --restart always --name YOUR_CONTAINER_NAME \
  -e 'DEVICE_ID=YOUR_DEVICE_ID' \
  -e 'ACCESS_KEY=YOUR_ACCESS_KEY' \
  -e 'ACCESS_SECRET=YOUR_ACCESS_SECRET' \
  -p 3001:3001/udp \
  losant/edge-agent:1.34.0

```

… Then, you can send UDP datagrams from the host machine to the Docker container and trigger the workflow …

```auto
echo 'hello from the host machine' | nc -u 0.0.0.0 3001

```

[udp-test-develop.flow](https://forums.losant.com/uploads/short-url/umng3yr8L8PPPUu9kTSZnCdbazf.flow) (2.3 KB)

---

<div class="post-metadata">

**Author:** ![ruba\_jabal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/ruba_jabal/32/4251_2.png) [@ruba\_jabal](https://forums.losant.com/u/ruba_jabal)\
**Post date:** [November 21, 2022, 2:49pm UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/3 "2022-11-21T14:49:45Z")

</div>

![Screenshot from 2022-11-21 17-29-17](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/9/93af8ccc871ab6d3366c0a021e663fdf1ef4f87d.png)  
Thanks Dylan! i passed the port mapping and it received messages now.

i am facing issue with “File: Read” Node, as it can’t find/read files in host machine. is there something missing? is there a specific way to define the file path?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [November 21, 2022, 2:59pm UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/4 "2022-11-21T14:59:30Z")

</div>

Similar to requiring a port mapping, Docker requires mounting a volume within the container if you wish to read files from the host machine. For example, the `-v` line below …

```auto
docker run -d --restart always --name YOUR_CONTAINER_NAME \
  -e 'DEVICE_ID=YOUR_DEVICE_ID' \
  -e 'ACCESS_KEY=YOUR_ACCESS_KEY' \
  -e 'ACCESS_SECRET=YOUR_ACCESS_SECRET' \
  -p 3001:3001/udp \
  -v /directory/on/host/machine:/directory/in/docker/container \
  losant/edge-agent:1.34.0

```

More information can be found in [our documentation](https://docs.losant.com/edge-compute/gateway-edge-agent/usage/#creating-a-storage-area) as well as [Docker’s documentation](https://docs.docker.com/storage/).

---

<div class="post-metadata">

**Author:** ![ruba\_jabal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/ruba_jabal/32/4251_2.png) [@ruba\_jabal](https://forums.losant.com/u/ruba_jabal)\
**Post date:** [November 28, 2022, 12:02pm UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/5 "2022-11-28T12:02:24Z")

</div>

i have already mounted the volume within the container: /var/lib/losant-edge-agent/data  
however it stills gives the error, i am trying to access text file “decodetest-output002” inside the same mounted directory

```auto
docker run -d --restart always --name docs-agent \
  -e 'DEVICE_ID=MY_DEVICEID' \
  -e 'ACCESS_KEY=MY_ACCESSKEY \
  -e 'ACCESS_SECRET=MY_SECRETKEY' \
  -p 3001:3001/udp \
  -v /var/lib/losant-edge-agent/data:/data \
  losant/edge-agent

```

 ![Screenshot from 2022-11-28 15-00-42](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/e/ea451b707a1858d4f2844401b535125a1e85e11c.png)

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [November 28, 2022, 1:33pm UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/6 "2022-11-28T13:33:13Z")

</div>

Your ‘File Path Template’ should be relative to the location in the Docker container, not the location on your hardware’s file system. So instead of …

```nohighlight
/var/lib/losant/edge-agent/data/decodedtest-output002

```

… it should be …

```nohighlight
/data/decodedtest-output002

```

The [File: Read Node documentation](https://docs.losant.com/workflows/data/file-read/) does say this value should be “A [string template](https://docs.losant.com/workflows/accessing-payload-data/#string-templates) for the **disk location** of the file to read.” I will file a ticket to clarify that that should be the location of the mounted volume.

---

<div class="post-metadata">

**Author:** ![ruba\_jabal](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/ruba_jabal/32/4251_2.png) [@ruba\_jabal](https://forums.losant.com/u/ruba_jabal)\
**Post date:** [November 28, 2022, 3:02pm UTC](https://forums.losant.com/t/udp-node-trigger-not-responding/4807/7 "2022-11-28T15:02:59Z")

</div>

Thanks a lot, very helpful!
