Closed wq9 closed 6 months ago
Hello @wq9, indeed, I have been able to reproduce it, and below I show the cause and solution:
root@debian10:/home/vagrant# netstat -tuln | grep 44
tcp 0 0 192.168.56.43:443 0.0.0.0:* LISTEN
root@debian10:/home/vagrant# bash wazuh-install.sh --wazuh-dashboard dashboard -i
26/03/2024 20:33:27 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
26/03/2024 20:33:27 INFO: Verbose logging redirected to /var/log/wazuh-install.log
26/03/2024 20:33:29 WARNING: Hardware and system checks ignored.
26/03/2024 20:33:29 INFO: Wazuh web interface port will be 443.
26/03/2024 20:33:30 ERROR: Port 443 is being used by another process. Please, check it before installing Wazuh.
26/03/2024 20:33:30 INFO: The installation can not continue due to port usage by other processes.
26/03/2024 20:33:30 INFO: --- Removing existing Wazuh installation ---
26/03/2024 20:33:30 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.
root@debian10:/home/vagrant# netstat -tuln | grep 8444
root@debian10:/home/vagrant# bash wazuh-install.sh --wazuh-dashboard dashboard -i --port 8444
26/03/2024 20:33:55 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
26/03/2024 20:33:55 INFO: Verbose logging redirected to /var/log/wazuh-install.log
26/03/2024 20:33:58 WARNING: Hardware and system checks ignored.
26/03/2024 20:33:58 INFO: Wazuh web interface port will be 8444.
26/03/2024 20:33:58 ERROR: Port 443 is being used by another process. Please, check it before installing Wazuh.
26/03/2024 20:33:58 INFO: The installation can not continue due to port usage by other processes.
26/03/2024 20:33:58 INFO: --- Removing existing Wazuh installation ---
26/03/2024 20:33:58 INFO: Wazuh GPG key not found in the system
26/03/2024 20:33:58 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.
The port that is passed as a parameter is assigned to this variable:
But this variable is not being used anywhere, since the check is done at:
As you can see, the variable that contains the ports is not the same, the latter being the correct one wazuh_dashboard_port
, which is initialized with 443
I'm going to assign the issue to the @wazuh/devel-devops team so they can fix this behavior. In the meantime, you can modify the script to change the following line:
wazuh_dashboard_ports=( "${http_port}" )
to:
wazuh_dashboard_port=( "${http_port}" )
After this, the installation should be functional.
root@debian10:/home/vagrant# bash wazuh-install.sh --wazuh-dashboard dashboard -i --port 8444
26/03/2024 20:46:18 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
26/03/2024 20:46:18 INFO: Verbose logging redirected to /var/log/wazuh-install.log
26/03/2024 20:46:21 WARNING: Hardware and system checks ignored.
26/03/2024 20:46:21 INFO: Wazuh web interface port will be 8444.
26/03/2024 20:46:28 INFO: Wazuh repository added.
26/03/2024 20:46:28 INFO: --- Wazuh dashboard ----
26/03/2024 20:46:28 INFO: Starting Wazuh dashboard installation.
26/03/2024 20:46:52 INFO: Wazuh dashboard installation finished.
26/03/2024 20:46:52 INFO: Wazuh dashboard post-install configuration finished.
26/03/2024 20:46:52 INFO: Starting service wazuh-dashboard.
26/03/2024 20:46:53 INFO: wazuh-dashboard service started.
26/03/2024 20:47:04 INFO: Initializing Wazuh dashboard web application.
26/03/2024 20:47:05 INFO: Wazuh dashboard web application initialized.
26/03/2024 20:47:05 INFO: --- Summary ---
26/03/2024 20:47:05 INFO: You can access the web interface https://192.168.56.43:8444
User: admin
Password: y.mwe7JBxwwqPyJ?X0InnUnt1jzM6eLG
26/03/2024 20:47:05 INFO: Installation finished.
root@debian10:/home/vagrant# netstat -tuln | grep 8444
tcp 0 0 192.168.56.43:8444 0.0.0.0:* LISTEN
The change has been made and here are the results:
An Nginx was started to use 443:
netstat -anp | grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2387/nginx: master
tcp6 0 0 :::443 :::* LISTEN 2387/nginx: master
Test without specifying the Wazuh dashboard port (default 443):
./wazuh-install.sh -a -i
27/03/2024 16:43:28 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
27/03/2024 16:43:28 INFO: Verbose logging redirected to /var/log/wazuh-install.log
27/03/2024 16:43:33 INFO: --- Dependencies ----
27/03/2024 16:43:33 INFO: Installing gawk.
27/03/2024 16:43:34 INFO: Installing curl.
27/03/2024 16:43:36 WARNING: Hardware and system checks ignored.
27/03/2024 16:43:36 INFO: Wazuh web interface port will be 443.
27/03/2024 16:43:36 ERROR: Port 443 is being used by another process. Please, check it before installing Wazuh.
27/03/2024 16:43:36 INFO: The installation can not continue due to port usage by other processes.
27/03/2024 16:43:36 INFO: --- Removing existing Wazuh installation ---
27/03/2024 16:43:36 INFO: Wazuh GPG key not found in the system
27/03/2024 16:43:36 INFO: --- Dependencies ----
27/03/2024 16:43:36 INFO: Removing gawk.
27/03/2024 16:43:37 INFO: Removing curl.
27/03/2024 16:43:38 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.
Test specifying Wazuh dashboard port (8443):
./wazuh-install.sh -a -i -p 8443
27/03/2024 16:45:28 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
27/03/2024 16:45:28 INFO: Verbose logging redirected to /var/log/wazuh-install.log
27/03/2024 16:45:32 INFO: --- Dependencies ----
27/03/2024 16:45:32 INFO: Installing gawk.
27/03/2024 16:45:33 INFO: Installing curl.
27/03/2024 16:45:34 WARNING: Hardware and system checks ignored.
27/03/2024 16:45:34 INFO: Wazuh web interface port will be 8443.
27/03/2024 16:45:36 INFO: --- Dependencies ----
27/03/2024 16:45:36 INFO: Installing apt-transport-https.
27/03/2024 16:45:37 INFO: Installing software-properties-common.
27/03/2024 16:45:42 INFO: Installing gnupg.
27/03/2024 16:45:48 INFO: Wazuh repository added.
27/03/2024 16:45:48 INFO: --- Configuration files ---
27/03/2024 16:45:48 INFO: Generating configuration files.
27/03/2024 16:45:49 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
27/03/2024 16:45:49 INFO: --- Wazuh indexer ---
27/03/2024 16:45:49 INFO: Starting Wazuh indexer installation.
27/03/2024 16:47:33 INFO: Wazuh indexer installation finished.
27/03/2024 16:47:33 INFO: Wazuh indexer post-install configuration finished.
27/03/2024 16:47:34 INFO: Starting service wazuh-indexer.
27/03/2024 16:47:58 INFO: wazuh-indexer service started.
27/03/2024 16:47:58 INFO: Initializing Wazuh indexer cluster security settings.
27/03/2024 16:48:08 INFO: Wazuh indexer cluster initialized.
27/03/2024 16:48:08 INFO: --- Wazuh server ---
27/03/2024 16:48:08 INFO: Starting the Wazuh manager installation.
27/03/2024 16:48:56 INFO: Wazuh manager installation finished.
27/03/2024 16:48:56 INFO: Starting service wazuh-manager.
27/03/2024 16:49:16 INFO: wazuh-manager service started.
27/03/2024 16:49:16 INFO: Starting Filebeat installation.
27/03/2024 16:49:22 INFO: Filebeat installation finished.
27/03/2024 16:49:23 INFO: Filebeat post-install configuration finished.
27/03/2024 16:49:23 INFO: Starting service filebeat.
27/03/2024 16:49:24 INFO: filebeat service started.
27/03/2024 16:49:24 INFO: --- Wazuh dashboard ---
27/03/2024 16:49:24 INFO: Starting Wazuh dashboard installation.
27/03/2024 16:50:39 INFO: Wazuh dashboard installation finished.
27/03/2024 16:50:39 INFO: Wazuh dashboard post-install configuration finished.
27/03/2024 16:50:39 INFO: Starting service wazuh-dashboard.
27/03/2024 16:50:39 INFO: wazuh-dashboard service started.
27/03/2024 16:53:09 ERROR: The backup could not be created
An Nginx was started to use 443:
netstat -anp | grep 443
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN -
tcp6 0 0 :::443 :::* LISTEN -
Test without specifying the Wazuh dashboard port (default 443):
./wazuh-install.sh -a -i
27/03/2024 17:29:45 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
27/03/2024 17:29:45 INFO: Verbose logging redirected to /var/log/wazuh-install.log
27/03/2024 17:29:53 INFO: Wazuh web interface port will be 443.
27/03/2024 17:29:54 ERROR: Port 443 is being used by another process. Please, check it before installing Wazuh.
27/03/2024 17:29:54 INFO: The installation can not continue due to port usage by other processes.
27/03/2024 17:29:54 INFO: --- Removing existing Wazuh installation ---
27/03/2024 17:29:54 INFO: Wazuh GPG key not found in the system
27/03/2024 17:29:54 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.
Test specifying Wazuh dashboard port (8443):
sudo bash ./wazuh-install.sh -a -p 8443
27/03/2024 17:45:20 INFO: Starting Wazuh installation assistant. Wazuh version: 4.7.3
27/03/2024 17:45:20 INFO: Verbose logging redirected to /var/log/wazuh-install.log
27/03/2024 17:45:27 INFO: Wazuh web interface port will be 8443.
27/03/2024 17:45:32 INFO: --- Dependencies ----
27/03/2024 17:45:32 INFO: Installing apt-transport-https.
27/03/2024 17:45:38 INFO: Wazuh repository added.
27/03/2024 17:45:38 INFO: --- Configuration files ---
27/03/2024 17:45:38 INFO: Generating configuration files.
27/03/2024 17:45:39 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
27/03/2024 17:45:39 INFO: --- Wazuh indexer ---
27/03/2024 17:45:39 INFO: Starting Wazuh indexer installation.
27/03/2024 17:47:43 INFO: Wazuh indexer installation finished.
27/03/2024 17:47:43 INFO: Wazuh indexer post-install configuration finished.
27/03/2024 17:47:43 INFO: Starting service wazuh-indexer.
27/03/2024 17:47:59 INFO: wazuh-indexer service started.
27/03/2024 17:47:59 INFO: Initializing Wazuh indexer cluster security settings.
27/03/2024 17:48:10 INFO: Wazuh indexer cluster initialized.
27/03/2024 17:48:10 INFO: --- Wazuh server ---
27/03/2024 17:48:10 INFO: Starting the Wazuh manager installation.
27/03/2024 17:49:26 INFO: Wazuh manager installation finished.
27/03/2024 17:49:26 INFO: Starting service wazuh-manager.
27/03/2024 17:49:43 INFO: wazuh-manager service started.
27/03/2024 17:49:43 INFO: Starting Filebeat installation.
27/03/2024 17:49:51 INFO: Filebeat installation finished.
27/03/2024 17:49:52 INFO: Filebeat post-install configuration finished.
27/03/2024 17:49:52 INFO: Starting service filebeat.
27/03/2024 17:49:53 INFO: filebeat service started.
27/03/2024 17:49:53 INFO: --- Wazuh dashboard ---
27/03/2024 17:49:53 INFO: Starting Wazuh dashboard installation.
27/03/2024 17:50:59 INFO: Wazuh dashboard installation finished.
27/03/2024 17:50:59 INFO: Wazuh dashboard post-install configuration finished.
27/03/2024 17:50:59 INFO: Starting service wazuh-dashboard.
27/03/2024 17:50:59 INFO: wazuh-dashboard service started.
27/03/2024 17:51:20 INFO: Initializing Wazuh dashboard web application.
27/03/2024 17:51:21 INFO: Wazuh dashboard web application initialized.
27/03/2024 17:51:21 INFO: --- Summary ---
27/03/2024 17:51:21 INFO: You can access the web interface https://<wazuh-dashboard-ip>:8443
User: admin
Password: HTgswzkxaqYEYTwsvll.0uy9370dSPTH
27/03/2024 17:51:21 INFO: Installation finished.
Wazuh dashboard:
I install Dashboard using the installation assistant to port 8444 and get the following error:
Port 443 is used by nginx and I need it. Port 8444 is unused.
Why is it checking for port 443 when I already specify port to be 8444?