Score:0

How to fix a broken port: *:x11

in flag
Run

I am trying to figure out what are running on my ports:

Port 4000:

$ lsof -i :4000
COMMAND    PID     USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
apache2 129245     root    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)
apache2 129246 www-data    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)
apache2 129246 www-data   22u  IPv6 1000516      0t0  TCP static.164.77.12.49.clients.your-server.de:4000->178-164-233-141.pool.digikabel.hu:47972 (ESTABLISHED)
apache2 129247 www-data    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)
apache2 129248 www-data    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)
apache2 129249 www-data    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)
apache2 129250 www-data    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)
apache2 129254 www-data    6u  IPv6  999421      0t0  TCP *:4000 (LISTEN)

That seems ok to me. But on my port 6000:

$ lsof -i :6000
COMMAND    PID     USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
apache2 129245     root   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)
apache2 129246 www-data   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)
apache2 129247 www-data   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)
apache2 129248 www-data   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)
apache2 129249 www-data   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)
apache2 129250 www-data   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)
apache2 129254 www-data   10u  IPv6 1000453      0t0  TCP *:x11 (LISTEN)

It looks quite different from port 4000.

What is TCP *:x11?

I get This site can’t be reached when accessing it on my browsers.

How can I fix it?

muru avatar
us flag
What does `grep 6000 /etc/services` say?
Run avatar
in flag
Run
@muru `x11 6000/tcp x11-0 # X Window System` - dunno what it is
muru avatar
us flag
`/etc/services` is the file that contains names for the various ports (e.g., "ssh" for port 22, "http" for port 80, etc.) for tools like `lsof`, `netstat`, etc. In this case, "x11" is the name given to port 6000, so you see `:x11` instead of `:6000`. It's only for presentation - you can't access `:x11` on your browser. Now, is your "This site can’t be reached" error from trying to access `:x11`?
Run avatar
in flag
Run
@muru "This site can’t be reached" is from :6000
muru avatar
us flag
Just `:6000`? No IP?
Score:1
es flag

Of course you can't do anything with your web browser on that X11 port: That port speaks X protocol, not http, https or ftp which is what your web browser understands.

What do you expect to happen when you connect your browser there?

Run avatar
in flag
Run
I am just trying to run a WordPress site on that port. Other ports are ok. Not this. Why??
HuHa avatar
es flag
Because that's a predefined "well-known" port number. You _can_ repurpose such port numbers, but that is asking for trouble; you are breaking compatibility for all kinds of things. I'd strongly advise against that.
HuHa avatar
es flag
See also `/etc/services` and https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers and https://www.sciencedirect.com/topics/computer-science/registered-port
Run avatar
in flag
Run
I think that port is taken up by X Window System - X11. Dunno what it is. Never installed it. It just crept in I guess. https://en.wikipedia.org/wiki/X_Window_System
HuHa avatar
es flag
It didn't "creep in", they registered that port 30+ years ago for X11. That's what that `/etc/services` file is there for.
Run avatar
in flag
Run
Aw I see. Thank you!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.