Skip to content
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

Check if you can connect to Kebina Step 4. bind [127.0.0.1]:8080: Address already in use - #550

Open
indian-summers opened this issue Jan 16, 2025 · 6 comments

Comments

@indian-summers
Copy link

Ubuntu Server is the only OS in this server, I gave up on trying to get LME to run on a VM.

Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble

The server has two Intel Xeon 12 core processors, 40GB RAM, and 546GB HDD.

The lme-environment.env is set to: IPVAR=127.0.0.1

sudo -i podman ps --format "{{.Names}} {{.Status}}"

lme-elasticsearch Up 5 hours (healthy)
lme-elastalert2 Up 5 hours
lme-wazuh-manager Up 5 hours (healthy)
lme-kibana Up 5 hours (healthy)
lme-fleet-server Up 5 hours

I am stuck on the following steps.

Check if you can connect to Kebina Step 4
script - ssh -L 8080:localhost:5601 LME

Output:
bind [127.0.0.1]:8080: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 8080
Could not request local forwarding.

System information as of Thu Jan 16 02:32:33 PM PST 2025

System load: 0.86
Usage of /: 49.4% of 65.74GB
Memory usage: 60%
Swap usage: 0%
Temperature: 41.0 C
Processes: 374
Users logged in: 1
IPv4 address for enp4s0f1: 192.xxx.xxx.xxx (The LME has a properly formatted IP address.)
IPv6 address for enp4s0f1:

I am sure the following will work once the above issue is resolved.

https://localhost:8080 and/or https://localhost:5601 from a browser:

Message:

Unable to connect

An error occurred during a connection to localhost:8080.

@cbaxley
Copy link
Collaborator

cbaxley commented Jan 16, 2025

Try an

netstat -tpan

to see what is using 8080. Maybe node server was installed or something.
Post the results here if you can't tell what it is.

@indian-summers
Copy link
Author

Looks like my SSH connection to the server.

I don't have a GUI installed on the computer, I use SSH because it allows me to cut and paste the scripts.
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 421927/ssh
tcp6 0 0 ::1:8080 :::* LISTEN 421927/ssh

Any suggestions on mitigating this?

@cbaxley
Copy link
Collaborator

cbaxley commented Jan 17, 2025 via email

@indian-summers
Copy link
Author

Hello Clint, thank you for the info.

To check sshd
sudo systemctl status sshd

result: Failed to restart sshd.service: Unit sshd.service not found.

To restart it
sudo systemctl restart sshd

result: Failed to restart sshd.service: Unit sshd.service not found.

files in /etc/ssh/ named ssh_config

-rw-r--r-- 1 root root 1649 Aug 8 19:33 ssh_config
drwxr-xr-x 2 root root 4096 Aug 8 19:33 ssh_config.d
-rw-r--r-- 1 root root 3272 Jan 17 09:58 sshd_config
drwxr-xr-x 2 root root 4096 Jan 15 14:22 sshd_config.d

I don't see Port 8080 in the file.

Contents of sshd_config referencing Port 22:
Include /etc/ssh/sshd_config.d/*.conf
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

@indian-summers
Copy link
Author

Follow up:

Terminated all ssh connections, rebooted the server and type the commands on the server and the error persists.

ssh -L 8080:localhost:5601 LME
bind [127.0.0.1]:8080: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 8080
Could not request local forwarding

sudo -i podman ps --format "{{.Names}} {{.Status}}"
lme-elasticsearch Up 13 minutes (healthy)
lme-elastalert2 Up 12 minutes
lme-wazuh-manager Up 12 minutes (healthy)
lme-kibana Up 12 minutes (healthy)
lme-fleet-server Up 11 minutes

Should I install a GUI? if YES, which would you recommend?

@cbaxley
Copy link
Collaborator

cbaxley commented Jan 17, 2025

I don't think you need to do the ssh -L forwarding. You should be able to just connect to https://ipofmachine
That port forwarding is just for if there is a proxy and you need to connect to it on a special port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Product Backlog
Development

No branches or pull requests

2 participants