# Kibana 17.1 restarting after: "TypeError: Cannot read properties of undefined (reading 'isServer')"

**URL:** <https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [March 15, 2022, 12:33pm UTC](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727 "2022-03-15T12:33:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ab\_mes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ab_mes/32/98078_2.png) [@ab\_mes](https://discuss.elastic.co/u/ab_mes)\
**Post date:** [March 15, 2022, 12:33pm UTC](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727/1 "2022-03-15T12:33:55Z")

</div>

After migrating from a 7.8.1 stack to 7.16.3, Kibana will intermittently restart, with the last log being:

```auto
TypeError: Cannot read properties of undefined (reading 'isServer')
    at TLSWrap.onerror (node:_tls_wrap:411:27)

```

Upgrading to 7.17.1, this issue still persisted.  
We are using a docker swarm cluster with 3 GCP Confidential VMs. There is an Elasticsearch service per instance, and we have tried 1-3 kibana replicas, with all replicas still failing intermittently.

We had restored the `.kibana_1` and `.security7` index from the old cluster when migrating, and then upgraded the stack.

In Elasticsearch we get this error at a similar time to the kibana one.

```auto
... caught exception while handling client http traffic, closing connection ...
... javax.net.ssl.SSLHandshakeException: Received fatal alert: protocol_version
...

```

We created Elasticsearch certificates using the `elasticsearch-certutil` tool. The environment variables we use for the kibana service are:

```auto
SERVER_NAME: server-name
SERVER_PUBLICBASEURL: url
ELASTICSEARCH_HOSTS: '["https://elasticsearch1:9200","https://elasticsearch2:9200","https://elasticsearch3:9200"]' 
SERVER_HOST: 0.0.0.0
SERVER_SSL_ENABLED: "true"
SERVER_SSL_CERTIFICATE: *server_cert
SERVER_SSL_KEY: *server_key
XPACK_SECURITY_SESSION_IDLETIMEOUT: "1h"
XPACK_SECURITY_SESSION_LIFESPAN: "30d"
ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES: *certificate_authorities
ELASTICSEARCH_SSL_VERIFICATIONMODE: certificate
ELASTICSEARCH_USERNAME: $ELASTIC_USERNAME
ELASTICSEARCH_PASSWORD: $ELASTIC_PASSWORD
XPACK_SECURITY_ENCRYPTIONKEY: $XPACK_SECURITY_ENCRYPTIONKEY
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: $XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY
XPACK_REPORTING_ENCRYPTIONKEY: $XPACK_REPORTING_ENCRYPTIONKEY

```

The environment variables for the Elasticsearch service are:

```auto
ES_JAVA_OPTS: "-Xms2g -Xmx2g"
ELASTIC_PASSWORD: $ELASTIC_PASSWORD
GCP_CREDENTIALS: *gcp_credentials
GCP_BUCKET: $GCP_BUCKET
GCP_BUCKET_FOLDER: $GCP_BUCKET_FOLDER
network.publish_host: _eth0_
network.bind_host: _eth0_,_eth1_ 
discovery.seed_hosts: elasticsearch1,elasticsearch2,elasticsearch3
cluster.initial_master_nodes: elasticsearch1,elasticsearch2,elasticsearch3
xpack.security.enabled: "true"
xpack.security.ssl.diagnose.trust: "true"
xpack.security.http.ssl.enabled: "true"
xpack.security.http.ssl.key: *elasticsearch_key
xpack.security.http.ssl.certificate_authorities: *certificate_authorities
xpack.security.http.ssl.certificate: *elasticsearch_certificate
xpack.security.http.ssl.verification_mode: certificate
xpack.security.transport.ssl.enabled: "true"
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: *certificate_authorities
xpack.security.transport.ssl.certificate: *elasticsearch_certificate
xpack.security.transport.ssl.key: *elasticsearch_key

```

This was not happening on version 7.8.1 and we cannot replicate this issue in a dev environment so are stumped on how to fix it. We tried regenerating certs, but no luck.

Any help would be appreciated, thank you

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [March 15, 2022, 4:56pm UTC](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727/2 "2022-03-15T16:56:49Z")

</div>

> [@ab\_mes](#):
>
> ```auto
> javax.net.ssl.SSLHandshakeException: Received fatal alert: protocol_version
> 
> ```

> we cannot replicate this issue in a dev environment

Hmm, do you have the same JDK version in all ES containers? Do you have the same JDK versions in dev and prod?

---

<div class="post-metadata">

**Author:** ![ab\_mes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ab_mes/32/98078_2.png) [@ab\_mes](https://discuss.elastic.co/u/ab_mes)\
**Post date:** [March 15, 2022, 5:38pm UTC](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727/3 "2022-03-15T17:38:54Z")

</div>

We are using the same official images for all containers: `docker.elastic.co/elasticsearch/elasticsearch:7.17.1`.  
So ES containers would have the same JDK version, which seems to be `17.0.2`

---

<div class="post-metadata">

**Author:** ![Gareth\_Brown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gareth_brown/32/103758_2.png) [@Gareth\_Brown](https://discuss.elastic.co/u/Gareth_Brown)\
**Post date:** [March 31, 2022, 11:10am UTC](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727/4 "2022-03-31T11:10:00Z")

</div>

Something that we have found is that if there are saved objects in the `.kibana` index the issue is far more likely to happen. Particularly if there are a lot. For example, if downloading in the default security rules, then Kibana starts to have this problem and can even become unusable because it ends up in a restart loop

---

<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:** [April 28, 2022, 11:10am UTC](https://discuss.elastic.co/t/kibana-17-1-restarting-after-typeerror-cannot-read-properties-of-undefined-reading-isserver/299727/5 "2022-04-28T11:10:02Z")

</div>

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