elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.64k stars 8.23k forks source link

Cannot terminate Kibana in OS X 14.1.2 #174964

Closed bhavyarm closed 4 months ago

bhavyarm commented 10 months ago

Kibana version: 8.12.0 BC6

Elasticsearch version: 8.12.0 BC6

Server OS version: darwin_aarch

Original install method (e.g. download page, yum, from source, etc.): from staging

Describe the bug: I cannot terminate Kibana process in my terminal. CTRL-C doesn't work and when I click on x on the window - I get the message about having to be sure about terminating node process and I confirm. But restarting Kibana just tells port 5601 is already in use.

Screenshot 2024-01-16 at 4 48 11 PM

Posting logs and ps -ef output:

ps -ef | grep kibana 501 6853 5559 0 3:53pm ttys001 0:00.01 grep kibana

ps -ef | grep node (no node connected to Kibana)

ps -ef | grep node
  501  2054  2019   0  4:28pm ??         0:21.43 /private/var/folders/0r/789pky113vj34d2ts0pcnmg40000gn/T/AppTranslocation/CFCFD1C9-9F08-46DA-A777-F267FCF1E869/d/Atom.app/Contents/Frameworks/Atom Helper (Renderer).app/Contents/MacOS/Atom Helper (Renderer) --type=renderer --enable-experimental-web-platform-features --field-trial-handle=1718379636,8267830376812130760,8691429730801150937,131072 --enable-features=WebComponentsV0Enabled --disable-features=SpareRendererForSitePerProcess --lang=en-US --app-path=/private/var/folders/0r/789pky113vj34d2ts0pcnmg40000gn/T/AppTranslocation/CFCFD1C9-9F08-46DA-A777-F267FCF1E869/d/Atom.app/Contents/Resources/app.asar --node-integration --node-integration-in-worker --webview-tag --no-sandbox --no-zygote --enable-remote-module --background-color=#fff --disable-blink-features=Auxclick --enable-spellcheck --enable-websql --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=5 --no-v8-untrusted-code-mitigations --shared-files
  501  2166  2019   0  4:28pm ??         0:01.66 /private/var/folders/0r/789pky113vj34d2ts0pcnmg40000gn/T/AppTranslocation/CFCFD1C9-9F08-46DA-A777-F267FCF1E869/d/Atom.app/Contents/Frameworks/Atom Helper (Renderer).app/Contents/MacOS/Atom Helper (Renderer) --type=renderer --enable-experimental-web-platform-features --field-trial-handle=1718379636,8267830376812130760,8691429730801150937,131072 --enable-features=WebComponentsV0Enabled --disable-features=SpareRendererForSitePerProcess --lang=en-US --app-path=/private/var/folders/0r/789pky113vj34d2ts0pcnmg40000gn/T/AppTranslocation/CFCFD1C9-9F08-46DA-A777-F267FCF1E869/d/Atom.app/Contents/Resources/app.asar --node-integration --no-sandbox --no-zygote --enable-remote-module --background-color=#fff --enable-spellcheck --enable-websql --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=9 --no-v8-untrusted-code-mitigations --shared-files
  501  2179  2019   0  4:28pm ??         0:01.24 /private/var/folders/0r/789pky113vj34d2ts0pcnmg40000gn/T/AppTranslocation/CFCFD1C9-9F08-46DA-A777-F267FCF1E869/d/Atom.app/Contents/Frameworks/Atom Helper (Renderer).app/Contents/MacOS/Atom Helper (Renderer) --type=renderer --enable-experimental-web-platform-features --field-trial-handle=1718379636,8267830376812130760,8691429730801150937,131072 --enable-features=WebComponentsV0Enabled --disable-features=SpareRendererForSitePerProcess --lang=en-US --app-path=/private/var/folders/0r/789pky113vj34d2ts0pcnmg40000gn/T/AppTranslocation/CFCFD1C9-9F08-46DA-A777-F267FCF1E869/d/Atom.app/Contents/Resources/app.asar --node-integration --no-sandbox --no-zygote --enable-remote-module --background-color=#fff --enable-spellcheck --enable-websql --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=11 --no-v8-untrusted-code-mitigations --shared-files
  501  6832  5559   0  3:52pm ttys001    0:00.00 grep node
bin/kibana
{"log.level":"info","@timestamp":"2024-01-16T19:42:00.710Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.2.0","env":{"pid":5823,"proctitle":"bin/../node/bin/node","os":"darwin 23.1.0","arch":"arm64","host":"Bhavyas-MacBook-Pro.local","timezone":"UTC-0500","runtime":"Node.js v18.18.2"},"config":{"active":{"source":"start","value":true},"breakdownMetrics":{"source":"start","value":false},"captureBody":{"source":"start","value":"off","commonName":"capture_body"},"captureHeaders":{"source":"start","value":false},"centralConfig":{"source":"start","value":false},"contextPropagationOnly":{"source":"start","value":true},"environment":{"source":"start","value":"production"},"globalLabels":{"source":"start","value":[["kibana_uuid","42e6888a-63b4-4a81-817d-0369f484c38e"],["git_rev","e9092c0a17923f4ed984456b8a5db619b0a794b3"]],"sourceValue":{"kibana_uuid":"42e6888a-63b4-4a81-817d-0369f484c38e","git_rev":"e9092c0a17923f4ed984456b8a5db619b0a794b3"}},"logLevel":{"source":"default","value":"info","commonName":"log_level"},"metricsInterval":{"source":"start","value":120,"sourceValue":"120s"},"serverUrl":{"source":"start","value":"https://kibana-cloud-apm.apm.us-east-1.aws.found.io/","commonName":"server_url"},"transactionSampleRate":{"source":"start","value":0.1,"commonName":"transaction_sample_rate"},"captureSpanStackTraces":{"source":"start","sourceValue":false},"secretToken":{"source":"start","value":"[REDACTED]","commonName":"secret_token"},"serviceName":{"source":"start","value":"kibana","commonName":"service_name"},"serviceVersion":{"source":"start","value":"8.12.0","commonName":"service_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.2.0"}
[2024-01-16T14:42:01.873-05:00][INFO ][root] Kibana is starting
[2024-01-16T14:42:01.886-05:00][INFO ][node] Kibana process configured with roles: [background_tasks, ui]
[2024-01-16T14:42:06.737-05:00][INFO ][plugins-service] Plugin "cloudChat" is disabled.
[2024-01-16T14:42:06.740-05:00][INFO ][plugins-service] Plugin "cloudExperiments" is disabled.
[2024-01-16T14:42:06.740-05:00][INFO ][plugins-service] Plugin "cloudFullStory" is disabled.
[2024-01-16T14:42:06.741-05:00][INFO ][plugins-service] Plugin "cloudGainsight" is disabled.
[2024-01-16T14:42:06.854-05:00][INFO ][plugins-service] Plugin "profilingDataAccess" is disabled.
[2024-01-16T14:42:06.854-05:00][INFO ][plugins-service] Plugin "profiling" is disabled.
[2024-01-16T14:42:06.881-05:00][INFO ][plugins-service] Plugin "securitySolutionServerless" is disabled.
[2024-01-16T14:42:06.881-05:00][INFO ][plugins-service] Plugin "serverless" is disabled.
[2024-01-16T14:42:06.881-05:00][INFO ][plugins-service] Plugin "serverlessObservability" is disabled.
[2024-01-16T14:42:06.881-05:00][INFO ][plugins-service] Plugin "serverlessSearch" is disabled.
[2024-01-16T14:42:07.014-05:00][INFO ][root] Kibana is shutting down
[2024-01-16T14:42:07.015-05:00][FATAL][root] Reason: Port 5601 is already in use. Another instance of Kibana may be running!
Error: Port 5601 is already in use. Another instance of Kibana may be running!
    at Root.shutdown (/Users/bhavyarajumandya/Desktop/BC6_8.12.0/kibana-8.12.0/node_modules/@kbn/core-root-server-internal/src/root/index.js:79:18)
    at Root.preboot (/Users/bhavyarajumandya/Desktop/BC6_8.12.0/kibana-8.12.0/node_modules/@kbn/core-root-server-internal/src/root/index.js:49:18)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at bootstrap (/Users/bhavyarajumandya/Desktop/BC6_8.12.0/kibana-8.12.0/node_modules/@kbn/core-root-server-internal/src/bootstrap.js:97:9)
    at Command.<anonymous> (/Users/bhavyarajumandya/Desktop/BC6_8.12.0/kibana-8.12.0/src/cli/serve/serve.js:241:5)

 FATAL  Error: Port 5601 is already in use. Another instance of Kibana may be running!
elasticmachine commented 10 months ago

Pinging @elastic/kibana-operations (Team:Operations)

mistic commented 10 months ago

I don't think this is an issue for the Ops team, maybe @elastic/kibana-core team.

In any case I just tried this my self and it seems like there is not a problem, you probably have just not waited for the successful stop of Kibana and every plugin and closed out the window which left the process open.

[2024-01-16T21:41:12.978+00:00][INFO ][plugins.securitySolution.endpoint:metadata-check-transforms-task:0.0.1] no endpoint installation found
^C[2024-01-16T21:41:24.870+00:00][INFO ][root] SIGINT received - initiating shutdown
[2024-01-16T21:41:24.871+00:00][INFO ][root] Kibana is shutting down
[2024-01-16T21:41:54.877+00:00][INFO ][plugins-system.standard] Stopping all plugins.
[2024-01-16T21:41:54.879+00:00][INFO ][plugins.monitoring.monitoring.kibana-monitoring] Monitoring stats collection is stopped
[2024-01-16T21:41:54.899+00:00][INFO ][plugins-system.standard] All plugins stopped.

However taking 30 seconds to shutdown seems slower than before and probably something that is worth to looking into have changed here. I think its possible the problematic plugin is monitoring as it is the last one logging stop before shutting down the process (Monitoring stats collection is stopped) but maybe the core team will know more about this.

pgayvallet commented 4 months ago

Closing as cannot reproduce