Hey,
i have a problem with policyd-weight.
When i start the service in mail.log are
Mar 4 21:56:43 km22230-05 postfix/policyd-weight[1627]: Daemon terminated.
Mar 4 21:56:46 km22230-05 postfix/policyd-weight[1632]: policyd-weight 0.1.14 beta-14 started and daemonized. conf:/etc/policyd-weight.conf; GID:65534 65534 EGID:65534 65534 UID:65534 EUID:65534; taint mode: 0
Mar 4 21:56:46 km22230-05 postfix/policyd-weight[1632]: warning: cache_query: $csock couln't be created: connect: No such file or directory, calling spawn_cache()
Mar 4 21:56:46 km22230-05 postfix/policyd-weight[1633]: cache spawned
I don't know, it is a bug, but in older versions this message are not show'n on start-up.
Greetz,
Matze
Logged In: YES
user_id=1345210
Originator: NO
If you start policyd-weight and there is no cache instance running then this message will appear. So it is okay in startup-from-fresh-context. If this message appears during run-time, i.e. after "cache spawned" then this might indicate troubles.
Per the discussion here and also in the "duplicate" bug referring to this, the problem I ran into (running 0.1.14.17 from gentoo) was around line 2900, "mkdir $LOCKPATH.'/cache_lock' or return undef;" which would fail consistently after a system crash, because the directory already existed. I still don't know what I did, precisely, to solve the problem, because at some point policyd-weight rmdir'd it and my problem went away... in the middle of debugging it :-(
I changed the relevant lines to:
# avoid races at startups
if( -d $LOCKPATH.'/cache_lock' ) {
mylog(warning=>"cache: directory $LOCKPATH/cache_lock already exists");
return undef;
} else {
mkdir $LOCKPATH.'/cache_lock' or return undef;
}
but, of course, I can't re-create the problem now.