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

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

xpack.security.enabled: true

if send command

systemctl restart elasticsearch

this crashes.

Could you check your ES logs and include them here?

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

how to chek this?

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

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 and click the OS you are using to learn the default location of where the logs are.

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

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.

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"

It could take a bit. Did it ever start?

Are you following the documentation and setting passwords and updating kibana.yml to include authentication?

1 Like

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

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

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?

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

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...."

Stop Kibana and start using ./bin/kibana and let me know what the output is.

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 => 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/
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/
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

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.

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

Elastic -> Kibana for assistance with Kibana.

Thanks you.