You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/08/13 22:32:20 UTC

Re: Error starting spamd

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Sys::Syslog on Solaris has been substantially broken in every version of
perl I've tried.  There's a bug in rt.perl.org somewhere about it,
but it's never been fixed if I recall correctly.

Have you tried with 3.0.0 as a matter of interest?

- --j.

Darryl Baker writes:
> I did notice that the code in those areas is not correct, at least according to the man page for Sys::Syslog
> 
> Excerpt from man page:
> SYNOPSIS
> 	use Sys::Syslog;                          # all except setlogsock, or:
> 	use Sys::Syslog qw(:DEFAULT setlogsock);  # default set, plus setlogsock
> 
> 	setlogsock $sock_type;
> 	openlog $ident, $logopt, $facility;       # don't forget this
> 	syslog $priority, $format, @args;
> 	$oldmask = setlogmask $mask_priority;
> 	closelog;
> 
> So I changed:
> 
> if ($log_facility ne 'stderr') {
>   eval {
>     setlogsock($log_socket);
>     syslog('debug', "spamd starting");  # required to actually open the socket
>   };
> 
>   # Solaris sometimes doesn't support UNIX-domain syslog sockets apparently;
>   # same is true for perl 5.6.0 build on an early version of Red Hat 7!
>   if ($@) {
>     eval {
>       setlogsock('inet');
>       syslog('debug', "spamd starting");
>     };
>     $log_socket = 'inet' unless $@;
>   }
> 
> To:
> 
> if ($log_facility ne 'stderr') {
>   eval {
>     setlogsock($log_socket);
>     openlog("spamd","pid,nowait","mail");
>     syslog('debug', "spamd starting");  # required to actually open the socket
>   };
> 
>   # Solaris sometimes doesn't support UNIX-domain syslog sockets apparently;
>   # same is true for perl 5.6.0 build on an early version of Red Hat 7!
>   if ($@) {
>     eval {
>       setlogsock('inet');
>       openlog("spamd","pid,nowait","mail");
>       syslog('debug', "spamd starting");
>     };
>     $log_socket = 'inet' unless $@;
>   }
> 
> And the new error is:
> unix dgram connect: Socket operation on non-socket at /usr/local/bin/spamd line 283
> getservbyname failed for tcp at /usr/local/bin/spamd line 292
> udp connect: nobody listening at /usr/local/bin/spamd line 292
> failed to setlogsock(unix) on this platform; reporting logs to stderr
> 
> > 
> > On Fri, 2004-08-13 at 10:30, Baker, Darryl wrote:
> > > I figured it must be a perl library problem so I updated all the
> > > related perl libraries.
> > 
> > Yes, that was my next thought.  Initially, I ran SA using Solaris 9 perl
> > and added dependencies via CPAN.  It worked fine.  Now, I have changed
> > to the packages from blastwave.org, since I was very involved in testing
> > their first SA pkg.
> > 
> > Alex
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFBHSVUQTcbUG5Y7woRAg6ZAJ9JfPVoYMF3oZkL5YvSWB6J6SjhcQCdEnkW
M2T0ZD4fsMwU1Bli910OYew=
=xGAb
-----END PGP SIGNATURE-----