Ad Widget

Collapse

net.tcp.service[smtp] returns "0" even though exim is working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scobowski
    Junior Member
    • May 2022
    • 2

    #1

    net.tcp.service[smtp] returns "0" even though exim is working

    Hello.
    I've found number of similar topics in the forum, however - none of them is solved.

    On one host I got state "0" while checking net.tcp.service[smtp] or net.tcp.service[tcp,,22].

    Enviroment:
    $ exim --version
    Exim version 4.95 Forum built 09-May-2022 12:31:35
    Copyright (c) University of Cambridge, 1995 - 2018
    (c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2020
    Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
    Support for: crypteq IPv6 Perl OpenSSL TLS_resume move_frozen_messages Content_Scanning DKIM DNSSEC Event OCSP PIPE_CONNECT PRDR Experimental_Queue_Ramp TCP_Fast_Open Experimental_SRS
    Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb
    Authenticators: cram_md5 dovecot plaintext spa
    Routers: accept dnslookup ipliteral manualroute queryprogram redirect
    Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
    Malware: f-protd f-prot6d drweb aveserver fsecure kavdaemon sophie clamd mksd avast sock cmdline
    Fixed never_users: 0
    Configure owner: 0:0
    Size of off_t: 8
    2022-05-16 12:11:48 cwd=/root 2 args: exim --version
    Configuration file is /etc/exim.conf

    $ cat /etc/*-release
    ID="generic"
    VERSION="20220328-962"
    PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
    NAME="Debian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"

    $ zabbix_agentd -V
    zabbix_agentd: /usr/local/lib/libcurl.so.4: no version information available (required by zabbix_agentd)
    zabbix_agentd (daemon) (Zabbix) 4.0.40
    Revision 480e9bc7f8d 2 May 2022, compilation time: Apr 29 2022 09:20:45

    Copyright (C) 2022 Zabbix SIA
    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it according to
    the license. There is NO WARRANTY, to the extent permitted by law.

    This product includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit (http://www.openssl.org/).

    Compiled with OpenSSL 1.1.1k 25 Mar 2021
    Running with OpenSSL 1.1.1n 15 Mar 2022

    Tested host accepts connections on tcp ports 25 and 10050 from localhost and from zabbix server;

    [11:29] [email protected]:/root $ telnet 127.0.0.1 25
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
    220 s1.k7.pl ESMTP Exim 4.95 Mon, 16 May 2022 11:30:15 +0200
    QUIT
    221 s1.k7.pl closing connection
    Connection closed by foreign host.

    [11:30] [email protected]:/root $ nc -z -v -w5 127.0.0.1 25
    Connection to 127.0.0.1 25 port [tcp/smtp] succeeded!

    [11:30] [email protected]:/root $ zabbix_get -s 127.0.0.1 -k net.tcp.service[smtp]
    0

    [11:30] [email protected]:/root $ zabbix_get -s 127.0.0.1 -k net.tcp.service[tcp,,25]
    0
    OK, solved;

    Set debug level =4 in agent config, restart agent and check after a minute or so (search log for net.tcp.service) and see few lines later, that something is blocking connection.
    |Make sure, that zabbix_agent can "send mail" via tcp 25
    1748962:20220516:110403.484 Requested [net.tcp.service[smtp,host.ip.addres.v4,25]]
    1748958:20220516:110404.104 __zbx_zbx_setproctitle() title:'collector [processing data]'
    1748958:20220516:110404.104 In update_cpustats()
    1748958:20220516:110404.105 End of update_cpustats()
    1748958:20220516:110404.105 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
    1748964:20220516:110404.111 In send_buffer() host:'my_zabbix_server.domain.name' port:10051 entries:0/100
    1748964:20220516:110404.111 End of send_buffer():SUCCEED
    1748964:20220516:110404.111 __zbx_zbx_setproctitle() title:'active checks Home [idle 1 sec]'
    1748958:20220516:110405.105 __zbx_zbx_setproctitle() title:'collector [processing data]'
    1748958:20220516:110405.105 In update_cpustats()
    1748958:20220516:110405.106 End of update_cpustats()
    1748958:20220516:110405.106 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
    1748964:20220516:110405.111 In send_buffer() host:'my_zabbix_server.domain.name' port:10051 entries:0/100
    1748964:20220516:110405.111 End of send_buffer():SUCCEED
    1748964:20220516:110405.111 __zbx_zbx_setproctitle() title:'active checks Home [idle 1 sec]'
    1748958:20220516:110406.106 __zbx_zbx_setproctitle() title:'collector [processing data]'
    1748958:20220516:110406.106 In update_cpustats()
    1748958:20220516:110406.106 End of update_cpustats()
    1748958:20220516:110406.106 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
    1748964:20220516:110406.111 In send_buffer() host:'my_zabbix_server.domain.name' port:10051 entries:0/100
    1748964:20220516:110406.111 End of send_buffer():SUCCEED
    1748964:20220516:110406.111 __zbx_zbx_setproctitle() title:'active checks Home [idle 1 sec]'
    1748962:20220516:110406.485 TCP expect network error: cannot connect to [[host.ip.addres.v4]:25]: [4] Interrupted system call
    1748962:20220516:110406.485 Sending back [0]
    Last edited by scobowski; 16-05-2022, 15:02. Reason: solution
Working...