# Problem with enabling https, using Let's Encrypt Wildcard SSL certs

**URL:** <https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206>\
**Category:** Graylog Central (peer support)\
**Created:** [December 30, 2021, 11:11am UTC](https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206 "2021-12-30T11:11:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fisz](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fisz](https://community.graylog.org/u/Fisz)\
**Post date:** [December 30, 2021, 11:11am UTC](https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206/1 "2021-12-30T11:11:06Z")

</div>

Hello,  
I’m having problem with SSL configuration usingg Let’s Encrypt Wildcard certificates.  
I’ve created /etc/certs/ directory and put all required LE certificates there. Directory is owned by graylog user/group, having full permissions to them.

Environment is “fresh” I mean it was recently installed on Debian 11, with Elasticsearch 7.16.2, mongodb 4.4.10 and openJDK 11.0.13

Here is some config from graylogs server.conf

```auto
http_bind_address = <graylog_ip_addr>:9000
http_publish_uri = https://<graylog_domain_name>:9000/

http_enable_tls = true
http_tls_cert_file = /etc/certs/cert.pem
http_tls_key_file = /etc/certs/privkey.pem

```

When accessing https://\<graylog\_domain\_name\>:9000 - GUI works, but for example when I go to the System/Inputs - it shows that none input is working (which is not true, because I can refresh search and I see new logs are comming into graylog).  
Also when I access System/Nodes, and click on the node I’ve got 2 error messages:  
Could not get plugins  
Getting plugins on node “80bd2cdb-c1a8-42ab-a9e5-7272cbe9df08” failed: FetchError: There was an error fetching a resource: Internal Server Error. Additional information: Failed to connect to \<graylog\_domain\_name\>/127.0.1.1:9000

Could not get JVM information  
Getting JVM information for node ‘80bd2cdb-c1a8-42ab-a9e5-7272cbe9df08’ failed: FetchError: There was an error fetching a resource: Internal Server Error. Additional information: Failed to connect to \<graylog\_domain\_name\>/127.0.1.1:9000

Of course I’ve imported keys to java with this command:

```auto
sudo keytool -importcert -keystore /etc/certs/graylog_keystore.jks -storepass <some_password> -alias <graylog_domain_name> -file /etc/certs/cert.pem

```

And also edited the /etc/default/graylog-server, added this line at the end of 1st line of Default java options

```auto
-Djavax.net.ssl.trustStore=/etc/certs/graylog_keystore.jks -Djavax.net.ssl.trustStorePassword=<some_password>

```

When I try to curl by domain name it just throw connection refused:

> curl -i https://\<graylog\_domain\_name\>:9000/api/?pretty=true  
> curl: (7) Failed to connect to \<graylog\_domain\_name\> port 9000: Connection refused

Do I missing something?

---

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [December 31, 2021, 1:47am UTC](https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206/2 "2021-12-31T01:47:04Z")

</div>

Hello,

Maybe I can help. There could be a couple reason for this.

1. Are you accually using a loop back address ( 127.0.0.1.)? If so make sure your _/etc/hosts/_ file has something like this configured. Yours maybe different since your using a loop back address.  
Example.

```auto
[root@graylog graylog_user]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.34 graylog.domain.com

```

To be honest I would have used a default IP Address and not my 127.0.0.1, then I would have made it static address.

1. If you are actually using a IP address other then 127.0.0.1 make sure your **Hostname** is correct also make sure your _/etc/hosts_ file is correct, and if this is in a domain check your DNS server has a reverse lookup for that Address.

2. Last, in your Certificates check if you have an **subjectAltName**.

```auto
subjectAltName = @alt_names
# IP addresses and DNS names the certificate should include
# Use IP.### for IP addresses and DNS.### for DNS names,
# with "###" being a consecutive number.
[alt_names]
IP.1 = 203.0.113.42
DNS.1 = graylog.example.com

```

Hope that helps

EDIT: I forgot do you have a firewall enabled?  
Also

> [@Fisz](#):
>
> with Elasticsearch 7.16.2,

This is not the correct version shown in the documentation but if its working you may have some issues later.

---

<div class="post-metadata">

**Author:** ![Fisz](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fisz](https://community.graylog.org/u/Fisz)\
**Post date:** [January 4, 2022, 6:41am UTC](https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206/3 "2022-01-04T06:41:48Z")

</div>

Hello,  
I’ve checked the hosts file, it was like:

```auto
127.0.0.1 localhost
127.0.1.1 graylog.domain.com graylog 

```

I’ve changed it to (but also tried graylog interface ip addr):

```auto
127.0.0.1 graylog.domain.com graylog localhost

```

Still not working, but getting different errors:

```auto
Getting JVM information for node '80bd2cdb-c1a8-42ab-a9e5-7272cbe9df08' failed: FetchError: There was an error fetching a resource: Internal Server Error. Additional information: Hostname <graylog_ip_address> not verified: certificate: sha256/cjDEtdwMnpCYHREA+mPg6WgjJxk1sjNS65Veu38nO+k= DN: CN=*.domain.com subjectAltNames: [*.domain.com]

Getting plugins on node "80bd2cdb-c1a8-42ab-a9e5-7272cbe9df08" failed: FetchError: There was an error fetching a resource: Internal Server Error. Additional information: Hostname <graylog_ip_address> not verified: certificate: sha256/cjDEtdwMnpCYHREA+mPg6WgjJxk1sjNS65Veu38nO+k= DN: CN=*.domain.com subjectAltNames: [*.domain.com]

```

When viewing Lest’s Encrypt Wildcard cert.pem file in openssl I have this:

```auto
X509v3 Subject Alternative Name:
                DNS:*.domain.com

```

Ofc all pasted domain names here were replaced, but they’re matching in all places.

Firewall is disabled.

---

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [January 4, 2022, 11:25pm UTC](https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206/4 "2022-01-04T23:25:08Z")

</div>

Hello

> Getting JVM information for node ‘80bd2cdb-c1a8-42ab-a9e5-7272cbe9df08’ failed: FetchError: There was an error fetching a resource: Internal Server Error. Additional information: Hostname \<graylog\_ip\_address\> not verified: certificate: sha256/cjDEtdwMnpCYHREA+mPg6WgjJxk1sjNS65Veu38nO+k= DN: CN=_.domain.com subjectAltNames: [_.domain.com]
> 
> Getting plugins on node “80bd2cdb-c1a8-42ab-a9e5-7272cbe9df08” failed: FetchError: There was an error fetching a resource: Internal Server Error. Additional information: Hostname \<graylog\_ip\_address\> not verified: certificate: sha256/cjDEtdwMnpCYHREA+mPg6WgjJxk1sjNS65Veu38nO+k= DN: CN=_.domain.com subjectAltNames: [_.domain.com]

Something is wrong with you certificate configuration. As shown above in the error log.

```auto
 Hostname <graylog_ip_address> not verified: certificate

```

`127.0.0.1` \<— This is your home address AKA loop back. Does your server have an IP address beside 127.0.0.1. If so that should be there as I showed above.

`192.168.1.34 graylog.domain.com`

The reason I say this is because of this error above. You have Graylog FQDN connecting to a home address and not its public/private IP Address as shown below.

> [@Fisz](#):
>
> Failed to connect to \<graylog\_domain\_name\>/127.0.1.1:9000

You may want to check out this documentation. These docs has all the information needed for making sure your certificate are correct for Graylog.

[https://docs.graylog.org/v1/docs/sec-adcs-certificates](https://docs.graylog.org/v1/docs/sec-adcs-certificates)

[https://docs.graylog.org/v1/docs/https](https://docs.graylog.org/v1/docs/https)

If that doesn’t work can you show us what you did? If by chance you have a DNS server in your environment make sure Graylog server has a PTR (reverse lookup) configured.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [January 18, 2022, 11:25pm UTC](https://community.graylog.org/t/problem-with-enabling-https-using-lets-encrypt-wildcard-ssl-certs/22206/5 "2022-01-18T23:25:58Z")

</div>

Closed on January 18, 2022, 11:25pm UTC

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