magnusbaeck / logstash-filter-verifier

Apache License 2.0
192 stars 27 forks source link

Write timeout error attempting to use --sockets #56

Closed NetAppRepoAdmin closed 6 years ago

NetAppRepoAdmin commented 6 years ago

I'm getting an output of this when trying to use the --sockets. The error line seems to be one per test case file. I'm using a socket timeout of 180s. I see the logstash start and run

dholmes 19421 19406 99 11:01 pts/0 00:01:03 /usr/software/java/jdk1.8.0_51/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms256m -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb -w 1 --debug -f /tmp/303720600/pipeline.d -l /tmp/303720600/log --path.settings /tmp/303720600/config --path.data /tmp/303720600/data --path.data /u/dholmes/git/atlassian-elastic-stack/target/test/logstash/data --path.settings /u/dholmes/git/atlassian-elastic-stack/atlassianDome/logstash/settingsFiles/

But the tool output seems to show none of the inputs were processed. 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/196220747/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/204142871/socket: use of closed network connection Write timeout error 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/432049505/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/613733435/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/148964389/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/817773471/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/742073129/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/854132035/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/135063661/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/236755239/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/877788145/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/539768411/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/584589237/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/739941807/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/154027449/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/720461907/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/866006525/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/037485879/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/468259457/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/686940515/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/430904645/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/130185663/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/758060617/socket: use of closed network connection 2018/05/17 11:06:33 Error while accept unix socket: accept unix /tmp/077528391/socket: use of closed network connection

magnusbaeck commented 6 years ago

Does it work without --sockets?

NetAppRepoAdmin commented 6 years ago

Dropping sockets helped me to find the problem. I was using a Unix glob (*) to get the configuration files which was also including some input filter ones that depend on an environment variable to provide DB connection info and that variable not being defined in my test execution environment was the cause of logstash not starting and listening. I adjusted my glob to only get the processing filters that need to be part of the test.

Hopefully this user error issue may help someone else who does the same. Thanks for the tool and the feedback.