Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [AMaViS-user] error loading optional module

26 views
Skip to first unread message

Mark Martinec

unread,
May 20, 2008, 2:52:20 PM5/20/08
to
Bill,

> I recently upgraded to amavisd-new-2.6.0 and all appears to be running
> fine. However, when executing a reload, I am seeing the following
> errors reported:
>
> # amavisd reload
> Daemon [24965] terminated by SIGTERM, waiting for dust to settle...
> becoming a new daemon...
> fetch_modules: error loading optional module IP/Country/Fast.pm:
> Requiring lib/IP/Country/Fast.pm, file is inaccessible: Permission
> denied,
> fetch_modules: error loading optional module Image/Info.pm:
> Requiring lib/Image/Info.pm, file is inaccessible: Permission denied,
> fetch_modules: error loading optional module Image/Info/GIF.pm:
> Requiring lib/Image/Info/GIF.pm, file is inaccessible: Permission
> denied, fetch_modules: error loading optional module Image/Info/JPEG.pm:
> Requiring lib/Image/Info/JPEG.pm, file is inaccessible: Permission
> denied, [...]

> The paths appear to be incorrect, but I'm not sure how to correct them.
> The errors are only reported when doing a reload (amavisd reload), and
> not when starting amavisd (amavisd start).

Strange, the 'amavisd reload' is pretty much equivalent to
'amavisd stop' followed by 'amavisd start'. Was there any
command line option like -R used in one case but not the other?
Or perhaps one was executed as root and the other as user vscan?

What happens if you provide a username with an -u uption, e.g.:
# amavisd -u vscan reload
vs.
# amavisd stop
# amavisd -u vscan start

Anyway, the 'Permission denied' looks like these perl modules
or one of their parent directories were not accessible as
user vscan/amavis. Please check permissions of .pm files and all
their parent directories. Make sure you do not have two copies
of Perl module trees, or at least that they are consistent.

Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaVi...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Bill Landry

unread,
May 20, 2008, 3:50:33 PM5/20/08
to

No both simply executed from su root as:

amavisd stop
amavisd start

amavisd reload

> What happens if you provide a username with an -u uption, e.g.:
> # amavisd -u vscan reload
> vs.
> # amavisd stop
> # amavisd -u vscan start

I should have sent out an update, but I re-downloaded the image and
reinstalled amavisd and have had no problems or error reports since -
possibly a corrupted download?

> Anyway, the 'Permission denied' looks like these perl modules
> or one of their parent directories were not accessible as
> user vscan/amavis. Please check permissions of .pm files and all
> their parent directories. Make sure you do not have two copies
> of Perl module trees, or at least that they are consistent.

No, since all appears to be running fine now. Anyway, thanks for the reply.

Bill

Max Matslofva

unread,
May 22, 2008, 3:43:18 AM5/22/08
to
Hi
I have the same problem on a new server running amavisd-new-2.6.0 (from ports) on FreeBSD 6.3 and /var/amavis/tmp on 512m ramdisk.

Bill Landry skrev:


> Mark Martinec wrote:
>> What happens if you provide a username with an -u uption, e.g.:
>> # amavisd -u vscan reload

I get "error loading optional module"


>> vs.
>> # amavisd stop
>> # amavisd -u vscan start

I get "error loading optional module"


>
>> Anyway, the 'Permission denied' looks like these perl modules
>> or one of their parent directories were not accessible as
>> user vscan/amavis. Please check permissions of .pm files and all
>> their parent directories. Make sure you do not have two copies
>> of Perl module trees, or at least that they are consistent.

[root@smtp /]# find / -name Fast.pm
/usr/local/lib/perl5/5.8.8/CGI/Fast.pm
[root@smtp /]# su vscan
[root@smtp /]# head /usr/local/lib/perl5/5.8.8/CGI/Fast.pm
package CGI::Fast;

# See the bottom of this file for the POD documentation. Search for the
# string '=head'.

# You can run this file through either pod2man or pod2html to produce pretty
# documentation in manual or html file format (these utilities are part of the
# Perl 5 distribution).

# Copyright 1995,1996, Lincoln D. Stein. All rights reserved.

But if I stop and start with rc-script from ports I can use "amavisd reload" ?
[root@smtp /]# /usr/local/etc/rc.d/amavisd stop
Stopping amavisd.
Waiting for PIDS: 16411.
[root@smtp /]# /usr/local/etc/rc.d/amavisd start
Starting amavisd.
[root@smtp /]# amavisd reload
Daemon [16587] terminated by SIGTERM, waiting for dust to settle...
becoming a new daemon...
[root@smtp /]#


/Max

Bill Landry

unread,
May 22, 2008, 1:13:08 PM5/22/08
to

Upon further investigation, I found that this still happens here, as well:

uname -a
Linux mail.inetmsg.com 2.6.24.7-92.fc8 #1 SMP Wed May 7 16:50:09 EDT
2008 i686 i686 i386 GNU/Linux

amavisd -V
amavisd-new-2.6.0 (20080423)

spamassassin -V
SpamAssassin version 3.2.4
running on Perl version 5.8.8

However, for me, the odd things is this only happens when "amavisd
reload or amavisd stop/start" is executed from within my home directory.
If executed anywhere outside of my home directory, no errors are seen.
The only other thing I noticed when executing from within my home
directory, but again not if executed outside of my home directory, is
the following entry in my maillog:

May 21 14:28:38 mail amavis[2612]: (!)_DIE: "image_info" is not exported
by the Image::Info module\n "dim" is not exported by the Image::Info
module\nCan't continue after import errors at
/etc/mail/spamassassin/ImageCheck.pm line 7\nBEGIN failed--compilation
aborted at /etc/mail/spamassassin/ImageCheck.pm line 7.\n

However, if I drop back to amavisd-new-2.5.4, the errors and maillog
entry go away, no matter where I execute "amavisd reload or amavisd
stop/start" from. Thoughts?

Bill

Mark Martinec

unread,
May 22, 2008, 1:40:25 PM5/22/08
to
Max and Bill,

> Upon further investigation, I found that this still happens here, as well:

> However, for me, the odd things is this only happens when "amavisd
> reload or amavisd stop/start" is executed from within my home directory.
> If executed anywhere outside of my home directory, no errors are seen.
> The only other thing I noticed when executing from within my home
> directory, but again not if executed outside of my home directory, is
> the following entry in my maillog:
>
> May 21 14:28:38 mail amavis[2612]: (!)_DIE: "image_info" is not exported
> by the Image::Info module\n "dim" is not exported by the Image::Info
> module\nCan't continue after import errors at
> /etc/mail/spamassassin/ImageCheck.pm line 7\nBEGIN failed--compilation
> aborted at /etc/mail/spamassassin/ImageCheck.pm line 7.\n
>
> However, if I drop back to amavisd-new-2.5.4, the errors and maillog
> entry go away, no matter where I execute "amavisd reload or amavisd
> stop/start" from. Thoughts?

Do you happen to have SpamAssassin or some of Perl modules or plugins
installed/located in your home directory?

Mark

Bill Landry

unread,
May 22, 2008, 1:51:23 PM5/22/08
to
Mark Martinec wrote:
> Max and Bill,
>
>> Upon further investigation, I found that this still happens here, as well:
>> However, for me, the odd things is this only happens when "amavisd
>> reload or amavisd stop/start" is executed from within my home directory.
>> If executed anywhere outside of my home directory, no errors are seen.
>> The only other thing I noticed when executing from within my home
>> directory, but again not if executed outside of my home directory, is
>> the following entry in my maillog:
>>
>> May 21 14:28:38 mail amavis[2612]: (!)_DIE: "image_info" is not exported
>> by the Image::Info module\n "dim" is not exported by the Image::Info
>> module\nCan't continue after import errors at
>> /etc/mail/spamassassin/ImageCheck.pm line 7\nBEGIN failed--compilation
>> aborted at /etc/mail/spamassassin/ImageCheck.pm line 7.\n
>>
>> However, if I drop back to amavisd-new-2.5.4, the errors and maillog
>> entry go away, no matter where I execute "amavisd reload or amavisd
>> stop/start" from. Thoughts?
>
> Do you happen to have SpamAssassin or some of Perl modules or plugins
> installed/located in your home directory?

Here is what's in my home directory:

ls -l /home/bill/
total 72
drwxr-xr-x 2 bill bill 4096 2007-12-12 23:22 Desktop
drwxr-xr-x 2 bill bill 4096 2008-04-26 19:27 Documents
drwxr-xr-x 44 bill bill 4096 2008-05-20 13:45 Download
drwxr-xr-x 2 bill bill 4096 2007-12-12 23:22 Music
drwxr-xr-x 2 bill bill 4096 2007-12-12 23:22 Pictures
drwxr-xr-x 2 bill bill 4096 2007-12-12 23:22 Public
drwxr-xr-x 2 bill bill 4096 2008-04-12 13:04 Scripts
drwxr-xr-x 2 bill bill 4096 2007-12-12 23:22 Templates
drwxr-xr-x 2 bill bill 4096 2007-12-12 23:22 Videos

Bill

Mark Martinec

unread,
May 22, 2008, 2:30:10 PM5/22/08
to
> >> Upon further investigation, I found that this still happens here, as
> >> well: However, for me, the odd things is this only happens when "amavisd
> >> reload or amavisd stop/start" is executed from within my home directory.
> >> If executed anywhere outside of my home directory, no errors are seen.
> >> The only other thing I noticed when executing from within my home
> >> directory, but again not if executed outside of my home directory, is
> >> the following entry in my maillog:

It looks like a problem reported to me by Tuomo Soini on Apr 29 2008:


Some notes: pid file creation was changes from 2.5.4 to 2.6.0 so that
2.6.0 can't open pid file in /var/run any more, pid file must be in dir
owned by amavis user.

I could work around this by moving amavisd pid to
/var/run/amavis/amavisd.pid

I noticed that problem with perl module loading was caused by selinux
denying access to some paths on filesystm and my_require errorously
catching this as permission problem while module was really loading.

This patch did fix it on my system:

--- amavisd.bak 2008-04-29 21:46:51.000000000 +0300
+++ amavisd 2008-04-29 22:18:26.000000000 +0300
@@ -189,7 +189,7 @@
local($_) = $m;
$_ .= /^auto::/ ? '.al' : '.pm' if !m{^/} && !m{\.(pm|pl|al|ix)\z};
s{::}{/}g;
- eval { my_require $_ }
+ eval { require $_ }
or do {
my($eval_stat) = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat;
push(@missing,$m);


With these two changes I got 2.6.0 running on my selinux secured rhel5
based mail server.

--
Tuomo Soini <t...@foobar.fi>
Foobar Linux services
+358 40 5240030
Foobar Oy <http://foobar.fi/>

Bill Landry

unread,
May 22, 2008, 3:20:04 PM5/22/08
to
Mark Martinec wrote:
>>>> Upon further investigation, I found that this still happens here, as
>>>> well: However, for me, the odd things is this only happens when "amavisd
>>>> reload or amavisd stop/start" is executed from within my home directory.
>>>> If executed anywhere outside of my home directory, no errors are seen.
>>>> The only other thing I noticed when executing from within my home
>>>> directory, but again not if executed outside of my home directory, is
>>>> the following entry in my maillog:
>
> It looks like a problem reported to me by Tuomo Soini on Apr 29 2008:
>
>
> Some notes: pid file creation was changes from 2.5.4 to 2.6.0 so that
> 2.6.0 can't open pid file in /var/run any more, pid file must be in dir
> owned by amavis user.
>
> I could work around this by moving amavisd pid to
> /var/run/amavis/amavisd.pid

This shouldn't apply to my setup since I have:

$pid_file = "$MYHOME/amavisd.pid";

in my amavisd.conf. Thus:

ls -l /var/amavis/
total 52
-rw-r----- 1 amavis amavis 0 2008-05-22 11:55 amavisd.lock
-rw-r----- 1 amavis amavis 6 2008-05-22 11:54 amavisd.pid
srwxr-x--- 1 amavis amavis 0 2008-05-22 11:54 amavisd.sock
srwxrwxrwx 1 amavis amavis 0 2008-05-21 14:25 clamd.sock
drwxr-x--- 2 amavis amavis 4096 2008-05-22 11:54 db
drwxr-x--- 2 amavis amavis 4096 2007-12-17 19:19 home
-rw-r--r-- 1 amavis amavis 26 2007-12-18 13:14 local_domains
drwxr-xr-x 2 amavis amavis 4096 2008-05-18 05:27 logs
drwxr-x--- 28 amavis amavis 4096 2008-05-22 11:55 tmp
drwxr-x--- 2 amavis amavis 4096 2007-12-17 19:19 var

> I noticed that problem with perl module loading was caused by selinux
> denying access to some paths on filesystm and my_require errorously
> catching this as permission problem while module was really loading.

This doesn't apply in my setup either, since I have selinux disabled:

sestatus
SELinux status: disabled

> This patch did fix it on my system:

However, with all of that said, this patch did resolve the issue on my
system, as well.

Thanks!

Bill

Max Matslofva

unread,
May 23, 2008, 5:16:21 AM5/23/08
to
Mark Martinec skrev:

> Max and Bill,
>
>> Upon further investigation, I found that this still happens here, as well:
>> However, for me, the odd things is this only happens when "amavisd
>> reload or amavisd stop/start" is executed from within my home directory.
>> If executed anywhere outside of my home directory, no errors are seen.
>> The only other thing I noticed when executing from within my home
>> directory, but again not if executed outside of my home directory, is
>> the following entry in my maillog:
>>
>> May 21 14:28:38 mail amavis[2612]: (!)_DIE: "image_info" is not exported
>> by the Image::Info module\n "dim" is not exported by the Image::Info
>> module\nCan't continue after import errors at
>> /etc/mail/spamassassin/ImageCheck.pm line 7\nBEGIN failed--compilation
>> aborted at /etc/mail/spamassassin/ImageCheck.pm line 7.\n
>>
>> However, if I drop back to amavisd-new-2.5.4, the errors and maillog
>> entry go away, no matter where I execute "amavisd reload or amavisd
>> stop/start" from. Thoughts?
>
> Do you happen to have SpamAssassin or some of Perl modules or plugins
> installed/located in your home directory?
No

[root@smtp /home/maxm]# amavisd reload
Daemon [43625] terminated by SIGTERM, waiting for dust to settle...
becoming a new daemon...
[root@smtp /home/maxm]# cd /root/
[root@smtp ~]# amavisd reload
Daemon [45361] terminated by SIGTERM, waiting for dust to settle...
becoming a new daemon...
[root@smtp ~]# cd /usr/local/etc/mail/spamassassin/
[root@smtp /usr/local/etc/mail/spamassassin]# amavisd reload
Daemon [45370] terminated by SIGTERM, waiting for dust to settle...
becoming a new daemon...
[root@smtp /usr/local/etc/mail/spamassassin]# cd /var/amavis/
[root@smtp /var/amavis]# amavisd reload
Daemon [45377] terminated by SIGTERM, waiting for dust to settle...
becoming a new daemon...
[root@smtp /var/amavis]# cd /root/
[root@smtp ~]# amavisd reload
Daemon [45388] terminated by SIGTERM, waiting for dust to settle...
becoming a new daemon...

I can not reproduce the error again?

Benny Pedersen

unread,
Jun 2, 2008, 5:04:12 AM6/2/08
to

On Thu, May 22, 2008 19:13, Bill Landry wrote:

> aborted at /etc/mail/spamassassin/ImageCheck.pm line 7.\n

where is this module from ?

does it work with 3.2.4 ?


Benny Pedersen
Need more webspace ? http://www.servage.net/?coupon=cust37098

0 new messages