BlackZork / mqmgateway

MQTT gateway for modbus networks
GNU Affero General Public License v3.0
44 stars 20 forks source link

Failed to load configuration from /etc/modmqttd/config.yaml #17

Closed xspander closed 1 year ago

xspander commented 1 year ago

Hello, trying to start modmqttd service, it fails with result 'exit-code'. In journalctl show this 2023-Mar-22 14:24:54.375589: [INFO] modmqttd is starting мар 22 14:24:54 jethubj100 modmqttd[6880]: 2023-Mar-22 14:24:54.378455: [CRITICAL] Failed to load configuration from /etc/modmqttd/config.yaml thanks in advance for your help

BlackZork commented 1 year ago

You need a config file, where MQTT topics are mapped to modbus registers. See example in source code.

xspander commented 1 year ago

I changed and copied file config.yaml file to /etc/modmqttd/ but it seem like service doesn't see this file

pki791 commented 1 year ago

Maybe wrong permissions on the config file or directory? I used it few days ago without a problem.

BlackZork commented 1 year ago

You can use strace to see if process is trying to open it and a result

xspander commented 1 year ago

adminx@jethubj100:/etc/modmqttd$ strace -o trace_output.txt modmqttd 2023-Mar-22 15:06:00.801679: [INFO] modmqttd is starting 2023-Mar-22 15:06:00.804620: [WARNING] No config path, trying to read config.yaml from working directory 2023-Mar-22 15:06:00.806826: [CRITICAL] Failed to load configuration from /etc/modmqttd

`adminx@jethubj100:/etc/modmqttd$ dir

config.yml config.yml.backup trace_output.txt ` It does not see this file anyway

xspander commented 1 year ago

Oh, i finded a problem, config file must be "config.yaml"

xspander commented 1 year ago

Thank for help) Can you change in [README.md] "Copy config.template.yml to /etc/modmqttd/config.yml" to "Copy config.template.yml to /etc/modmqttd/config.yaml"

BlackZork commented 1 year ago

Changed, thanks.