add cleaner error for when the webserver port is already in use

Fixes #5489
This commit is contained in:
Pere Urbon-Bayes 2016-06-14 12:24:58 +02:00 committed by Suyog Rao
parent 11c3b83d10
commit 95cdab3583

View file

@ -43,6 +43,9 @@ module LogStash
@server.add_tcp_listener(http_host, http_port)
@server.run.join
rescue Errno::EADDRINUSE
message = "Logstash tried to bind to port #{@http_port}, but the port is already in use. You can specify a new port by launching logtash with the --http-port option."
raise Errno::EADDRINUSE.new(message)
end
def log(str)