Security/Basic Authentication/Transport TLS - One node failing No Subject Alternative names present

Four node cluster, not sure if best setup but another time.

node1 - LS + ES, master eligible
node2 - LS + ES, master eligible
node3 - LS + ES, master eligible
node4 - KB + ES, ingest(?) only node

Following the security tutorial on encrypting traffic. Created CA, and used the ES cert util to do multiple on nodes one through three. Copied certs to the three nodes and updated elasticsearch.yml to enable security and point to these certs. Why did I forget node4? No idea. Just an idiot. Ran the cert util again to create the Node 4 cert.

Nodes one through three all start up fine concerning TLS and establish connection. Node 4 ES does not load:

[2019-08-26T16:25:30,080][WARN ][o.e.x.c.s.t.n.SecurityNetty4Transport] [usakibana] client did not trust this server's certificate, closing connection Netty4TcpChannel{localAddress=, remoteAddress=/

The other nodes show:

[2019-08-26T16:15:04,400][WARN ][o.e.t.TcpTransport       ] [usamon2] exception caught on transport layer [Netty4TcpChannel{localAddress=, remoteAddress=null}], closing connection
io.netty.handler.codec.DecoderException: No subject alternative names present
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode( ~[netty-codec-4.1.35.Final.jar:4.1.35.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead( ~[netty-codec-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at$HeadContext.channelRead( [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at$ [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at [netty-transport-4.1.35.Final.jar:4.1.35.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$ [netty-common-4.1.35.Final.jar:4.1.35.Final]
        at io.netty.util.internal.ThreadExecutorMap$ [netty-common-4.1.35.Final.jar:4.1.35.Final]
        at [?:?]
Caused by: No subject alternative names present

Here is sample of elasticsearch.yml: true true config/certs/${}.p12 config/certs/${}.p12

Here are the contents of my /config/certs:

-rw-------. 1 root elasticsearch 11112 Aug 26 16:23
-rw-rw-rw-. 1 root elasticsearch  3443 Aug 26 16:00 node4.p12
drwxr-sr-x. 2 root elasticsearch    25 Aug  6 16:03 node1
drwxr-sr-x. 2 root elasticsearch    25 Aug  6 16:03 node2
drwxr-sr-x. 2 root elasticsearch    25 Aug  6 16:03 node3

Hi there,


What did you do differently when creating the node4.p12 that you didn't do for node 1 to 3 ? Did you use the same CA or did you maybe create a new one by mistake ?

Thanks for the help Ioannis. As with most projects I am struggling with I did not take good enough notes to know whether I did anything different as I am only referencing the Elastic Stack documentation. However, it appears I did. Not sure exactly which step seems to have resolved the issue but going over it in case someone else encounters:

I viewed the p12 cert using:

openssl pkcs12 -info -in node4.p12

It seemed normal except for the friendlyName Attribute was set to "instance" instead of the node name/DNS name.

Based on your link I figured something was off so I copied over CA from a known working location and generated a new cert from scratch using the elasticsearch-certutil script.

I copied the new cert to my certs directory as specified in my eleasticsearch.yml file. Started ES and monitoring the cluster log I saw that this time it started and connected fine.

While I am not totally sure of a way to verify I have setup transport encryption, I am at least not receiving any errors. Now on to attempting to setup local authentication.

Thanks again Ioannis, you definitely pointed me in the right direction.

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