# SNMPD delayed start possible?

**URL:** <https://dietpi.com/forum/t/snmpd-delayed-start-possible/5945>\
**Category:** General Discussion\
**Created:** [16 November 2021 15:10 UTC](https://dietpi.com/forum/t/snmpd-delayed-start-possible/5945 "2021-11-16T15:10:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartplessers](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@bartplessers](https://dietpi.com/forum/u/bartplessers)\
**Post date:** [16 November 2021 15:10 UTC](https://dietpi.com/forum/t/snmpd-delayed-start-possible/5945/1 "2021-11-16T15:10:53Z")

</div>

Hello,

Is it possible to have a delayed start of the snmpd.service ?  
Although this service is enabled at startup, on some of my servers this service does not start after a reboot.  
I think it’s a timing issue, because if I start the service manually after I logged on, no problem.

```nohighlight
journalctl -b |grep snmpd.service

Nov 16 15:49:45 rpi-87 systemd[1]: snmpd.service: Main process exited, code=exited, status=1/FAILURE
Nov 16 15:49:45 rpi-87 systemd[1]: snmpd.service: Failed with result 'exit-code'.

```

config:

```nohighlight
# --------------------------------------------------------
[Unit]
Description=Simple Network Management Protocol (SNMP) Daemon.
After=network.target
ConditionPathExists=/etc/snmp/snmpd.conf

[Service]
Type=simple
ExecStartPre=/bin/mkdir -p /var/run/agentx
ExecStart=/usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
# --------------------------------------------------------

```

How can I autmatically start my snmpd.service ?

kind regards,  
Bart

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 November 2021 18:06 UTC](https://dietpi.com/forum/t/snmpd-delayed-start-possible/5945/2 "2021-11-16T18:06:23Z")

</div>

You can add something like this to service definition to delay service start by 30 second.

```nohighlight
ExecStartPre=/bin/sleep 30

```

Btw you con use following to check the journalctl

```nohighlight
journalctl -u snmpd

```

---

<div class="post-metadata">

**Author:** ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)\
**Post date:** [17 November 2021 09:26 UTC](https://dietpi.com/forum/t/snmpd-delayed-start-possible/5945/3 "2021-11-17T09:26:28Z")

</div>

Is snmpd bound on a specific address or interface? Normally it should listen to udp:161 and udp6:161

---

<div class="post-metadata">

**Author:** ![bartplessers](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@bartplessers](https://dietpi.com/forum/u/bartplessers)\
**Post date:** [21 December 2021 13:51 UTC](https://dietpi.com/forum/t/snmpd-delayed-start-possible/5945/4 "2021-12-21T13:51:02Z")

</div>

Thanx!  
That did the trick.

Changed

```nohighlight
# agentaddress 127.0.0.1,192.168.4.86
agentaddress udp:161

```

grtz  
Bart Plessers
