strace -e trace=openat shows which files a process really opens
A service starts with the wrong settings and the config search path lives only in its source. The kernel already knows every path it tried.
strace -f -e trace=openat -o /tmp/open.log ./app
grep conf /tmp/open.log-f follows the children that do the real work, and -o keeps the trace out of the program's own output. The ENOENT lines are the interesting ones: those are the paths it looked for and did not find, which is usually the answer. Attach to something already running with -p <pid>; inside a container it needs --cap-add=SYS_PTRACE.
shelldebuggingoperations