NoConnectionToSyslog

From Request Tracker Wiki
Jump to navigation Jump to search

Problem

RT reports error

no connection to syslog available at /opt/machine/perl/lib/site_perl/5.8.2/Log/Dispatch/Syslog.pm line 77

This happens on Solaris, some FreeBSDs and UnixWare 7.

/Older versions of Perl, may segfault at the "Creating system user..." stage of initialize-database instead of reporting the above error./

A related error can occur on FreeBSD with WebExternalAuth (i.e. Apache auth) when Apache is restarted and users try to continue to work with existing sessions. They receive an error page with a stack crawl that starts with:

no connection to syslog available
- stream /dev/conslog is not writable
- console is not writable at /usr/local/lib/perl5/site_perl/5.8.8/Log/Dispatch/Syslog.pm line 71

Solution

In RT 3.0.11, workaround has been added to SiteConfig. It is recommended to edit the config file, rather than changing the RT.pm script. The following text is a description from the config file:

# On Solaris, set to ( socket => 'inet' ).  Options here override any
 # other options RT passes to Log::Dispatch::Syslog.  Other interesting
 # flags include facility and logopt.  (See the Log::Dispatch::Syslog
 # documentation for more information.)  (Maybe ident too, if you have
 # multiple RT installations.)
 
 

To solve a problem add next line to the SiteConfig:

@LogToSyslogConf = ( socket => 'inet' );

Another solution for Solaris is using 'stream' socket

@LogToSyslogConf = ( socket => 'stream' );

You can found more info about possible socket values on the documentation page of the module Sys::Syslog.

A solution for FreeBSD is:

@LogToSyslogConf = ( socket => ('unix', '/var/run/log') );




Solution for RT < 3.0.11

You need to slightly alter how RT tries to connect to syslog.

edit <rt-path>/lib/RT.pm

Find the second instance of stderr => 1

and insert above this:

socket => 'inet',