benningm / mtpolicyd

a modular policy daemon for postfix
21 stars 3 forks source link

v2.01 Can't locate object method "servers" #15

Closed LuckyFellow closed 8 years ago

LuckyFellow commented 8 years ago

When redis usage is setup, then starting mtpolicyd: /usr/local/bin/mtpolicyd -f keeps outputting the error: Can't locate object method "servers" via package "Mail::MtPolicyd::Connection::Redis" at /usr/local/share/perl/5.20.2/Mail/MtPolicyd/Connection/Redis.pm line 20.

in file: /usr/local/share/perl/5.20.2/Mail/MtPolicyd/Connection/Redis.pm Line 20 is: 'server' => $self->servers, and assumingly should be: 'server' => $self->server,

LuckyFellow commented 8 years ago

The previously mentione change is wrong. Instead line 13 needs to be changed from: has 'server' => ( is => 'ro', isa => 'Str', default => '127.0.0.1:6379' ); to: has 'servers' => ( is => 'ro', isa => 'Str', default => '127.0.0.1:6379' );

LuckyFellow commented 8 years ago

The commited fix is the wrong one. Please see my previous comment :

The previously mentione change is wrong. Instead line 13 needs to be changed from: has 'server' => ( is => 'ro', isa => 'Str', default => '127.0.0.1:6379' ); to: has 'servers' => ( is => 'ro', isa => 'Str', default => '127.0.0.1:6379' );

Currently it would be required to define "server" in a redis connection block, instead of "servers" as in all other connection blocks.

benningm commented 8 years ago

The redis parameter allows only a single server. The memcached parameter takes as comma separated list.

No other connection module has a "servers" parameter. In LDAP its "host", "port" and in SQL it's "dsn"