Problem with syslog and perl

Ask a Question related to AIX, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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.*...
  3. #2

    Default 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

  4. #3

    Default Re: Problem with syslog and perl


    "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 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!
    Are you sure you have tabs as delimiters in /etc/syslog.conf?


    Steve Greatbanks Guest

  5. #4

    Default 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...
    >> 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
    SG> 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!
    SG> Are you sure you have tabs as delimiters in /etc/syslog.conf?

    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

  6. #5

    Default Re: Problem with syslog and perl

    Nicholas Dronen wrote:
    > 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
    >
    I checked the permissions on /dev/log, it's world read/writable. I don't
    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

  7. #6

    Default Re: Problem with syslog and 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 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!
    >
    > 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.

    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

  8. #7

    Default Re: Problem with syslog and perl


    "Nicholas Dronen" <ndronen@io.frii.com> wrote in message
    news:3f67587f$0$62078$75868355@news.frii.net...
    > 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 with
    Perl
    > >> 5.6.1 on AIX 4.3.3:
    > >>
    > >> on our development system everything works fine, all log messages from
    > SG> 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!
    >
    > SG> Are you sure you have tabs as delimiters in /etc/syslog.conf?
    >
    > If that were broken, how would logger work?
    It might be just the syslog entries his program is using that are broken.



    Steve Greatbanks Guest

  9. #8

    Default Re: Problem with syslog and perl


    "Andreas Gaffke" <gaffke@denkunddachte.de> wrote in message
    news:bk7le5$hsk$2@online.de...
    > 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 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!
    > >
    > > 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.
    Have you checked? You might have cut/pasted the entries for that particular
    line in an xterm and converted the tabs to spaces...


    Steve Greatbanks Guest

  10. #9

    Default Re: Problem with syslog and perl

    Andreas Gaffke <gaffke@denkunddachte.de> wrote:
    AG> Nicholas Dronen wrote:
    >> 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> I checked the permissions on /dev/log, it's world read/writable. I don't
    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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139