reset报文
2017-08-08T10:49:11+08:00 INFO Error publishing events (retrying): write tcp 192.168.5.201:51347->192.168.5.201:5043: write: connection reset by peer
1,客户端尝试与服务器未对外提供服务的端口建立TCP连接,服务器将会直接向客户端发送reset报文。
2,客户端和服务器的某一方在交互的过程中发生异常(如程序崩溃等),该方系统将向对端发送TCP reset报文,告之对方释放相关的TCP连接
3,接收端收到TCP报文,但是发现该TCP的报文,并不在其已建立的TCP连接列表内,则其直接向对端发送reset报文
4,在交互的双方中的某一方长期未收到来自对方的确认报文,则其在超出一定的重传次数或时间后,会主动向对端发送reset报文释放该TCP连接
5,有些应用开发者在设计应用系统时,会利用reset报文快速释放已经完成数据交互的TCP连接,以提高业务交互的效率
2017-08-08T10:49:12+08:00 ERR Connecting error publishing events (retrying): dial tcp 192.168.5.201:5043: getsockopt: connection refused
logstash服务down掉
logstash针对多个beat的输入和不同形式输出的设置
网上说可以用设置type来标识,结果没有输出,原因:
Beat已经设置了type字段,所以自行设置的type将会被忽略
The Beats shipper automatically sets the type field on the event. You cannot override this setting in the Logstash config. If you specify a setting for the type config option in Logstash, it is ignored.
解决:
通过add_field解决
beats {
add_field => {“myid”=>”nginx”}
port => 5043
}
例子:
input {
beats {
add_field => {"myid"=>"nginx"}
port => 5043
}
beats {
add_field => {"myid"=>"java"}
port =>5044
}
}
filter {
if [myid] == "nginx" {
grok {
}
}
if [myid] == "java" {
grok {
}
}
}
output{
if [myid] == "nginx" {
elasticsearch {
}
}
if [myid] == "java" {
elasticsearch {
}
}
}
脚本启动logstash后自动退出的问题
* * * * * sh /data/to8to/tools/es/logstash.sh >> /tmp/cron_log 2>&1
调试错误:
watch cat /tmp/cron_log
得到:
lsof 命令找不到。。。
修改解决脚本解决