FATAL Error: Port 443 is already in use. Another instance of OpenSearch Dashboards may be running!

246 views
Skip to first unread message

Ren - BTFSI IT

unread,
Jun 12, 2024, 2:00:33 PM6/12/24
to Wazuh | Mailing List
Hi
I performed a bunch of updates on my Wazuh server and now when I try to access the dashboard I am getting a "error to many re-directs" Upon checking I am getting the below error
FATAL  Error: Port 443 is already in use. Another instance of OpenSearch Dashboards may be running!

Any ideas on how to resolve this?



systemctl status wazuh-dashboard
× wazuh-dashboard.service - wazuh-dashboard
     Loaded: loaded (/etc/systemd/system/wazuh-dashboard.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-06-12 09:52:47 PDT; 8min ago
    Process: 733 ExecStart=/usr/share/wazuh-dashboard/bin/opensearch-dashboards -c /etc/wazuh-dashboard/opensearch_dashboards.yml (code=exited, status=1/FAILURE)
   Main PID: 733 (code=exited, status=1/FAILURE)
        CPU: 5.563s

opensearch-dashboards[771]: v16.20.0
opensearch-dashboards[733]: {"type":"log","@timestamp":"2024-06-12T16:52:47Z","tags":["info","plugins-service"],"pid":733,"message":"Plugin \"dataSourc>
opensearch-dashboards[733]: {"type":"log","@timestamp":"2024-06-12T16:52:47Z","tags":["info","plugins-service"],"pid":733,"message":"Plugin \"dataSourc>
opensearch-dashboards[733]: {"type":"log","@timestamp":"2024-06-12T16:52:47Z","tags":["info","plugins-service"],"pid":733,"message":"Plugin \"visTypeXy>
opensearch-dashboards[733]: {"type":"log","@timestamp":"2024-06-12T16:52:47Z","tags":["info","plugins-service"],"pid":733,"message":"Plugin \"mlCommons>
opensearch-dashboards[733]: {"type":"log","@timestamp":"2024-06-12T16:52:47Z","tags":["fatal","root"],"pid":733,"message":"Error: Port 443 is already i>
opensearch-dashboards[733]:  FATAL  Error: Port 443 is already in use. Another instance of OpenSearch Dashboards may be running!
systemd[1]: wazuh-dashboard.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: wazuh-dashboard.service: Failed with result 'exit-code'.
systemd[1]: wazuh-dashboard.service: Consumed 5.563s CPU time.


COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   3436     root    6u  IPv6 145369      0t0  TCP *:https (LISTEN)
nginx   3436     root    7u  IPv4 145370      0t0  TCP *:https (LISTEN)
nginx   3437 www-data    6u  IPv6 145369      0t0  TCP *:https (LISTEN)
nginx   3437 www-data    7u  IPv4 145370      0t0  TCP *:https (LISTEN)
nginx   3438 www-data    6u  IPv6 145369      0t0  TCP *:https (LISTEN)
nginx   3438 www-data    7u  IPv4 145370      0t0  TCP *:https (LISTEN)
nginx   3439 www-data    6u  IPv6 145369      0t0  TCP *:https (LISTEN)
nginx   3439 www-data    7u  IPv4 145370      0t0  TCP *:https (LISTEN)
nginx   3440 www-data    6u  IPv6 145369      0t0  TCP *:https (LISTEN)
nginx   3440 www-data    7u  IPv4 145370      0t0  TCP *:https (LISTEN)

Roman Luna

unread,
Jun 12, 2024, 2:18:25 PM6/12/24
to Wazuh | Mailing List
Hi,

First, let's make sure than there are no other processes using the port. Check which service is taking this port and maybe you can change its port to another. Another simple way to test it, is to stop the service that is using the port and check the dashboard logs again. You could use lsof to check the port: 

sudo lsof -i :443 

Or you may also use the following:

 sudo netstat -tuln | grep :443, for example.

Then restart the wazuh-dashboard again and check if the problem is resolved.

Regards.

Ren - BTFSI IT

unread,
Jun 12, 2024, 2:46:12 PM6/12/24
to Wazuh | Mailing List
Hi Roman

Here is what shows when using the LSOF command


COMMAND PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   806     root    6u  IPv6  21822      0t0  TCP *:https (LISTEN)
nginx   806     root    7u  IPv4  21823      0t0  TCP *:https (LISTEN)
nginx   807 www-data    6u  IPv6  21822      0t0  TCP *:https (LISTEN)
nginx   807 www-data    7u  IPv4  21823      0t0  TCP *:https (LISTEN)
nginx   808 www-data    6u  IPv6  21822      0t0  TCP *:https (LISTEN)
nginx   808 www-data    7u  IPv4  21823      0t0  TCP *:https (LISTEN)
nginx   809 www-data    6u  IPv6  21822      0t0  TCP *:https (LISTEN)
nginx   809 www-data    7u  IPv4  21823      0t0  TCP *:https (LISTEN)
nginx   810 www-data    6u  IPv6  21822      0t0  TCP *:https (LISTEN)
nginx   810 www-data    7u  IPv4  21823      0t0  TCP *:https (LISTEN)

Roman Luna

unread,
Jun 19, 2024, 2:09:59 PM6/19/24
to Wazuh | Mailing List
Hi,

From my understanding of your output, It seems that the port is taken by NGINX, you should stop the service or use another port in NGINX as it is colliding with the dashboard. That would resolve the issue.

Regards.

Reply all
Reply to author
Forward
0 new messages