I have tried to deploy libreNMS with a docker compose but unfortunately the snmptrapd container was failing due to a typo in the file 08-svc-snmptrapd.sh that is related to the snmptrapd.conf.
The error I was getting is the following:
[cont-init.d] 08-svc-snmptrapd.sh: executing...
Sidecar snmptrapd container detected
/var/run/s6/etc/cont-init.d/08-svc-snmptrapd.sh: line 46: syntax error: unterminated quoted string
[cont-init.d] 08-svc-snmptrapd.sh: exited 2.
[cont-finish.d] executing container finish scripts...
librenms /init Up 162/tcp, 162/udp, 514/tcp, 514/udp, 0.0.0.0:8000->8000/tcp,:::8000->8000/tcp
librenms_db docker-entrypoint.sh mysql ... Up 3306/tcp
librenms_dispatcher /init Up 162/tcp, 162/udp, 514/tcp, 514/udp, 8000/tcp
librenms_memcached docker-entrypoint.sh memcached Up 11211/tcp
librenms_msmtpd /init Up (healthy) 2500/tcp
librenms_redis docker-entrypoint.sh redis ... Up 6379/tcp
**librenms_snmptrapd /init Restarting**
librenms_syslogng /init Up 162/tcp, 162/udp, 0.0.0.0:514->514/tcp,:::514->514/tcp, 0.0.0.0:514->514/udp,:::514->514/udp, 8000/tcp
and its due to a typo in the file 08-svc-snmptrapd.sh:
27 sed -ie "s/@SNMP_PROCESSING_TYPE@/${SNMP_PROCESSING_TYPE}/" /etc/snmp/snmptrapd.conf' <----------
After correcting the typo (removed the quota at the end of the line) and re-building the image locally, the snmptrapd service is UP:
librenms /init Up 162/tcp, 162/udp, 514/tcp, 514/udp, 0.0.0.0:8000->8000/tcp,:::8000->8000/tcp
librenms_db docker-entrypoint.sh mysql ... Up 3306/tcp
librenms_dispatcher /init Up 162/tcp, 162/udp, 514/tcp, 514/udp, 8000/tcp
librenms_memcached docker-entrypoint.sh memcached Up 11211/tcp
librenms_msmtpd /init Up (healthy) 2500/tcp
librenms_redis docker-entrypoint.sh redis ... Up 6379/tcp
librenms_snmptrapd /init Up 0.0.0.0:162->162/tcp,:::162->162/tcp, 0.0.0.0:162->162/udp,:::162->162/udp, 514/tcp, 514/udp, 8000/tcp
librenms_syslogng /init Up 162/tcp, 162/udp, 0.0.0.0:514->514/tcp,:::514->514/tcp, 0.0.0.0:514->514/udp,:::514->514/udp, 8000/tcp
Hello,
I have tried to deploy libreNMS with a docker compose but unfortunately the snmptrapd container was failing due to a typo in the file 08-svc-snmptrapd.sh that is related to the snmptrapd.conf.
The error I was getting is the following:
and its due to a typo in the file 08-svc-snmptrapd.sh:
27 sed -ie "s/@SNMP_PROCESSING_TYPE@/${SNMP_PROCESSING_TYPE}/" /etc/snmp/snmptrapd.conf' <----------
After correcting the typo (removed the quota at the end of the line) and re-building the image locally, the snmptrapd service is UP: