RTFM 2.0.4 / RT 3.0.4 Syslog error line 77?

I went to the wiki, and tried adding this to RT_SiteConfig.pm, as
Ruslan’s entry suggested:

@LogToSyslogConf = ( socket => ‘inet’ ) unless (@LogToSyslogConf);

Fully stopped (apachectl stop) & started Apache (apachectl startssl),
still getting the error on line 77 of Syslog.pm

I’m running FreeBSD 4.11, Perl 5.8.6, Apache/2.0.53 (FreeBSD) PHP/4.3.10
mod_fastcgi/2.4.2 mod_ssl/2.0.53 OpenSSL/0.9.7e

The errors follow…

Thanks in advance… :-/

Best,
–Glenn

In my httpd-errors.log I’m seeing:
FastCGI: server “/sw/rt/bin/mason_handler.fcgi” stderr: getservbyname
failed for tcp at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77,
referer: http://rt.wingfoot.org/

The error in RT:

error: no connection to syslog available at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77
context:

265: # whether they should generate a full stack trace (confess()
and cluck())
266: # or simply report the caller’s package (croak() and carp()),
respectively.
267: # confess() and croak() die, carp() and cluck() warn.
268:
269: sub croak { die shortmess @_ }
270: sub confess { die longmess @_ }
271: sub carp { warn shortmess @_ }
272: sub cluck { warn longmess @_ }
273:

code stack: /usr/local/lib/perl5/5.8.6/Carp.pm:269
/usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm:436
/usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm:299
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm:77
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Output.pm:41
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm:95
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm:74
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm:22
/sw/rt-3.4.1/lib/RT/FM/ArticleCollection_Overlay.pm:78
/sw/rt-3.4.1/share/html/RTFM/Elements/UpdatedArticles:63
/sw/rt-3.4.1/share/html/RTFM/index.html:26
/sw/rt-3.4.1/share/html/autohandler:215

raw error http://rt.wingfoot.org/RTFM/index.html#raw

The raw error:

no connection to syslog available at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77

Trace begun at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Exceptions.pm line 131
HTML::Mason::Exceptions::rethrow_exception(‘no connection to syslog available at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77^J’) called at /usr/local/lib/perl5/5.8.6/Carp.pm line 269
Carp::croak(‘no connection to syslog available’) called at /usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm line 436
Sys::Syslog::connect at /usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm line 299
Sys::Syslog::syslog(‘DEBUG’, ‘%s’, ‘RT::FM::ArticleCollection Limit called :QUOTEVALUE 0 VALUE LastUpdated FIELD Created OPERATOR !=^J’) called at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77
Log::Dispatch::Syslog::log_message(‘Log::Dispatch::Syslog=HASH(0x952c3c8)’, ‘level’, ‘debug’, ‘name’, ‘syslog’, ‘message’, ‘RT::FM::ArticleCollection Limit called :QUOTEVALUE 0 VALUE LastUpdated FIELD Created OPERATOR !=^J’) called at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Output.pm line 41
Log::Dispatch::Output::log(undef, ‘level’, ‘debug’, ‘name’, ‘syslog’, ‘message’, ‘RT::FM::ArticleCollection Limit called :QUOTEVALUE 0 VALUE LastUpdated FIELD Created OPERATOR !=’) called at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm line 95
Log::Dispatch::_log_to(‘Log::Dispatch=HASH(0x93e1838)’, ‘level’, ‘debug’, ‘name’, ‘syslog’, ‘message’, ‘RT::FM::ArticleCollection Limit called :QUOTEVALUE 0 VALUE LastUpdated FIELD Created OPERATOR !=’) called at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm line 74
Log::Dispatch::log(‘Log::Dispatch=HASH(0x93e1838)’, ‘level’, ‘debug’, ‘message’, ‘RT::FM::ArticleCollection Limit called :QUOTEVALUE 0 VALUE LastUpdated FIELD Created OPERATOR !=’) called at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm line 22
Log::Dispatch::ANON(‘Log::Dispatch=HASH(0x93e1838)’, ‘RT::FM::ArticleCollection Limit called :QUOTEVALUE 0 VALUE LastUpdated FIELD Created OPERATOR !=’) called at /sw/rt-3.4.1/lib/RT/FM/ArticleCollection_Overlay.pm line 78
RT::FM::ArticleCollection::Limit(‘RT::FM::ArticleCollection=HASH(0x99d6cc4)’, ‘FIELD’, ‘Created’, ‘OPERATOR’, ‘!=’, ‘VALUE’, ‘LastUpdated’, ‘QUOTEVALUE’, 0) called at /sw/rt-3.4.1/share/html/RTFM/Elements/UpdatedArticles line 63
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x99f4b74)’) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef) called at /sw/rt-3.4.1/share/html/RTFM/index.html line 26
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x99c0494)’) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 760
HTML::Mason::Request::call_next(‘HTML::Mason::Request::CGI=HASH(0x998362c)’) called at /sw/rt-3.4.1/share/html/autohandler line 215
HTML::Mason::Commands::ANON at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x95cab8c)’) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1069
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::CGI=HASH(0x998362c)’) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/CGIHandler.pm line 197
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/CGIHandler.pm line 197
HTML::Mason::Request::CGI::exec(‘HTML::Mason::Request::CGI=HASH(0x998362c)’) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Interp.pm line 216
HTML::Mason::Interp::exec(undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/CGIHandler.pm line 127
eval {…} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/CGIHandler.pm line 127
HTML::Mason::CGIHandler::_handler(‘HTML::Mason::CGIHandler=HASH(0x937cd3c)’, ‘HASH(0x96f00ec)’) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/CGIHandler.pm line 76
HTML::Mason::CGIHandler::handle_cgi_object(‘HTML::Mason::CGIHandler=HASH(0x937cd3c)’, ‘CGI::Fast=HASH(0x99a9fac)’) called at /sw/rt/bin/mason_handler.fcgi line 76

eval {…} at /sw/rt/bin/mason_handler.fcgi line 76

“They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.”
~Benjamin Franklin, Historical Review of Pennsylvania, 1759

Glenn Sieb said the following on 3/16/2005 12:20 AM:

I went to the wiki, and tried adding this to RT_SiteConfig.pm, as
Ruslan’s entry suggested:

Sorry–it’s late.

This is happening when I’m trying to add an article (which I have rights
to do) to a class.

Best,
–Glenn

“They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.”
~Benjamin Franklin, Historical Review of Pennsylvania, 1759

@LogToSyslogConf = ( socket => ‘inet’ ) unless (@LogToSyslogConf);

getservbyname failed for tcp at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77,

Is /etc/services available to Apache? Does it list “syslog 514/udp”? Is
your syslog daemon listening on port 514 for UDP traffic?

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
“How do they grow seedless grapefruit trees?”

@LogToSyslogConf = ( socket => ‘inet’ ) unless (@LogToSyslogConf);

Fully stopped (apachectl stop) & started Apache (apachectl startssl),
still getting the error on line 77 of Syslog.pm

I’m running FreeBSD 4.11, Perl 5.8.6, Apache/2.0.53 (FreeBSD) PHP/4.3.10
mod_fastcgi/2.4.2 mod_ssl/2.0.53 OpenSSL/0.9.7e

The errors follow…

Thanks in advance… :-/

Best,
–Glenn

In my httpd-errors.log I’m seeing:
FastCGI: server “/sw/rt/bin/mason_handler.fcgi” stderr: getservbyname
failed for tcp at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77,
referer: http://rt.wingfoot.org/

That syntax “getservbyname failed for tcp” sounds suspicious to me.
I think you have a syntax error in some configuration file somewhere,
where “tcp” or “/tcp” appears and it isn’t necessary.

The error in RT:

error: no connection to syslog available at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77
context:

265: # whether they should generate a full stack trace (confess()
and cluck())
266: # or simply report the caller’s package (croak() and carp()),
respectively.
267: # confess() and croak() die, carp() and cluck() warn.
268:
269: sub croak { die shortmess @_ }
270: sub confess { die longmess @_ }
271: sub carp { warn shortmess @_ }
272: sub cluck { warn longmess @_ }
273:

code stack: /usr/local/lib/perl5/5.8.6/Carp.pm:269
/usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm:436
/usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm:299
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm:77
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Output.pm:41
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm:95
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm:74
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch.pm:22
/sw/rt-3.4.1/lib/RT/FM/ArticleCollection_Overlay.pm:78
/sw/rt-3.4.1/share/html/RTFM/Elements/UpdatedArticles:63
/sw/rt-3.4.1/share/html/RTFM/index.html:26
/sw/rt-3.4.1/share/html/autohandler:215

raw error http://rt.wingfoot.org/RTFM/index.html#raw

The raw error:

no connection to syslog available at /usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77

Trace begun at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Exceptions.pm line 131
[ … ]
Sys::Syslog::connect at /usr/local/lib/perl5/5.8.6/mach/Sys/Syslog.pm line 299
[ … ]

That line there is the culprit: Sys::Syslog ought to throw a more
useful error.

Check your syslogd.conf file; see if there’s something hincky in there.
Also your /etc/services file. And make sure syslogd is a) running and
b) listening on the right ports (and fifos). It’s possible that your
syslog is not listening to TCP at all, and that RT is the only app
not trying to use a fifo to talk to it…

Cheers,
– jra
Jay R. Ashworth jra@baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274

  If you can read this... thank a system adminstrator.  Or two.  --me

Russell Mosemann said the following on 3/16/2005 7:40 AM:>On Wed, 16 Mar 2005, Glenn Sieb wrote:

@LogToSyslogConf = ( socket => ‘inet’ ) unless (@LogToSyslogConf);

getservbyname failed for tcp at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77,

Is /etc/services available to Apache? Does it list “syslog 514/udp”? Is
your syslog daemon listening on port 514 for UDP traffic?

Hi Russell… last I checked syslog was working fine. I don’t understand
why this would just suddenly “stop” working.

$ ls -lad services
-rw-r–r-- 1 root wheel 73414 Jan 14 03:35 services
$ grep 514 services
shell 514/tcp cmd #like exec, but automatic
syslog 514/udp
fujitsu-dtcns 1514/tcp #Fujitsu Systems Business of America, Inc
fujitsu-dtcns 1514/udp #Fujitsu Systems Business of America, Inc
rmonitor_secure 5145/tcp
rmonitor_secure 5145/udp

The only thing here that might be odd is when I do a netstat -a:

$ netstat -a | grep syslog
udp4 0 0 localhost.1221 localhost.syslog

$ netstat -a | grep 514
udp4 0 0 *.2514 .
e4b350a0 stream 0 0 0 e4b35140 0 0
e4b35140 stream 0 0 0 e4b350a0 0 0

But again… why the heck would this just stop working suddenly? :-/

I’m currently updating Bundle::CPAN and then I’ll rebuild Sys::Syslog
and such.

Thanks for replying!
Best,
–Glenn
“They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.”
~Benjamin Franklin, Historical Review of Pennsylvania, 1759

Jay R. Ashworth said the following on 3/16/2005 10:47 AM:

In my httpd-errors.log I’m seeing:
FastCGI: server “/sw/rt/bin/mason_handler.fcgi” stderr: getservbyname
failed for tcp at
/usr/local/lib/perl5/site_perl/5.8.6/Log/Dispatch/Syslog.pm line 77,
referer: http://rt.wingfoot.org/

That syntax “getservbyname failed for tcp” sounds suspicious to me.
I think you have a syntax error in some configuration file somewhere,
where “tcp” or “/tcp” appears and it isn’t necessary.

Ok… given I’ve not touched any config files in a while, why is this
suddenly changing?

In /etc/rc.conf:
syslogd_enable=“YES”
syslogd_flags=“-s -s -l /chroot/named/dev/log”

in /etc/syslog.conf:

$FreeBSD: src/etc/syslog.conf,v 1.13.2.4 2003/05/12 13:59:23 yar Exp $

Spaces ARE valid field separators in this file. However,

other *nix-like systems still insist on using tabs as field

separators. If you are sharing this file between systems, you

may want to use only tabs as field separators here.

Consult the syslog.conf(5) manpage.

.err;kern.debug;auth.notice;mail.crit /dev/console
.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err
/var/log/message
s
security.
/var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
cron.
/var/log/cron
*.emerg *

uncomment this to log all writes to /dev/console to /var/log/console.log

#console.info /var/log/console.log

uncomment this to enable logging of all log messages to /var/log/all.log

touch /var/log/all.log and chmod it to mode 600 before it will work

#. /var/log/all.log

uncomment this to enable logging to a remote loghost named loghost

#. @loghost

uncomment these if you’re running inn

news.crit /var/log/news/news.crit

news.err /var/log/news/news.err

news.notice /var/log/news/news.notice

!startslip
. /var/log/slip.log
!ppp
. /var/log/ppp.log

And honestly, I don’t know where else to check.

I’ve always run syslog in -s -s mode (as in the past 4 years, it’s how I
installed this box originally, and I’ve certainly run various RT
versions over those years). Why would Log::Syslog care about that all of
a sudden? :-/

Changing to these settings in RT_SiteConfig.pm:
Set($LogToSyslog , undef);
Set($LogToScreen , undef);
Set($LogToFile , ‘debug’);
Set($LogDir, ‘/sw/rt/var/log’);
Set($LogToFileNamed , “rt.log”); #log to rt.log

And commenting out the @LogToSyslogConf line in RT_SiteConfig.pm has
done the trick.

I can live with logging to a file. But it is odd how suddenly this would
be an issue with syslog…?

Anyway, thanks everyone!!

Best,
–Glenn

“They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.”
~Benjamin Franklin, Historical Review of Pennsylvania, 1759

I’ve always run syslog in -s -s mode (as in the past 4 years, it’s how I
installed this box originally, and I’ve certainly run various RT
versions over those years). Why would Log::Syslog care about that all of
a sudden? :-/

Well, since you can get

“They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.”
~Benjamin Franklin, Historical Review of Pennsylvania, 1759

the quote correct, I’ll take one more stab at it. :slight_smile:

It’s unreasonably hard to google for Log::Syslog, but I did find it
using CPAN’s own search… and I’m not seeing much.

The lsof output did look like it was listening on a TCP/UDP port… but
it would usually be UDP, IIRC, and your message says TCP explicitly.

Do you have logger(8) on your machine? Does it debug?

Cheers,
– jra
Jay R. Ashworth jra@baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274

  If you can read this... thank a system adminstrator.  Or two.  --me