# Can't restart kibana

**URL:** <https://discuss.elastic.co/t/cant-restart-kibana/312357>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [August 18, 2022, 7:55am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357 "2022-08-18T07:55:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 18, 2022, 7:55am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/1 "2022-08-18T07:55:21Z")

</div>

I've just started to learn elasticsearch and kibana yesterday,  
Today, when i try to restart kibana server, it's return me error:  
`FATAL Error: Port 5601 is already in use. Another instance of Kibana may be running!`  
Then, when i use this port i need to run` bin/kibana-verification-code` in terminal  
but when i run it in terminal i have this error

```auto
Couldn't find verification code.

If Kibana hasn't been configured yet, restart Kibana to generate a new code.

Otherwise, you can safely ignore this message and start using Kibana.

```

I try to kill the process in linux,  
**sudo kill -9 $(sudo lsof -t -i:5601)**  
and after i reboot my computer,  
but i can't stop and restart kibana.  
what should i do?

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 18, 2022, 8:08am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/2 "2022-08-18T08:08:16Z")

</div>

Hello there!

> [@Sarindra\_Therese](#):
>
> Port 5601

First of all please disable service start at boot:

```auto
systemctl disable kibana

```

and reboot:

```auto
systemctl reboot

```

your machine. After that Kibana shoudn't start.  
Please check once again what service uses 5601.  
I've got another question: why do you use default port?

---

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 18, 2022, 8:51am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/3 "2022-08-18T08:51:03Z")

</div>

Hey, this work,  
would i still need to run this command if i face this kind of thing again tomorrow?  
I use default port because that's what it says in documentation,  
am i doing wrong?  
I need elasticsearch and kibana to send data in kafka so i need to learn first about elasticsearch,  
As i learned in documentation yesterday, they say that kibana is used to send data in elasticsearch using dev-tools.  
You can correct me if I'm wrong  
Thanks

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 18, 2022, 8:58am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/4 "2022-08-18T08:58:41Z")

</div>

Please don't use default ports, for security reasons. For example I use for Elasticsearch port greater than 10000 and for Kibana port greater than 8000.

Now we should check what other service uses 5601 (you should know what is happening on your server):

```auto
sudo lsof -i:5601

```

result should look like this:

```auto
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 26758 kibana 29u IPv4 1290480 0t0 TCP your.domain.address:port->your.ip.address:35060 (ESTABLISHED)
node 26758 kibana 33u IPv4 1290481 0t0 TCP your.domain.address:port->your.ip.address:35026 (ESTABLISHED)
node 26758 kibana 51u IPv4 697029 0t0 TCP your.domain.address:port (LISTEN)
node 26758 kibana 104u IPv4 1290482 0t0 TCP your.domain.address:port->your.ip.address:35042 (ESTABLISHED)
node 26758 kibana 105u IPv4 1290483 0t0 TCP your.domain.address:port->your.ip.address:35058 (ESTABLISHED)
node 26758 kibana 130u IPv4 1359418 0t0 TCP your.domain.address:port->your.ip.address:44362 (ESTABLISHED)

```

---

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 18, 2022, 10:45am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/5 "2022-08-18T10:45:00Z")

</div>

then the right thing to do is to change all the default ports of elasticsearch and kibana is that it?  
I change them by modifying their yml files isn't?

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 18, 2022, 11:05am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/6 "2022-08-18T11:05:44Z")

</div>

The right thing is NOT to use any default ports. Everyone knows that SSH uses port 22... Please considire security of your cluster.

Yes, you can change it in \*.yml files.  
How about Kibana now? Does it start properly?

---

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 18, 2022, 11:08am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/7 "2022-08-18T11:08:03Z")

</div>

Good!  
yeah, kibana work properly!  
thanks ^^

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 18, 2022, 11:12am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/8 "2022-08-18T11:12:06Z")

</div>

OK, so please reboot your server.  
Command that we used says it should not start at boot time.  
If it will than you have something wrong or you had enabled it as a service many times.

---

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 25, 2022, 12:17pm UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/9 "2022-08-25T12:17:46Z")

</div>

Hey!  
I still have the same problem even if I changed the port.  
I would like to know why does kibana return this error?

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 26, 2022, 7:16am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/10 "2022-08-26T07:16:38Z")

</div>

So... you changed KIbana port and you got same message that port is already in use?

---

<div class="post-metadata">

**Author:** ![Sarindra\_Therese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarindra_therese/32/103180_2.png) [@Sarindra\_Therese](https://discuss.elastic.co/u/Sarindra_Therese)\
**Post date:** [August 26, 2022, 7:33am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/11 "2022-08-26T07:33:18Z")

</div>

Yes i've already change port,  
I found the problem and this fix it:

```auto
systemctl disable kibana
systemctl reboot 
bin/elasticsearch-reset-password -u elastic

```

I think is the password which needs to change

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 26, 2022, 7:44am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/12 "2022-08-26T07:44:22Z")

</div>

Why?

pt., 26 sie 2022 o 09:43 Sarindra Therese Randriambeloson via Discuss the Elastic Stack \<[notifications@elastic.discoursemail.com](mailto:notifications@elastic.discoursemail.com)\> napisał(a):

---

<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:** [September 23, 2022, 7:44am UTC](https://discuss.elastic.co/t/cant-restart-kibana/312357/13 "2022-09-23T07:44:24Z")

</div>

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