# Bind Logstash monitoring API to different port

**URL:** https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909
**Category:** Logstash
**Created:** [May 14, 2019, 3:46am UTC](https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909 "2019-05-14T03:46:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jfreeman](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jfreeman](https://discuss.elastic.co/u/jfreeman)
#### Post date: [May 14, 2019, 3:46am UTC](https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909/1 "2019-05-14T03:46:06Z")

</div>

According to the document [https://www.elastic.co/guide/en/logstash/current/monitoring.html](https://www.elastic.co/guide/en/logstash/current/monitoring.html) to bind monitoring API to a different port we have to launch Logstash with the `--http.port` doing so with port 443 I get the below permission denied error.

Any pointers how to fix this would be appreciated

[FATAL][logstash.runner] An unexpected error occurred! {:error=\>#\<Errno::EACCES: Permission denied - bind(2)\>, :backtrace=\>["org/jruby/ext/socket/RubyTCPServer.java:133:in `initialize'", "org/jruby/RubyIO.java:876:in`new'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/puma-2.16.0-java/lib/puma/binder.rb:234:in `add_tcp_listener'", "(eval):2:in`add\_tcp\_listener'", "/usr/share/logstash/logstash-core/lib/logstash/webserver.rb:88:in `start_webserver'", "/usr/share/logstash/logstash-core/lib/logstash/webserver.rb:44:in`block in run'", "org/jruby/RubyRange.java:511:in `each'", "org/jruby/RubyEnumerable.java:1194:in`each\_with\_index'", "/usr/share/logstash/logstash-core/lib/logstash/webserver.rb:39:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:385:in`block in start\_webserver'"]}

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 14, 2019, 1:25pm UTC](https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909/2 "2019-05-14T13:25:56Z")

</div>

On UNIX you typically need to be root to bind to a port number below 1024. Ideally, pick a port number above 1024. If you really need to use 443 then Google "bind privileged port" and go through applicable solutions for whatever system you are on.

---

<div class="post-metadata">

### Author: ![jfreeman](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jfreeman](https://discuss.elastic.co/u/jfreeman)
#### Post date: [May 15, 2019, 6:11am UTC](https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909/3 "2019-05-15T06:11:32Z")

</div>

I am using RedHat Linux, I am still not able to run the monitoring API in 443, but as an interim solution I have set firewalld port forwarding. As a result the API is accessible as http://:443, instead I want https://

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 15, 2019, 1:25pm UTC](https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909/4 "2019-05-15T13:25:16Z")

</div>

I do not think you can enable TLS on the monitoring port. You might want to ask another question on just that point.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 12, 2019, 1:25pm UTC](https://discuss.elastic.co/t/bind-logstash-monitoring-api-to-different-port/180909/5 "2019-06-12T13:25:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
