Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 738466 - mail-filter/amavisd-new-2.12.0-r3 - init script needs "need net" depend
Summary: mail-filter/amavisd-new-2.12.0-r3 - init script needs "need net" depend
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ralph Seichter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-22 00:23 UTC by Brenden Walker
Modified: 2020-08-24 14:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brenden Walker 2020-08-22 00:23:21 UTC
I found my system would boot up and Amavisd was unable to bind to 127.0.0.1:10024, it would sometimes bind to ::1 and always created unix socket.

Not having 127.0.0.1:10024 listening broke email filtering.

I was able to duplicate consistently, and restart of the service would properly bind 127.0.0.1

Conclusion was amavisd starting before network was up.  I added net.lo to default runlevel and that didn't help.

Changing init script depend section adding "need net" fixed my issue:

depend() {
  use net logger antivirus snmpd
  need net
  before mta
}
Comment 1 Brian Evans (RETIRED) gentoo-dev 2020-08-22 00:37:18 UTC
If anything, this should "need loopback" IMO as that is what creates 127.0.0.1 and marks it "up".

This may also be a local configuration issue which could go in conf.d/amavisd-new as rc_need=
Comment 2 Ralph Seichter 2020-08-22 01:34:44 UTC
Amavis can be configured to listen using file system based Unix domain sockets only, so it does not "need net". If your local configuration relies on TCP sockets, you can of course modify the depend() function, but that is not something needed by everybody.
Comment 3 Brenden Walker 2020-08-22 01:47:42 UTC
works for me.. I just noticed this and thought it best to report.  There was also an unresolved post on gentoo forums from 2018 with similar symptom, not much action on that so it must not happen to many folks.  Perhaps a side effect of config, vSphere..server load...
Comment 4 Ralph Seichter 2020-08-23 13:01:46 UTC
Brenden, I forgot to ask: Do you perhaps use rc_parallel=YES in your rc.conf?
Comment 5 Brenden Walker 2020-08-24 00:22:53 UTC
rc_parallel was the first thing I checked, set it to =no just in case, that didn't seem to help.
Comment 6 Brenden Walker 2020-08-24 00:46:24 UTC
As a possible further item of interest, I now cannot duplicate the problem, at least reliably.  I have reverted all of my 'hacks' and added an amavisd.start file in local.d with '/etc/init.d/amavisd restart'

My primary concern if having working system at boot, this works around it.

Thanks for the help, unless someone thinks there are changes that could improve this in a sensible way.. I believe this bug can be closed.
Comment 7 Brian Evans (RETIRED) gentoo-dev 2020-08-24 14:15:45 UTC
(In reply to Brenden Walker from comment #6)
> As a possible further item of interest, I now cannot duplicate the problem,
> at least reliably.  I have reverted all of my 'hacks' and added an
> amavisd.start file in local.d with '/etc/init.d/amavisd restart'
> 
> My primary concern if having working system at boot, this works around it.
> 
> Thanks for the help, unless someone thinks there are changes that could
> improve this in a sensible way.. I believe this bug can be closed.

This is most likely overkill and all you need to do is create/edit /etc/conf.d/amavisd and add rc_need="loopback"
Comment 8 Ralph Seichter 2020-08-24 14:27:28 UTC
I suggest to try the method Brian recommended. Alternatively, "after net" works as well and does not generate the same dependencies as "need net".

In any case, I'll close this issue now.