# Logstash lumberjack output kept on using IP instead of hostname

**URL:** https://discuss.elastic.co/t/logstash-lumberjack-output-kept-on-using-ip-instead-of-hostname/342493
**Category:** Logstash
**Created:** [September 7, 2023, 3:20am UTC](https://discuss.elastic.co/t/logstash-lumberjack-output-kept-on-using-ip-instead-of-hostname/342493 "2023-09-07T03:20:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mikhatanu](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mikhatanu](https://discuss.elastic.co/u/mikhatanu)
#### Post date: [September 7, 2023, 3:20am UTC](https://discuss.elastic.co/t/logstash-lumberjack-output-kept-on-using-ip-instead-of-hostname/342493/1 "2023-09-07T03:20:14Z")

</div>

Hello, i currently have a logstash in openshift exposed through openshift route with beats input. I tried to send some logs using powershell with logstash for windows:

```auto
bin/logstash -e 'input { generator { count => 5 } } output { lumberjack { codec => json hosts => \"https://hostname\" ssl_certificate => \"lumberjack.cert\" port => 443 } }' --path.data .\data2

```

but i got ssl verify failed:

```auto
[2023-09-07T10:13:56,242][ERROR][logstash.outputs.lumberjack][main] All hosts unavailable, sleeping {:hosts=>["192.168.131.113"], :e=>#<OpenSSL::SSL::SSLError: certificate verify failed>, 

```

Openshift routes uses hostname for redirecting to services, but lumberjack uses IP in the hosts section in the error code. I have tried using 2 certificates, 1 with IP common name, and 1 with service as common name (not route). I included the openshift route url and ip in the SAN. Here is my beats input in openshift:

```auto
input {
        beats {
          port => 5044
          ssl => true 
          ssl_certificate => "/tmp/lumberjack-cert/lumberjack.cert" 
          ssl_key => "/tmp/lumberjack-cert/lumberjack.key"
        }
      }

```

Logstash in openshift is at version 7.6.2 while windows is in 8.9.1

---

<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: [October 5, 2023, 3:20am UTC](https://discuss.elastic.co/t/logstash-lumberjack-output-kept-on-using-ip-instead-of-hostname/342493/2 "2023-10-05T03:20:30Z")

</div>

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