SNMP [smux_accept] snmptrapd

Solution Unverified - Updated -

Environment

Red Hat Enterprise Linux 6

Issue

  • We keep getting a flood of smux_access messages from the snmptrapd daemon:
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51826
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51827
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51828
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51829
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51830
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51831
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51832
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51833
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51834
Jun 17 21:03:30 server1 snmpd[25855]: [smux_accept] accepted fd 11 from 127.0.0.1:51835
  • Is there a common reason for this error?

Resolution

  • The messages that you are seeing are nothing to be concerned about and do not indicate an error. It is actually an "accepted" message as opposed to an "accept failed" message.

The messages are generated based on the following if/else statement:

if ((fd = accept(sd, (struct sockaddr *) &in_socket, &alen)) < 0) {
     snmp_log_perror("[smux_accept] accept failed");
     return -1;
  } else {
     snmp_log(LOG_INFO, "[smux_accept] accepted fd %d from %s:%d\n",

Diagnostic Steps

[root@server1 ~]# strace -p 25812
Process 25812 attached - interrupt to quit
select(9, [3 5 8], [], [], {3, 975927}^C <unfinished ...>
Process 25812 detached
[root@ops-monitor1-1-crz ~]# strace -p 25812 -f
Process 25812 attached - interrupt to quit
select(9, [3 5 8], [], [], {1, 576331}) = 0 (Timeout)
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\235\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\236\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\237\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\240\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
select(9, [3 5 8], [], [], {5, 0})      = 0 (Timeout)
select(9, [3 5 8], [], [], {5, 0})      = 0 (Timeout)
select(9, [3 5 8], [], [], {4, 904581}) = 0 (Timeout)
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\241\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\242\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0
getsockopt(9, SOL_SOCKET, SO_RCVBUF, [-2315314133655792300], [4]) = 0
sendto(9, "\1\1\0\0\0\0\0\0\0\0\0\0\243\231\365\24<\0\0\0\0\0\0\0\5\4\0\0\1\0\0\0"..., 80, 0, NULL, 0) = 80
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "A\1\3", 65536, 0, NULL, NULL) = 3
select(10, [3 5 8 9], NULL, NULL, {0, 1}) = 1 (in [9], left {0, 0})
recvfrom(9, "", 65536, 0, NULL, NULL)   = 0
close(9)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 9
connect(9, {sa_family=AF_FILE, path="/var/agentx/master"}, 110) = -1 ECONNREFUSED (Connection refused)
close(9)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockopt(9, SOL_SOCKET, SO_SNDBUF, [-2315314133655706600], [4]) = 0

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.