Linux system log avahi-daemon[3733]: Invalid query packet

简介:

在检查Linux的日志文件时,发现大量 avahi-daemon[3733]: Invalid query packet错误(不同服务器对应的数字有所不同)

1
2
3
4
5
6
7
8
9
10
11
12
13
Aug  3 11:55:38  hostname  last message repeated 8  times
Aug  3 13:13:15  hostname  last message repeated 8  times
Aug  3 13:18:26  hostname  last message repeated 8  times
Aug  3 13:50:10  hostname  last message repeated 7  times
Aug  3 13:58:21  hostname  last message repeated 24  times
Aug  3 14:29:48  hostname  last message repeated 20  times
Aug  3 14:35:45  hostname  last message repeated 8  times
Aug  3 14:36:49  hostname  last message repeated 14  times
Aug  3 14:48:23  hostname  last message repeated 9  times
Aug  3 16:02:28  hostname  last message repeated 6  times
Aug  3 16:03:30  hostname  last message repeated 10  times
Aug  3 16:06:30  hostname  last message repeated 14  times
Aug  3 16:20:00  hostname  last message repeated 8  times

clip_image001

avahi-daemon是一种Linux操作系统上运行在客户机上实施查找基于网络的Zeroconf service的服务守护进程。 该服务可以为Zeroconf网络实现DNS服务发现及DNS组播规范。 用户程序通过Linux D-Bus信息传递接收发现到网络服务和资源的通知。该守护进程配合缓存用户程序的答复,以帮助减少因答复而产生的网络流量。
网上搜索到一些资料显示说这个是一个bug来的(请见参考资料),我检查了手头上所有RHEL 5.7版本的Linux服务器,几乎都有上面错误信息。网上有网友建议:除非你有兼容的设备或使用 zeroconf 协议的服务,否则应该关闭它。

root@DB-Server log]# service avahi-daemon status
Avahi daemon is running
[root@DB-Server log]# service avahi-daemon stop
Shutting down Avahi daemon: [  OK  ]
[root@DB-Server log]# chkconfig --list |grep avahi-daemon
avahi-daemon    0:off   1:off   2:off   3:on    4:on    5:on    6:off
[root@DB-Server log]# chkconfig avahi-daemon off
[root@DB-Server log]# chkconfig --list |grep avahi-daemon
avahi-daemon    0:off   1:off   2:off   3:off   4:off   5:off   6:off

另外,在rhel5-guide-i731.pdf文档里面,也建议关闭此服务:如果可以话,尽量禁用Avahi服务。因为这样可以减少网络攻击。如下所示:

3.7.1 Disable Avahi Server if Possible
Because the Avahi daemon service keeps an open network port, it is subject to network attacks. Disabling it is
particularly important to reduce the system's vulnerability to such attacks.
3.7.1.1 Disable Avahi Server Software
Issue the command:
# chkconfig avahi-daemon off
3.7.1.2 Remove Avahi Server iptables Firewall Exception
Edit the files /etc/sysconfig/iptables and /etc/sysconfig/ip6tables (if IPv6 is in use). In each file, locate and delete the line:
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
By default, inbound connections to Avahi’s port are allowed. If the Avahi server is not being used, this exception
should be removed from the firewall configuration. See Section 2.5.5 for more information about the Iptables firewall.
参考资料:
http://blog.csdn.net/zhaojian1988/article/details/9214673
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/500365
http://www.question-defense.com/2010/09/15/centos-linux-avahi-error-avahi-daemon2699-invalid-query-packet




本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1740378
相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
17天前
|
Linux Shell
Linux手动清理Linux脚本日志定时清理日志和log文件执行表达式
Linux手动清理Linux脚本日志定时清理日志和log文件执行表达式
71 1
|
3月前
|
安全 Linux 数据安全/隐私保护
【Linux】文件服务CIFS(Common Internet File System)
【Linux】文件服务CIFS(Common Internet File System)
45 0
|
3月前
|
存储 监控 网络协议
【Linux】文件服务NFS(Network File System)
【Linux】文件服务NFS(Network File System)
34 0
|
27天前
|
监控 Shell Linux
【Shell 命令集合 系统管理 】Linux 自动轮转(log rotation)日志文件 logrotate命令 使用指南
【Shell 命令集合 系统管理 】Linux 自动轮转(log rotation)日志文件 logrotate命令 使用指南
48 0
|
6月前
|
Linux
百度搜索:蓝易云 ,Linux系统查看log日志命令详解!
通过使用以上命令,您可以方便地查看和搜索Linux系统中的日志文件内容。根据您的需求,选择适当的命令和选项来满足您的日志查看要求。
116 0
|
5月前
|
监控 网络协议 Linux
Linux网卡调优:RPS (Receive Packet Steering)
Linux网卡调优:RPS (Receive Packet Steering)
185 0
|
6月前
|
Linux 网络安全
【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already...
【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already...
306 0
|
30天前
|
Shell Linux C语言
Linux中执行Shell的函数(popen,system,exec)介绍:分享一些常用的执行Shell的函数及其相关编程技巧和经验
Linux中执行Shell的函数(popen,system,exec)介绍:分享一些常用的执行Shell的函数及其相关编程技巧和经验
30 0
|
7月前
|
运维 Linux 程序员
Linux查看log日志命令总结
Linux查看log日志命令总结
240 1
|
3月前
|
存储 Linux 网络安全
【Linux】文件服务iSCSI(Internet Small Computer System Interface)
【Linux】文件服务iSCSI(Internet Small Computer System Interface)
14 1