View previous topic :: View next topic |
Author |
Message |
therealjrd Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 May 2006 Posts: 122
|
Posted: Mon Dec 17, 2018 12:17 am Post subject: [SOLVED] qpsmtpd: problem finding modules |
|
|
Hi all. I'm building up a new server using qpsmtpd.
Everything says it goes together ok, but when I start qpsmtpd, it fails. A bit of debugging with strace reveals that it's trying to load Net::IP.pm, and not finding it.
I see the following:
Code: |
stat("lib/Net/IP.pmc", 0x7ffd016b7dd0) = -1 EACCES (Permission denied)
stat("lib/Net/IP.pm", 0x7ffd016b7dd0) = -1 EACCES (Permission denied)
|
followed by
Code: |
eval Can't locate Net/IP.pm: lib/Net/IP.pm: Permission denied at /usr/share/qpsmtpd/plugins/check_relay line 5.
BEGIN failed--compilation aborted at /usr/share/qpsmtpd/plugins/check_relay line 5.
|
There are other similar modules where it'll do the same two stats, but then continue looking in the rest of the search path, eventually finding them. In this case, it never searches the rest of the path.
Anybody seen a similar issue? Hints?
Thanks in advance.
Last edited by therealjrd on Tue Dec 18, 2018 11:12 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jaglover Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/179708169458f2999e44e26.gif)
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
therealjrd Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 May 2006 Posts: 122
|
Posted: Mon Dec 17, 2018 12:29 am Post subject: |
|
|
Jaglover wrote: | Install dev-perl/Net-IP ? |
Sorry, should have said at first: it's installed.
I can write a little standalone piece of perl which says use Net::IP and it works. This is something about qpsmtpd, I think. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jaglover Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/179708169458f2999e44e26.gif)
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23085
|
Posted: Mon Dec 17, 2018 1:27 am Post subject: |
|
|
What is the output of ls -ld on the affected files and every ancestor directory of those files? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
therealjrd Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 May 2006 Posts: 122
|
Posted: Tue Dec 18, 2018 11:12 am Post subject: |
|
|
Ok. I've done some more debugging.
There have been (at least) two things going on.
1. When I try strac'ing qpsmtpd by hand, it succeeds or fails depending on the directory I'm starting from. If I cd to /root, and run my strace, I get
Code: |
stat("lib/Net/IP.pmc", 0x7ffc6068b820) = -1 EACCES (Permission denied)
stat("lib/Net/IP.pm", 0x7ffc6068b820) = -1 EACCES (Permission denied)
|
If I cd to /, or /tmp, or a few other places I tried, I get
Code: |
stat("lib/Net/IP.pmc", 0x7ffe778814e0) = -1 ENOENT (No such file or directory)
stat("lib/Net/IP.pm", 0x7ffe778814e0) = -1 ENOENT (No such file or directory)
|
and the rest of the startup proceeds.
A little more debugging reveals that the permissions on /root are 0700. If I create /tmp/root, set it the same way, and cd there, I get the same failure.
2. stracing the start-stop-daemon part of the init script revealed that it was trying to create /run/qpsmtpd/qpsmtpd.pid, but /run/qpsmtpd doesn't exist. That turns out to be the real root cause of why the service wouldn't start. Creating /run/qpsmtpd makes it all happy.
So all the debugging around why it couldn't find lib/Net/IP.pm was due to a red herring; the permissions on the working dir cause perl to get different results (EACCES vs ENOENT) when searching. (though even that doesn't behave consistently, yet another red herring)
I'll see about getting a bug report filed with the qpsmtpd maintainers for the /run/qpsmtpd issue.
Thanks for the help and suggestions. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|