Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
When I start syslogd, it does not create the socket /dev/log. Anyone happen to know why? Here is the output from debug: vortex root # syslogd -d Allocated parts table ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994

    syslogd problems


    When I start syslogd, it does not create the socket /dev/log. Anyone happen to know why? Here is the output from debug:

    vortex root # syslogd -d
    Allocated parts table for 1024 file descriptors.
    Starting.
    Called logerr, msg: network logging disabled (syslog/udp service unknown).
    logmsg: syslog.err<43>, flags 4, from vortex, msg syslogd: network logging disabled (syslog/udp service unknown).
    Called fprintlog, logging to CONSOLE /dev/console
    Called logerr, msg: see syslogd( for details of whether and how to enable it.
    logmsg: syslog.err<43>, flags 4, from vortex, msg syslogd: see syslogd( for details of whether and how to enable it.
    Called fprintlog, logging to CONSOLE /dev/console

    I already checked /etc/sevices to make sure syslog wasn't commented out. This used to work until I rebooted.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Seems strange enough. Sorry, but I've got no idea, but I'd try to ltrace it.

  3. #3
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Dolda, does this line mean anything to you? I assume that function opens /etc/services to get the port correct? I know /etc/services exist and syslog is in it. So for some reason it isn't returning the port number which is causing syslogd to not start. Atleast that is what I think is going on.

    getservbyname("syslog", "udp") = NULL


    Code:
    vortex sysklogd #  grep syslog /etc/services
    syslog          514/udp

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Did a couple more tests. Looks like /etc/protocols work but I couldnt get perl to read return a value with syslog. I tried a couple different services and none of them could return a port number from getservbyname. I am wondering if overly aggresive compile options against glibc could cause this.

    Code:
    vortex sysklogd # perl -e '$udp = getprotobyname&#40;'udp'&#41;; print "$udp\n";'
    17
    vortex sysklogd # perl -e '$syslog = getservbyname&#40;'syslog','udp'&#41;; print "$syslog\n";'

  6. #5
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That just seems impossible. Try recompiling glibc with -g (if you haven't already) and gdb into it.

  7. #6
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    What I don't understand is would say postfix, proftpd. openssh, ect not work as well? I thought for sure they would use that too. Anyway I am off to recompile glibc, hopefuly I can figure this out. I hate not having any logs and lot of mad users because mail is down. Also noticed some of my perl scripts stopped working now too and nis is not working.

  8. #7
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Dolda, would you happen to know why this source won't compile?

    Code:
    vortex root # gcc blah.c
    blah.c&#58; In function `main'&#58;
    blah.c&#58;6&#58; parse error before "se"
    blah.c&#58;5&#58; parm types given both in parmlist and separately
    
    vortex root # cat blah.c
    #include <stdio.h>
    #include <netdb.h>
    int
    main&#40;int argc, char **argv&#41;
           struct servent *se;
           se = getservbyname&#40;argv&#91;1&#93;, argv&#91;2&#93;&#41;;
           printf&#40;"%s\n", se->s_name&#41;;
           return 0;
    &#125;

  9. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Genlee... what have you been smoking this time?
    Quote Originally Posted by genlee
    Code:
    main&#40;int argc, char **argv&#41;
           struct servent *se;
    If you look closely, maybe you'll see something missing here? (Hint: '{')

  10. #9
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Haha, well its been a long day I have been working on this. Mail has been down all day as with syslogd. Anyway I compiled it and it just segfaults but it does work on my workstation. I have no idea what to do now. Looks like a reinstall is my only option left which isn't good cause downtime = lose money.

  11. #10
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, segfaulting would just be natural, since it has already been established that getservbyname will return NULL (which isn't good for the se->s_name dereference).
    There wouldn't be any lines before the syslog entry in /etc/services that are damaged? Have you tried copying /etc/services from another machine?
    Alternatively, have you tried reinstalling glibc?

Page 1 of 2 1 2 LastLast

Posting Permissions

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