mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
add cleaner error for when the webserver port is already in use
Fixes #5489
This commit is contained in:
parent
11c3b83d10
commit
95cdab3583
1 changed files with 3 additions and 0 deletions
|
@ -43,6 +43,9 @@ module LogStash
|
||||||
@server.add_tcp_listener(http_host, http_port)
|
@server.add_tcp_listener(http_host, http_port)
|
||||||
|
|
||||||
@server.run.join
|
@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
|
end
|
||||||
|
|
||||||
def log(str)
|
def log(str)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue