Ask a Question related to AIX, Design and Development.
-
Andreas Gaffke #1
Problem with syslog and perl
Hi all,
I'm pondering on a strange problem using the Sys::Syslog module with Perl
5.6.1 on AIX 4.3.3:
on our development system everything works fine, all log messages from perl
appear where I expect them.
On our testing and production machines (both HACMP clustered machines), no
log mesages at all are written. I've already checked the syslog.conf file,
but didn't find anything. The 'logger' command works fine on all systems.
I've even tried running syslogd in debugging mode but it shows no reaction
when trying to write messages from perl.
Has anyone run across such a problem? I think it has something to do with
the HACMP environment (this is the only difference between our development
machine and the others...)
Any help is gladly appreciated!
Thanks,
Andreas
--
-----------------------------------------------------------
Dr. Andreas Gaffke
denk & dachte Software GmbH
e-Mail: [email]gaffke@denkunddachte.de[/email]
[url]http://www.denkunddachte.de[/url]
-----------------------------------------------------------
Andreas Gaffke Guest
-
Sys::Syslog
Hi, When I upgraded perl 8.8.0 (Sys::Syslog 0.3) to perl 8.8.8 (Sys::Syslog 0.13) on my Solaris 9 box, the hostname in the syslog entries changed... -
Sys:Syslog
Hi - I'm having trouble logging to syslog on my Linux (Sorcerer) machine with perl 8.0.2 installed. This script logs nothing: #!/usr/bin/perl... -
Syslog question
Hi, I need to log any successful or failed logon to my Solaris box. Maybe by default it is doing by OS, however since I am new in UNIX, can... -
syslog truncate
Hi, I am interested if it is safe to truncate syslog (it contains data for last 3 years since the server was installed and it is over 23Mb). Is... -
creating different syslog file /var/log/syslog.0 /var/log/syslog.1...
Hi, I see different syslog files under /var/log/ /var/log/syslog.0 /var/log/syslog.1 Could anyone tell me whats the difference between syslog.*... -
Nicholas Dronen #2
Re: Problem with syslog and perl
Andreas Gaffke <gaffke@denkunddachte.de> wrote:
AG> Hi all,
AG> I'm pondering on a strange problem using the Sys::Syslog module with Perl
AG> 5.6.1 on AIX 4.3.3:
AG> on our development system everything works fine, all log messages from perl
AG> appear where I expect them.
AG> On our testing and production machines (both HACMP clustered machines), no
AG> log mesages at all are written. I've already checked the syslog.conf file,
AG> but didn't find anything. The 'logger' command works fine on all systems.
AG> I've even tried running syslogd in debugging mode but it shows no reaction
AG> when trying to write messages from perl.
AG> Has anyone run across such a problem? I think it has something to do with
AG> the HACMP environment (this is the only difference between our development
AG> machine and the others...)
AG> Any help is gladly appreciated!
Are you invoking Sys::Syslog's setlogsock? If not, according to
the perldoc, the module will try to connect to syslogd with these
protocols, in this order: tcp, udp, unix, stream, console.
TCP will probably fail. UDP might succeed, perhaps depending on
your configuration. The UNIX socket should succeed, unless the
mode of the socket in /dev or whever AIX keeps it is too restrictive
for the uid under which your perl process runs. Be sure to check
the mode of that file.
Regards,
Nicholas
--
"Why shouldn't I top-post?" [url]http://www.aglami.com/tpfaq.html[/url]
"Meanings are another story." [url]http://www.ifas.org/wa/glossolalia.html[/url]
Nicholas Dronen Guest
-
Steve Greatbanks #3
Re: Problem with syslog and perl
"Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
news:bk549k$gha$1@online.de...perl> Hi all,
>
> I'm pondering on a strange problem using the Sys::Syslog module with Perl
> 5.6.1 on AIX 4.3.3:
>
> on our development system everything works fine, all log messages fromAre you sure you have tabs as delimiters in /etc/syslog.conf?> appear where I expect them.
> On our testing and production machines (both HACMP clustered machines), no
> log mesages at all are written. I've already checked the syslog.conf file,
> but didn't find anything. The 'logger' command works fine on all systems.
> I've even tried running syslogd in debugging mode but it shows no reaction
> when trying to write messages from perl.
>
> Has anyone run across such a problem? I think it has something to do with
> the HACMP environment (this is the only difference between our development
> machine and the others...)
>
> Any help is gladly appreciated!
Steve Greatbanks Guest
-
Nicholas Dronen #4
Re: Problem with syslog and perl
Steve Greatbanks <steve_greatbanks@hotmail.com> wrote:
SG> "Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
SG> news:bk549k$gha$1@online.de...SG> perl>> Hi all,
>>
>> I'm pondering on a strange problem using the Sys::Syslog module with Perl
>> 5.6.1 on AIX 4.3.3:
>>
>> on our development system everything works fine, all log messages fromSG> Are you sure you have tabs as delimiters in /etc/syslog.conf?>> appear where I expect them.
>> On our testing and production machines (both HACMP clustered machines), no
>> log mesages at all are written. I've already checked the syslog.conf file,
>> but didn't find anything. The 'logger' command works fine on all systems.
>> I've even tried running syslogd in debugging mode but it shows no reaction
>> when trying to write messages from perl.
>>
>> Has anyone run across such a problem? I think it has something to do with
>> the HACMP environment (this is the only difference between our development
>> machine and the others...)
>>
>> Any help is gladly appreciated!
If that were broken, how would logger work?
Regards,
Nicholas
--
"Why shouldn't I top-post?" [url]http://www.aglami.com/tpfaq.html[/url]
"Meanings are another story." [url]http://www.ifas.org/wa/glossolalia.html[/url]
Nicholas Dronen Guest
-
Andreas Gaffke #5
Re: Problem with syslog and perl
Nicholas Dronen wrote:
I checked the permissions on /dev/log, it's world read/writable. I don't> Andreas Gaffke <gaffke@denkunddachte.de> wrote:
> AG> Hi all,
>
> AG> I'm pondering on a strange problem using the Sys::Syslog module with
> Perl AG> 5.6.1 on AIX 4.3.3:
>
> AG> on our development system everything works fine, all log messages from
> perl AG> appear where I expect them.
> AG> On our testing and production machines (both HACMP clustered
> machines), no AG> log mesages at all are written. I've already checked the
> syslog.conf file, AG> but didn't find anything. The 'logger' command works
> fine on all systems. AG> I've even tried running syslogd in debugging mode
> but it shows no reaction AG> when trying to write messages from perl.
>
> AG> Has anyone run across such a problem? I think it has something to do
> with AG> the HACMP environment (this is the only difference between our
> development AG> machine and the others...)
>
> AG> Any help is gladly appreciated!
>
> Are you invoking Sys::Syslog's setlogsock? If not, according to
> the perldoc, the module will try to connect to syslogd with these
> protocols, in this order: tcp, udp, unix, stream, console.
>
> TCP will probably fail. UDP might succeed, perhaps depending on
> your configuration. The UNIX socket should succeed, unless the
> mode of the socket in /dev or whever AIX keeps it is too restrictive
> for the uid under which your perl process runs. Be sure to check
> the mode of that file.
>
> Regards,
>
> Nicholas
>
think it's permissions problem since the 'logger' command works fine.
Here is the code I use for testing:
---<snip>---
use Sys::Syslog qw(:DEFAULT setlogsock);
setlogsock 'unix';
openlog 'UHU', 'nowait', 'local1';
syslog 'err', '%s', 'oi, ein fehler...';
closelog;
---<snip>---
As I said, this code logs ok on the non-HACMP machine, but does not log
anything on the clustered machines...
Regards,
Andreas
--
-----------------------------------------------------------
Dr. Andreas Gaffke
denk & dachte Software GmbH
e-Mail: [email]gaffke@denkunddachte.de[/email]
[url]http://www.denkunddachte.de[/url]
-----------------------------------------------------------
Andreas Gaffke Guest
-
Andreas Gaffke #6
Re: Problem with syslog and perl
Steve Greatbanks wrote:
It's not a problem with syslog.conf because other log sources work fine.>
> "Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
> news:bk549k$gha$1@online.de...> perl>> Hi all,
>>
>> I'm pondering on a strange problem using the Sys::Syslog module with Perl
>> 5.6.1 on AIX 4.3.3:
>>
>> on our development system everything works fine, all log messages from>>> appear where I expect them.
>> On our testing and production machines (both HACMP clustered machines),
>> no log mesages at all are written. I've already checked the syslog.conf
>> file, but didn't find anything. The 'logger' command works fine on all
>> systems. I've even tried running syslogd in debugging mode but it shows
>> no reaction when trying to write messages from perl.
>>
>> Has anyone run across such a problem? I think it has something to do with
>> the HACMP environment (this is the only difference between our
>> development machine and the others...)
>>
>> Any help is gladly appreciated!
> Are you sure you have tabs as delimiters in /etc/syslog.conf?
Regards,
Andreas
--
-----------------------------------------------------------
Dr. Andreas Gaffke
denk & dachte Software GmbH
e-Mail: [email]gaffke@denkunddachte.de[/email]
[url]http://www.denkunddachte.de[/url]
-----------------------------------------------------------
Andreas Gaffke Guest
-
Steve Greatbanks #7
Re: Problem with syslog and perl
"Nicholas Dronen" <ndronen@io.frii.com> wrote in message
news:3f67587f$0$62078$75868355@news.frii.net...Perl> Steve Greatbanks <steve_greatbanks@hotmail.com> wrote:
>
> SG> "Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
> SG> news:bk549k$gha$1@online.de...> >> Hi all,
> >>
> >> I'm pondering on a strange problem using the Sys::Syslog module withno> SG> perl> >> 5.6.1 on AIX 4.3.3:
> >>
> >> on our development system everything works fine, all log messages from> >> appear where I expect them.
> >> On our testing and production machines (both HACMP clustered machines),file,> >> log mesages at all are written. I've already checked the syslog.confsystems.> >> but didn't find anything. The 'logger' command works fine on allreaction> >> I've even tried running syslogd in debugging mode but it shows nowith> >> when trying to write messages from perl.
> >>
> >> Has anyone run across such a problem? I think it has something to dodevelopment> >> the HACMP environment (this is the only difference between ourIt might be just the syslog entries his program is using that are broken.>> >> machine and the others...)
> >>
> >> Any help is gladly appreciated!
> SG> Are you sure you have tabs as delimiters in /etc/syslog.conf?
>
> If that were broken, how would logger work?
Steve Greatbanks Guest
-
Steve Greatbanks #8
Re: Problem with syslog and perl
"Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
news:bk7le5$hsk$2@online.de...Perl> Steve Greatbanks wrote:
>> >
> > "Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
> > news:bk549k$gha$1@online.de...> >> Hi all,
> >>
> >> I'm pondering on a strange problem using the Sys::Syslog module withwith> > perl> >> 5.6.1 on AIX 4.3.3:
> >>
> >> on our development system everything works fine, all log messages from> >> appear where I expect them.
> >> On our testing and production machines (both HACMP clustered machines),
> >> no log mesages at all are written. I've already checked the syslog.conf
> >> file, but didn't find anything. The 'logger' command works fine on all
> >> systems. I've even tried running syslogd in debugging mode but it shows
> >> no reaction when trying to write messages from perl.
> >>
> >> Has anyone run across such a problem? I think it has something to doHave you checked? You might have cut/pasted the entries for that particular>> >> >> the HACMP environment (this is the only difference between our
> >> development machine and the others...)
> >>
> >> Any help is gladly appreciated!
> > Are you sure you have tabs as delimiters in /etc/syslog.conf?
> It's not a problem with syslog.conf because other log sources work fine.
line in an xterm and converted the tabs to spaces...
Steve Greatbanks Guest
-
Nicholas Dronen #9
Re: Problem with syslog and perl
Andreas Gaffke <gaffke@denkunddachte.de> wrote:
AG> Nicholas Dronen wrote:
AG> I checked the permissions on /dev/log, it's world read/writable. I don't>> Andreas Gaffke <gaffke@denkunddachte.de> wrote:
>> AG> Hi all,
>>
>> AG> I'm pondering on a strange problem using the Sys::Syslog module with
>> Perl AG> 5.6.1 on AIX 4.3.3:
>>
>> AG> on our development system everything works fine, all log messages from
>> perl AG> appear where I expect them.
>> AG> On our testing and production machines (both HACMP clustered
>> machines), no AG> log mesages at all are written. I've already checked the
>> syslog.conf file, AG> but didn't find anything. The 'logger' command works
>> fine on all systems. AG> I've even tried running syslogd in debugging mode
>> but it shows no reaction AG> when trying to write messages from perl.
>>
>> AG> Has anyone run across such a problem? I think it has something to do
>> with AG> the HACMP environment (this is the only difference between our
>> development AG> machine and the others...)
>>
>> AG> Any help is gladly appreciated!
>>
>> Are you invoking Sys::Syslog's setlogsock? If not, according to
>> the perldoc, the module will try to connect to syslogd with these
>> protocols, in this order: tcp, udp, unix, stream, console.
>>
>> TCP will probably fail. UDP might succeed, perhaps depending on
>> your configuration. The UNIX socket should succeed, unless the
>> mode of the socket in /dev or whever AIX keeps it is too restrictive
>> for the uid under which your perl process runs. Be sure to check
>> the mode of that file.
AG> think it's permissions problem since the 'logger' command works fine.
I don't have access to AIX boxes this days. I thought it might
yield something, as logger might be suid root.
AG> Here is the code I use for testing:
AG> ---<snip>---
AG> use Sys::Syslog qw(:DEFAULT setlogsock);
AG> setlogsock 'unix';
AG> openlog 'UHU', 'nowait', 'local1';
AG> syslog 'err', '%s', 'oi, ein fehler...';
AG> closelog;
AG> ---<snip>---
AG> As I said, this code logs ok on the non-HACMP machine, but does not log
AG> anything on the clustered machines...
Does AIX respect loghost in /etc/hosts?
Regards,
Nicholas
--
"Why shouldn't I top-post?" [url]http://www.aglami.com/tpfaq.html[/url]
"Meanings are another story." [url]http://www.ifas.org/wa/glossolalia.html[/url]
Nicholas Dronen Guest



Reply With Quote

