# Elastic don´t start after set xpack.security.enabled to true

**URL:** <https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 3, 2020, 10:09pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596 "2020-12-03T22:09:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 3, 2020, 10:09pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/1 "2020-12-03T22:09:58Z")

</div>

I tried activate elastic security, but when i add the line

> xpack.security.enabled: true

if send command

> systemctl restart elasticsearch

this crashes.

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 3, 2020, 10:14pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/2 "2020-12-03T22:14:55Z")

</div>

Could you check your ES logs and include them here?

If you remove `xpack.security.enabled: true` does the restart of the service work?

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 3, 2020, 10:17pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/3 "2020-12-03T22:17:13Z")

</div>

> [@aaron-nimocks](#):
>
> Could you check your ES logs and include them here?

how to chek this?

> [@aaron-nimocks](#):
>
> If you remove does the restart of the service work?

Yes, if i remove the line or set in false, the service restart successful

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 3, 2020, 10:22pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/4 "2020-12-03T22:22:34Z")

</div>

Depends on your setup but check the logs at `/var/log/elasticsearch/clustername.log` and most likely you are just looking for an `[error]` message after you restart the service.

If your logs are not there [check this out](https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html) and click the OS you are using to learn the default location of where the logs are.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/8/78a3221cbed4c787fab9fc98eb6fd58af51b2df5.png)

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 3, 2020, 10:43pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/5 "2020-12-03T22:43:38Z")

</div>

I tried cheking this route but don't have a [error] in this logs

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 3, 2020, 10:47pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/6 "2020-12-03T22:47:48Z")

</div>

Don't start as a service and you can see the output.

Then the error should output to the screen so you don't need to worry about searching the logs.

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 3, 2020, 11:04pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/7 "2020-12-03T23:04:21Z")

</div>

Okey, now i set this line xpack.security.enabled to true and the service now start sucessfull but when i attempt refresh the page 192.xxx.xxx.xxx:5601 this frozzen in "Kibana server is not ready yet"

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 3, 2020, 11:28pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/8 "2020-12-03T23:28:32Z")

</div>

It could take a bit. Did it ever start?

Are you following the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html) and setting passwords and updating kibana.yml to include authentication?

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 12:17am UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/9 "2020-12-04T00:17:49Z")

</div>

> [@aaron-nimocks](#):
>
> It could take a bit. Did it ever start?

No, I have left it for 1h and it has not started

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 5:49pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/10 "2020-12-04T17:49:29Z")

</div>

Hi again, I came because it still does not start, it does not open the kibana

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 4, 2020, 5:55pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/11 "2020-12-04T17:55:32Z")

</div>

Are you able to find the Kibana logs and see what's going on? You can also shutdown Kibana and then start manually via a service and you should get some logs on the screen that can help understand what's going on.

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 6:52pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/12 "2020-12-04T18:52:24Z")

</div>

> [@aaron-nimocks](#):
>
> Are you able to find the Kibana logs and see what's going on? You can also shutdown Kibana and then start manually via a service and you should get some logs on the screen that can help understand what's going on.

Where are the kibana logs housed?

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 4, 2020, 6:54pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/13 "2020-12-04T18:54:25Z")

</div>

Typically `/var/log/kibana.{stdout,stderr}` but it depends on how you installed it and what OS you are using.

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 6:58pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/14 "2020-12-04T18:58:12Z")

</div>

Im use Ubuntu 18.04 and in this route don´t have a kibana logs, but elastic yes.

I install with de command "apt-get install elastic...."

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 4, 2020, 7:06pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/15 "2020-12-04T19:06:09Z")

</div>

[Stop Kibana and start](https://www.elastic.co/guide/en/kibana/current/start-stop.html) using `./bin/kibana` and let me know what the output is.

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 7:24pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/16 "2020-12-04T19:24:35Z")

</div>

> log [19:22:35.884] [info][plugins-service] Plugin "visTypeXy" is disabled.  
> log [19:22:35.892] [info][plugins-service] Plugin "auditTrail" is disabled.  
> log [19:22:35.958] [warning][config][deprecation] Setting [elasticsearch.username] to "kibana" is deprecated. You should use the "kibana \_system" user instead.  
> log [19:22:35.959] [warning][config][deprecation] Config key [monitoring.cluster\_alerts.email\_notifications.email\_address] will be requi red for email notifications to work in 8.0."  
> log [19:22:35.960] [warning][config][deprecation] Setting [monitoring.username] to "kibana" is deprecated. You should use the "kibana\_sy stem" user instead.  
> log [19:22:36.172] [info][plugins-system] Setting up [96] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,code,usageC ollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,mapsLegacy,newsfeed,ki banaLegacy,translations,share,legacyExport,embeddable,uiActionsEnhanced,expressions,data,home,observability,cloud,console,consoleExtensions, apmOss,searchprofiler,painlessLab,grokdebugger,management,indexPatternManagement,advancedSettings,fileUpload,savedObjects,dashboard,visualiz ations,visTypeVega,visTypeTimelion,timelion,features,upgradeAssistant,security,snapshotRestore,encryptedSavedObjects,ingestManager,indexMana gement,remoteClusters,crossClusterReplication,indexLifecycleManagement,enterpriseSearch,dashboardMode,beatsManagement,transform,ingestPipeli nes,maps,licenseManagement,graph,dataEnhanced,visTypeTable,visTypeMarkdown,tileMap,regionMap,inputControlVis,visualize,esUiShared,bfetch,can vas,charts,lens,visTypeVislib,visTypeTimeseries,rollup,visTypeTagcloud,visTypeMetric,watcher,discover,discoverEnhanced,savedObjectsManagemen t,spaces,reporting,lists,eventLog,actions,case,alerts,stackAlerts,triggersActionsUi,ml,securitySolution,infra,monitoring,logstash,apm,uptime]  
> log [19:22:36.560] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions fr om being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml  
> log [19:22:36.561] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recom mended.  
> log [19:22:36.597] [warning][config][encryptedSavedObjects][plugins] Generating a random key for xpack.encryptedSavedObjects.encryptionK ey. To be able to decrypt encrypted saved objects attributes after restart, please set xpack.encryptedSavedObjects.encryptionKey in kibana.y ml  
> log [19:22:36.604] [warning][ingestManager][plugins] Fleet APIs are disabled due to the Encrypted Saved Objects plugin using an ephemera l encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.  
> log [19:22:36.743] [warning][config][plugins][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in kibana.yml  
> log [19:22:36.746] [info][config][plugins][reporting] Chromium sandbox provides an additional layer of protection, and is supported for Linux Ubuntu 18.04 OS. Automatically enabling Chromium sandbox.  
> log [19:22:36.761] [warning][actions][actions][plugins] APIs are disabled due to the Encrypted Saved Objects plugin using an ephemeral e ncryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.  
> log [19:22:36.786] [warning][alerting][alerts][plugins][plugins] APIs are disabled due to the Encrypted Saved Objects plugin using an ep hemeral encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.  
> log [19:22:36.940] [info][monitoring][monitoring][plugins] config sourced from: production cluster  
> log [19:22:37.244] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved o bjects migrations...  
> log [19:22:37.264] [error][elasticsearch][monitoring] Request error, retrying  
> GET [http://10.0.0.4:9200/\_xpack](http://10.0.0.4:9200/_xpack) =\> connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:37.267] [warning][elasticsearch][monitoring] Unable to revive connection: [http://10.0.0.4:9200/](http://10.0.0.4:9200/)  
> log [19:22:37.267] [warning][elasticsearch][monitoring] No living connections  
> log [19:22:37.268] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living co nnections error  
> log [19:22:37.275] [warning][monitoring][monitoring][plugins] X-Pack Monitoring Cluster Alerts will not be available: No Living connecti ons  
> log [19:22:37.277] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:37.305] [error][savedobjects-service] Unable to retrieve version information from Elasticsearch nodes.  
> log [19:22:39.760] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:42.262] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:44.763] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:47.263] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:49.766] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:52.273] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:54.770] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:57.270] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:22:59.774] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:23:02.275] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:23:04.777] [error][data][elasticsearch] [ConnectionError]: connect ECONNREFUSED 10.0.0.4:9200  
> log [19:23:07.259] [warning][elasticsearch][monitoring] Unable to revive connection: [http://10.0.0.4:9200/](http://10.0.0.4:9200/)  
> log [19:23:07.260] [warning][elasticsearch][monitoring] No living connections  
> log [19:23:07.260] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 4, 2020, 8:43pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/17 "2020-12-04T20:43:32Z")

</div>

I would create another topic under Kibana forums and post your logs and include you just updated security. Someone with more experience in that area could help.

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 8:46pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/18 "2020-12-04T20:46:08Z")

</div>

Okay, in the forum section would it be correct to post?

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 4, 2020, 8:57pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/19 "2020-12-04T20:57:44Z")

</div>

Elastic -\> Kibana for assistance with Kibana.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ff2cc86182c2de49b4a85486146e9bdf1375d2c6.png)

---

<div class="post-metadata">

**Author:** ![jh0mil](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jh0mil](https://discuss.elastic.co/u/jh0mil)\
**Post date:** [December 4, 2020, 9:14pm UTC](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596/20 "2020-12-04T21:14:01Z")

</div>

Thanks you.

[Next page](https://discuss.elastic.co/t/elastic-don-t-start-after-set-xpack-security-enabled-to-true/257596.md?page=2)
