先说下环境,一台服务器虚拟成5个虚拟机(192.168.1.11、192.168.1.12、192.168.1.13、192.168.1.14、192.168.1.15),外网访问通过15的nginx映射,现在logstash部署在11上,监听192.168.1.11的4560端口,外网log4j客户端配置SocketAppender为15开放的ip+4560端口,但是log4j每次写日志都会:log4j:WARN Detected problem with connection: java.net.SocketException: Software caused connection abort: socket write error,帮忙分析下问题出在哪里吧,谢谢
logstash配置:
input {
log4j {
host => "192.168.1.11"
port => 4560
type => "log4j"
}
stdin { }
}
log4j配置:
log4j.appender.socket=org.apache.log4j.net.SocketAppender
log4j.appender.socket.RemoteHost=25.34.199.121
log4j.appender.socket.Port=4560
log4j.appender.socket.LocationInfo=true
log4j.appender.socket.layout=org.apache.log4j.PatternLayout
log4j.appender.socket.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%t%m%n
logstash配置:
input {
log4j {
host => "192.168.1.11"
port => 4560
type => "log4j"
}
stdin { }
}
log4j配置:
log4j.appender.socket=org.apache.log4j.net.SocketAppender
log4j.appender.socket.RemoteHost=25.34.199.121
log4j.appender.socket.Port=4560
log4j.appender.socket.LocationInfo=true
log4j.appender.socket.layout=org.apache.log4j.PatternLayout
log4j.appender.socket.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%t%m%n
1 个回复
lizhou828
赞同来自: