Hi,
I compiled xymon 4.3.17 on Suse 11 distribution successfuly and the server is running. But when I call xymongrep I get the following:
xymon at n1000 > xymongrep test 2014-07-29 09:24:01 Cannot load /opt/xymon/default/server/etc/hosts.cfg, or file is empty
Xymon is installed in /opt/xymon/default/.
The file exists and has the necessery permissions:
-rw-rw-r-- 1 xymon users 1308 2014-07-18 14:45 /opt/xymon/default/server/etc/hosts.cfg
The hosts.cfg is also not empty and worked with Xymon 4.2.3.
With strace I don't see that xymongrep even tries to open the file:
execve("/home/xymon/bin/xymongrep", ["xymongrep", "test"], [/* 53 vars */]) = 0 brk(0) = 0x620000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0f5d000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/opt/xymon/default/instantclient_11_2/tls/x86_64/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/opt/xymon/default/instantclient_11_2/tls/x86_64", 0x7fff9b784f80) = -1 ENOENT (No such file or directory) open("/opt/xymon/default/instantclient_11_2/tls/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/opt/xymon/default/instantclient_11_2/tls", 0x7fff9b784f80) = -1 ENOENT (No such file or directory) open("/opt/xymon/default/instantclient_11_2/x86_64/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/opt/xymon/default/instantclient_11_2/x86_64", 0x7fff9b784f80) = -1 ENOENT (No such file or directory) open("/opt/xymon/default/instantclient_11_2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/opt/xymon/default/instantclient_11_2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=46795, ...}) = 0 mmap(NULL, 46795, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffdf0f51000 close(3) = 0 open("/lib64/librt.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\"\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=47241, ...}) = 0 mmap(NULL, 2132976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffdf0b37000 fadvise64(3, 0, 2132976, POSIX_FADV_WILLNEED) = 0 mprotect(0x7ffdf0b3f000, 2093056, PROT_NONE) = 0 mmap(0x7ffdf0d3e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7ffdf0d3e000 close(3) = 0 open("/opt/xymon/default/instantclient_11_2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib64/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\354\1\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1661568, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0f50000 mmap(NULL, 3528808, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffdf07d9000 fadvise64(3, 0, 3528808, POSIX_FADV_WILLNEED) = 0 mprotect(0x7ffdf092e000, 2093056, PROT_NONE) = 0 mmap(0x7ffdf0b2d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x154000) = 0x7ffdf0b2d000 mmap(0x7ffdf0b32000, 18536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0b32000 close(3) = 0 open("/opt/xymon/default/instantclient_11_2/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib64/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 at Z\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=135690, ...}) = 0 mmap(NULL, 2212736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffdf05bc000 fadvise64(3, 0, 2212736, POSIX_FADV_WILLNEED) = 0 mprotect(0x7ffdf05d3000, 2097152, PROT_NONE) = 0 mmap(0x7ffdf07d3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7ffdf07d3000 mmap(0x7ffdf07d5000, 13184, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffdf07d5000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0f4f000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0f4e000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0f4d000 arch_prctl(ARCH_SET_FS, 0x7ffdf0f4e700) = 0 mprotect(0x7ffdf07d3000, 4096, PROT_READ) = 0 mprotect(0x7ffdf0b2d000, 16384, PROT_READ) = 0 mprotect(0x7ffdf0d3e000, 4096, PROT_READ) = 0 mprotect(0x61a000, 4096, PROT_READ) = 0 mprotect(0x7ffdf0f5e000, 4096, PROT_READ) = 0 munmap(0x7ffdf0f51000, 46795) = 0 set_tid_address(0x7ffdf0f4e9d0) = 12224 set_robust_list(0x7ffdf0f4e9e0, 0x18) = 0 futex(0x7fff9b78584c, FUTEX_WAKE_PRIVATE, 1) = 0 futex(0x7fff9b78584c, 0x189 /* FUTEX_??? */, 1, NULL, 7ffdf0f4e700) = -1 EAGAIN (Resource temporarily unavailable) rt_sigaction(SIGRTMIN, {0x7ffdf05c18b0, [], SA_RESTORER|SA_SIGINFO, 0x7ffdf05cb6a0}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x7ffdf05c1940, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7ffdf05cb6a0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 brk(0) = 0x620000 brk(0x641000) = 0x641000 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(1984), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) select(4, [3], [3], NULL, {15, 0}) = 1 (out [3], left {14, 999998}) getsockopt(3, SOL_SOCKET, SO_ERROR, [72058139498774528], [4]) = 0 write(3, "config hosts.cfg", 16) = 16 shutdown(3, 1 /* send */) = 0 select(4, [3], [], NULL, {15, 0}) = 1 (in [3], left {14, 999998}) recvfrom(3, "", 32767, 0, NULL, NULL) = 0 shutdown(3, 0 /* receive */) = -1 ENOTCONN (Transport endpoint is not connected) shutdown(3, 2 /* send and receive */) = -1 ENOTCONN (Transport endpoint is not connected) close(3) = 0 open("/etc/localtime", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0 fstat(3, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffdf0f5c000 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 4096) = 2309 lseek(3, -1467, SEEK_CUR) = 842 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\t\0\0\0\0"..., 4096) = 1467 close(3) = 0 munmap(0x7ffdf0f5c000, 4096) = 0 write(2, "2014-07-29 09:28:47 ", 202014-07-29 09:28:47 ) = 20 write(2, "Cannot load /opt/xymon/default/s"..., 70Cannot load /opt/xymon/default/server/etc/hosts.cfg, or file is empty ) = 70 exit_group(3) = ?
Actually, instead of opening the file it is trying to get it via network: socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(1984), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) select(4, [3], [3], NULL, {15, 0}) = 1 (out [3], left {14, 999998}) getsockopt(3, SOL_SOCKET, SO_ERROR, [72058139498774528], [4]) = 0 write(3, "config hosts.cfg", 16) = 16
Which does not work as the port is not 1984 but 1988. But why does it try to make network connection and doesn't open the local file. And even then it writes to stdout that it tries to open the file locally but it doesn't.
Thanks in advance for your help.
WK