[syslog-ng]problems: Error creating AF_INET socket (Success)
Christian Hammers
ch@westend.com
Wed, 16 Oct 2002 12:37:45 +0200
Hi
Does someone know why it worked in 1.5.13 and not in 1.5.21?
destination qdb2 { udp("qdb2.westend.com"); };
log { source(src); destination(qdb2); };
(optionally with port(514) but doesn't matter)
# syslog-ng -F -v -d
io.c: Preparing fd 3 for reading
io.c: listening on fd 4
binding fd 5, unixaddr: /dev/log
io.c: listening on fd 5
io.c: connecting using fd 6
Error creating AF_INET socket (Success)
Error initializing configuration, exiting.
The hostname is, according to "host"/"nslookup" correct.
bye,
-christian-
P.S.: Please cc me when replying. thanks.
strace:
24568 execve("/sbin/syslog-ng", ["syslog-ng", "-dddd", "-vvv"], [/* 22 vars */]) = 0
24568 uname({sys="Linux", node="proxy", ...}) = 0
24568 brk(0) = 0x805b7a4
24568 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
24568 open("/etc/ld.so.cache", O_RDONLY) = 3
24568 fstat64(3, {st_mode=S_IFREG|0644, st_size=12877, ...}) = 0
24568 old_mmap(NULL, 12877, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
24568 close(3) = 0
24568 open("/lib/libnsl.so.1", O_RDONLY) = 3
24568 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 ;\0\000"..., 1024) = 1024
24568 fstat64(3, {st_mode=S_IFREG|0644, st_size=69472, ...}) = 0
24568 old_mmap(NULL, 80988, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40018000
24568 mprotect(0x40029000, 11356, PROT_NONE) = 0
24568 old_mmap(0x40029000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0x40029000
24568 old_mmap(0x4002a000, 7260, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4002a00
0
24568 close(3) = 0
24568 open("/lib/libc.so.6", O_RDONLY) = 3
24568 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"..., 1024) = 1024
24568 fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
24568 old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002c000
24568 mprotect(0x4013f000, 40160, PROT_NONE) = 0
24568 old_mmap(0x4013f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x4013f000
24568 old_mmap(0x40145000, 15584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401450
00
24568 close(3) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40149000
24568 munmap(0x40014000, 12877) = 0
24568 brk(0) = 0x805b7a4
24568 brk(0x805b7ec) = 0x805b7ec
24568 brk(0x805c000) = 0x805c000
24568 open("/etc/syslog-ng/syslog-ng.conf", O_RDONLY) = 3
24568 brk(0x8061000) = 0x8061000
24568 ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbffff858) = -1 ENOTTY (Inappropriate ioctl for device)
24568 fstat64(3, {st_mode=S_IFREG|0644, st_size=4970, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
24568 read(3, "#\n# Syslog-ng configuration file"..., 8192) = 4970
24568 read(3, "", 4096) = 0
24568 brk(0x8062000) = 0x8062000
24568 socket(PF_UNIX, SOCK_STREAM, 0) = 4
24568 connect(4, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directo
ry)
24568 close(4) = 0
24568 open("/etc/nsswitch.conf", O_RDONLY) = 4
24568 fstat64(4, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
24568 read(4, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
24568 read(4, "", 4096) = 0
24568 close(4) = 0
24568 munmap(0x40015000, 4096) = 0
24568 open("/etc/ld.so.cache", O_RDONLY) = 4
24568 fstat64(4, {st_mode=S_IFREG|0644, st_size=12877, ...}) = 0
24568 old_mmap(NULL, 12877, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4014a000
24568 close(4) = 0
24568 open("/lib/libnss_compat.so.2", O_RDONLY) = 4
24568 read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\25"..., 1024) = 1024
24568 fstat64(4, {st_mode=S_IFREG|0644, st_size=40152, ...}) = 0
24568 old_mmap(NULL, 43256, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4014e000
24568 mprotect(0x40158000, 2296, PROT_NONE) = 0
24568 old_mmap(0x40158000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x9000) = 0x40158000
24568 close(4) = 0
24568 munmap(0x4014a000, 12877) = 0
24568 uname({sys="Linux", node="proxy", ...}) = 0
24568 open("/etc/passwd", O_RDONLY) = 4
24568 fcntl64(4, F_GETFD) = 0
24568 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
24568 fstat64(4, {st_mode=S_IFREG|0644, st_size=3771, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
24568 _llseek(4, 0, [0], SEEK_CUR) = 0
24568 read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 3771
24568 close(4) = 0
24568 munmap(0x40015000, 4096) = 0
24568 brk(0x8063000) = 0x8063000
24568 socket(PF_UNIX, SOCK_STREAM, 0) = 4
24568 connect(4, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directo
ry)
24568 close(4) = 0
24568 open("/etc/group", O_RDONLY) = 4
24568 fcntl64(4, F_GETFD) = 0
24568 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
24568 fstat64(4, {st_mode=S_IFREG|0644, st_size=539, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
24568 _llseek(4, 0, [0], SEEK_CUR) = 0
24568 read(4, "root:x:0:\ndaemon:x:1:\nbin:x:2:\ns"..., 4096) = 539
24568 close(4) = 0
24568 munmap(0x40015000, 4096) = 0
24568 brk(0x8064000) = 0x8064000
24568 read(3, "", 8192) = 0
24568 ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbffff328) = -1 ENOTTY (Inappropriate ioctl for device)
24568 close(3) = 0
24568 munmap(0x40014000, 4096) = 0
24568 brk(0x8068000) = 0x8068000
24568 socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3
24568 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
24568 fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24568 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
24568 fcntl64(3, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
24568 fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24568 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
24568 brk(0x8069000) = 0x8069000
24568 write(2, "io.c: Preparing fd 3 for reading"..., 33) = 33
24568 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
24568 fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
24568 fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24568 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
24568 write(2, "io.c: listening on fd 4\n", 24) = 24
24568 listen(4, 256) = 0
24568 socket(PF_UNIX, SOCK_DGRAM, 0) = 5
24568 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR)
24568 fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24568 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
24568 write(2, "binding fd 5, unixaddr: /dev/log"..., 33) = 33
24568 stat64("/dev/log", {st_mode=S_IFSOCK|0666, st_size=0, ...}) = 0
24568 unlink("/dev/log") = 0
24568 bind(5, {sin_family=AF_UNIX, path="/dev/log"}, 11) = 0
24568 chown32(0x805fa60, 0, 0) = 0
24568 chmod("/dev/log", 0666) = 0
24568 fcntl64(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
24568 fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24568 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
24568 write(2, "io.c: Preparing fd 5 for reading"..., 33) = 33
24568 socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 6
24568 fcntl64(6, F_GETFL) = 0x2 (flags O_RDWR)
24568 fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24568 fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
24568 write(2, "io.c: connecting using fd 6\n", 28) = 28
24568 gettimeofday({1034764213, 912762}, NULL) = 0
24568 getpid() = 24568
24568 open("/etc/resolv.conf", O_RDONLY) = 7
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=110, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
24568 read(7, "domain westend.com\nsearch westen"..., 4096) = 110
24568 read(7, "", 4096) = 0
24568 close(7) = 0
24568 munmap(0x40014000, 4096) = 0
24568 socket(PF_UNIX, SOCK_STREAM, 0) = 7
24568 connect(7, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directo
ry)
24568 close(7) = 0
24568 open("/etc/ld.so.cache", O_RDONLY) = 7
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=12877, ...}) = 0
24568 old_mmap(NULL, 12877, PROT_READ, MAP_PRIVATE, 7, 0) = 0x40014000
24568 close(7) = 0
24568 open("/lib/libnss_files.so.2", O_RDONLY) = 7
24568 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\35\0\000"..., 1024) = 1024
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=32668, ...}) = 0
24568 brk(0x806a000) = 0x806a000
24568 old_mmap(NULL, 36112, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x40159000
24568 mprotect(0x40161000, 3344, PROT_NONE) = 0
24568 old_mmap(0x40161000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0x7000) = 0x40161000
24568 close(7) = 0
24568 munmap(0x40014000, 12877) = 0
24568 open("/etc/host.conf", O_RDONLY) = 7
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=26, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
24568 read(7, "order hosts,bind\nmulti on\n", 4096) = 26
24568 read(7, "", 4096) = 0
24568 close(7) = 0
24568 munmap(0x40014000, 4096) = 0
24568 open("/etc/hosts", O_RDONLY) = 7
24568 fcntl64(7, F_GETFD) = 0
24568 fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=269, ...}) = 0
24568 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
24568 read(7, "127.0.0.1\tlocalhost\n\n# The follo"..., 4096) = 269
24568 read(7, "", 4096) = 0
24568 close(7) = 0
24568 munmap(0x40014000, 4096) = 0
24568 open("/etc/ld.so.cache", O_RDONLY) = 7
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=12877, ...}) = 0
24568 old_mmap(NULL, 12877, PROT_READ, MAP_PRIVATE, 7, 0) = 0x40014000
24568 close(7) = 0
24568 open("/lib/libnss_dns.so.2", O_RDONLY) = 7
24568 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\r\0\000"..., 1024) = 1024
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=12176, ...}) = 0
24568 old_mmap(NULL, 15144, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x4014a000
24568 mprotect(0x4014d000, 2856, PROT_NONE) = 0
24568 old_mmap(0x4014d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0x2000) = 0x4014d000
24568 close(7) = 0
24568 open("/lib/libresolv.so.2", O_RDONLY) = 7
24568 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\'\0"..., 1024) = 1024
24568 fstat64(7, {st_mode=S_IFREG|0644, st_size=56480, ...}) = 0
24568 old_mmap(NULL, 65312, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x40162000
24568 mprotect(0x4016f000, 12064, PROT_NONE) = 0
24568 old_mmap(0x4016f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0xd000) = 0x4016f000
24568 old_mmap(0x40170000, 7968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4017000
0
24568 close(7) = 0
24568 munmap(0x40014000, 12877) = 0
24568 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
24568 connect(7, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("212.117.68.10")}}, 28) = 0
24568 send(7, "\2158\1\0\0\1\0\0\0\0\0\0\4qdb2\7westend\3com\0\0\1"..., 34, 0) = 34
24568 gettimeofday({1034764213, 937072}, NULL) = 0
24568 poll([{fd=7, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
24568 recvfrom(7, "\2158\201\200\0\1\0\1\0\2\0\2\4qdb2\7westend\3com\0\0\1"..., 1024, 0, {sin_family=AF_INET,
sin_port=htons(53), sin_addr=inet_addr("212.117.68.10")}}, [16]) = 133
24568 close(7) = 0
24568 close(6) = 0
24568 write(2, "Error creating AF_INET socket (S"..., 40) = 40
24568 write(2, "Error initializing configuration"..., 43) = 43
24568 _exit(2) = ?
--
Christian Hammers WESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
ch@westend.com Internet & Security for Professionals Fax 0241/911879
WESTEND ist CISCO Systems Partner - Authorized Reseller