NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/49993: inetd: xxx/udp: unknown service



>Number:         49993
>Category:       bin
>Synopsis:       inetd: xxx/udp: unknown service
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 22 12:55:00 +0000 2015
>Originator:     Thomas Schweikle
>Release:        HEAD, Sat Jun 20 20:49:29 CEST 2015
>Organization:
>Environment:
NetBSD test-sct-bsn8-muc 7.99.19 NetBSD 7.99.19 (GENERIC) #33: Sat Jun 20 20:49:29 CEST 2015  jenkins@test-sct-bsn8-muc:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
/etc/services:
[...]
sum                6551/udp
check_mk           6556/tcp
check_mk           6556/udp
xdsxdm             6558/tcp
[...]

/etc/inetd.conf:
[...]
#rquotad/1-2    dgram   rpc/udp wait    root    /usr/libexec/rpc.rquotad rpc.rquotad
#
#       Check_Mk_Agent
#
check_mk        stream  tcp     nowait  root    /usr/pkg/bin/check_mk_agent check_mk_agent
check_mk        stream  udp     nowait  root    /usr/pkg/bin/check_mk_agent check_mk_agent

/etc/rc.conf:
[...]
inetd=YES
[...]

# service inetd start
# ps ax | grep inetd
11851 ?     Is   0:00.00 /usr/sbin/inetd -l
25245 pts/2 R+   0:00.00 grep inetd

# netstat -an | grep -i list
tcp        0      0  127.0.0.1.8081         *.*                    LISTEN
tcp        0      0  *.22                   *.*                    LISTEN
tcp6       0      0  ::1.8081               *.*                    LISTEN
tcp6       0      0  *.22                   *.*                    LISTEN

Missing lines for check_mk!

/var/log/messages:
[...]
Jun 22 14:35:32 test-sct-bsn8-muc inetd[29299]: check_mk/tcp: unknown service
Jun 22 14:35:32 test-sct-bsn8-muc inetd[29299]: check_mk/udp: unknown service

Undefined service??? It *IS* defined!

# /usr/sbin/inetd -d /etc/inetd.conf
ADD : check_mk proto=tcp, wait.max=0.40, user:group=root:(null) builtin=0 server=/usr/pkg/bin/check_mk_agent policy=
ADD : check_mk proto=udp, wait.max=0.40, user:group=root:(null) builtin=0 server=/usr/pkg/bin/check_mk_agent policy=
FREE: check_mk proto=udp, wait.max=0.40, user:group=root:(null) builtin=0 server=/usr/pkg/bin/check_mk_agent policy=
FREE: check_mk proto=tcp, wait.max=0.40, user:group=root:(null) builtin=0 server=/usr/pkg/bin/check_mk_agent policy=

Wow! It adds the service, then removes it again. It seems even the /etc/services entry checm_mk is found and matched!

>How-To-Repeat:
Install NetBSD latest releases or current
Install check_mk_agent into /usr/pkg/bin/check_mk_agent:
# cd /usr/pkg/bin
# cp <download-dir>/check_mk_agent.netbsd check_mk_agent
# chown root:wheel check_mk_agent
# chmod 0755 check_mk_agent
# rehash
# check_mk_agent
[...]

Configure check_mk service:
# echo "check_mk 6556/tcp" >> /etc/services
# echo "check_mk 6556/udp" >> /etc/services

Configure inetd:
# echo "check_mk stream tcp nowait root /usr/pkg/bin/check_mk_agent check_mk_agent" >> /etc/inetd.conf
# echo "check_mk stream udp nowait root /usr/pkg/bin/check_mk_agent check_mk_agent" >> /etc/inetd.conf

Configure rc.conf:
# echo "inetd=YES" >> /etc/rc.conf

(Re)Start inetd:
# service inetd restart

>Fix:
Matching /etc/services and service name given in /etc/inetd.conf seems not to work.



Home | Main Index | Thread Index | Old Index