dns-resolver causing panic

I’m trying to inject a message via SMTP and I get this error in the logs (journalctl):

Dec 26 19:30:07 send kumod[63315]: 2023-12-26T19:30:07.079738Z  INFO localset-0 kumod: NodeId is 2f6489ba-9d9d-47d5-83bb-8492ac3fdd93
Dec 26 19:30:07 send kumod[63315]: 2023-12-26T19:30:07.129159Z  INFO localset-0 kumo_server_common::http_server: http listener on 0.0.0.0:8000
Dec 26 19:30:07 send kumod[63315]: 2023-12-26T19:30:07.134809Z  INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:25
Dec 26 19:30:07 send kumod[63315]: 2023-12-26T19:30:07.134902Z  INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:2525
Dec 26 19:30:07 send kumod[63315]: 2023-12-26T19:30:07.134984Z  INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:587
Dec 26 19:30:07 send kumod[63315]: 2023-12-26T19:30:07.198429Z ERROR localset-0 insert:insert_ready: kumo_server_common::panic: panic at crates/dns-resolver/src/lib.rs:36:84 - !?
Dec 26 19:30:07 send kumod[63315]:    0: <unknown>
Dec 26 19:30:07 send kumod[63315]:    1: <unknown>
Dec 26 19:30:07 send kumod[63315]:    2: <unknown>
...
Dec 26 19:30:07 send kumod[63315]:   32: <unknown>
Dec 26 19:30:07 send kumod[63315]: thread 'localset-0' panicked at 'called `Result::unwrap()` on an `Err` value: ResolveError { kind: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }) }', crates/dns-resolver/src/lib.rs:36:84

Environment:

root@send:~# lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
root@send:~# ls -l /etc/resolv.conf 
lrwxrwxrwx 1 root root 39 Feb 17  2023 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

(bind9 is installed)

I’m using kumod 2023.11.28-b5252a41

I think this was fixed in a dev release, can you switch to latest dev?

I don’t think we’ve seen this before

yes, I just need to uninstall the kumomta (apt remove kumomta) and install kumomta-dev following the docs, right?

It’ almost certainly a problem finding /etc/resolv.conf. Are you sure that the file is resolvable to the kumod process? Can you try running it under strace to see what it’s actually trying to read?

Ah, I’ll defer to Wez

Probably something like sudo -u kumod strace -e trace=file /opt/kumomta/sbin/kumod --user kumod

yup, that seems to be the problem:

root@send:/opt/kumomta# sudo -u kumod cat /etc/resolv.conf 
cat: /etc/resolv.conf: No such file or directory

hah, actually /etc/resolv.conf is a link to /run/systemd/resolve/stub-resolv.conf which doesn’t exist!

this is the stock ubuntu 22.04 installation with bind9 installed

and named is running

Maybe look at stuff like https://askubuntu.com/questions/134121/how-to-restore-recreate-etc-resolv-conf-files to figure out how to get a working resolv.conf back

yeah, fixed by running sudo systemctl enable --now systemd-resolved.service

Thanks!

As a side question - should I be running the dev version or the stable version right now? The server is going to go into production use early next week.

Depends on your needs: an issue with parsing FBL from Yahoo is fixed in the current dev build, as is an issue with MTA-STS. If you plan to use either of those, then you probably should run with the dev build.

In general: we try to keep the dev build in good order, but there is more of a risk of something going a bit caca vs. the stable version if you are aggressively and continually updating to the latest dev build.