-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsof: unacceptable port specification in: -i : when I am installing Wazuh dashboard with the assistant in a single node #2406
Comments
ResearchTo investigate this error, the code has been debugged and the error is related to the following code of the check_ports function 04/09/2023 10:59:48 INFO: Wazuh web interface port will be 443.
+ '[' -n 1 ']'
+ checks_ports ''
+ used_port=0
+ ports=("$@")
+ command -v lsof
+ port_command='lsof -sTCP:LISTEN -i:'
+ for i in '"${!ports[@]}"'
+ eval 'lsof -sTCP:LISTEN -i:'
++ lsof -sTCP:LISTEN -i:
lsof: unacceptable port specification in: -i : As the code shows, the This is how the dashboard port is checked in the code: if [ -n "${dashboard}" ]; then
checks_ports "${wazuh_dashboard_port}"
fi But the variable is not defined as readonly wazuh_dashboard_ports=( "${http_port}" ) Applying the fixThe fix is as simple as changing the variable like follows: readonly wazuh_dashboard_port="${http_port}" Testing🟢 Now, the installation of the Wazuh dashboard is done as expected and no related errors or warnings are generated: [root@centos7 vagrant]# bash wazuh-install.sh -wd wazuh-dashboard -o
04/09/2023 11:19:42 INFO: Starting Wazuh installation assistant. Wazuh version: 4.6.0
04/09/2023 11:19:42 INFO: Verbose logging redirected to /var/log/wazuh-install.log
04/09/2023 11:19:46 INFO: --- Removing existing Wazuh installation ---
04/09/2023 11:19:46 INFO: Removing Wazuh dashboard.
04/09/2023 11:19:54 INFO: Wazuh dashboard removed.
04/09/2023 11:19:54 INFO: Installation cleaned.
04/09/2023 11:19:56 INFO: Wazuh web interface port will be 443.
04/09/2023 11:19:58 INFO: Wazuh development repository added.
wazuh-dashboard
04/09/2023 11:19:58 INFO: --- Wazuh dashboard ----
04/09/2023 11:20:00 INFO: Starting Wazuh dashboard installation.
04/09/2023 11:21:41 INFO: Wazuh dashboard installation finished.
04/09/2023 11:21:41 INFO: Wazuh dashboard post-install configuration finished.
04/09/2023 11:21:41 INFO: Starting service wazuh-dashboard.
04/09/2023 11:21:41 INFO: wazuh-dashboard service started.
04/09/2023 11:21:54 INFO: Initializing Wazuh dashboard web application.
04/09/2023 11:21:54 INFO: Wazuh dashboard web application initialized.
04/09/2023 11:21:54 INFO: --- Summary ---
04/09/2023 11:21:54 INFO: You can access the web interface https://<wazuh-dashboard-ip>:443
User: admin
Password: LxPchf3UNlxGYyvU0rxQ*+SvV?dk3SOu
04/09/2023 11:21:54 INFO: Installation finished.
[root@centos7 vagrant]# If the code is now debugged, the function is efectively receiving the port as an argument: 04/09/2023 11:13:09 INFO: Wazuh web interface port will be 443.
+ '[' -n 1 ']'
+ checks_ports 443
+ used_port=0
+ ports=("$@")
+ command -v lsof
+ port_command='lsof -sTCP:LISTEN -i:'
+ for i in '"${!ports[@]}"'
+ eval 'lsof -sTCP:LISTEN -i:443'
|
When I ran the tests for this PR I found an error message when installing Wazuh dashboard, it is a message that did not prevent the installation from progressing:
Full log
The process was as follows:
The text was updated successfully, but these errors were encountered: