Minecraft server doesn't seem to listen to open ports suddenly?
Ok, so a brief of where I've been and why I'm here.
Months ago (six/seven?) I built a new rig. I hadn't played in a while (I host), and chalked my inability to connect (or even ping) the server to my new PC build and windows 10 transition (Gotta join the modern world sooner or later, right?). Figuring I'd fix it later, I'm trying to fix it later..
So enough back story and onto facts.
Buddy's can't connect, of course, and neither can I.
Using UFW; ports are open and nothing changed in this time frame.
Never had issues before my new PC, (hence why I thought it was me and not you lol)
All services work, e-mail, FTP, putty, and so on.
I'm able to telnet into the ports. (25565, and 25568, I tried more than one) I can join other servers if I wish, but mine is inaccessible.
I've tried starting a vanilla server with the latest build, and still nothing. No ping, it just times out, and attempts to log in equal.. time out. Waiting for the list to ping results in no connection message.
Ports are still open, but the server doesn't seem to hear anything..
I don't know where to look, because I don't what what changed where to suddenly cause this issue.
I've been up and down the net, and the closest thing I can figure is that the server (linode) wants to only listen to IPV6 and ignore IPV4.. I'm taking a wag at it. I even tried the (memory fails) something preferIP4 tag in the run bash.
I don't expect an instant resolution for whatever's going on here, but if anyone would be kind enough to help me out/point me in the right direction, I'd be grateful. I Don't know what kind of information I should offer outright save the above because I don't know what caused this problem to manifest.. halp ples?
Thanks,
Dave.
7 Replies
There's a lot that could have happened. Updates, Minecraft server map bloating so much it cannot be run anymore, your ISP turning silly and blocking outgoing ports above 16384 (had a friend who wasn't able to connect to 25565/TCP, but 8884/TCP worked when I was running Minecraft server way back when).
Have you looked at Minecraft logs or if it is actually listening any ports at all after the server has properly started? You can check what ports are currently being listened with, for example ss -tulpn
where:
-t == TCP
-u == UDP
-l == Listening
-p == Process
-n == Numeric
As for server wanting to only listen to IPv6 has more to do with how you've set up Minecraft server and then settings you've done and finally Linux distro default settings, though most Linux distros are fairly agnostic about IPv4 and IPv6 as far as I know. What can also happen is that your ISP switches to IPv6 by default (mobile service providers in Finland for example did this as an example) you need 6to4 or you need to make Minecraft also available over IPv6. It's been a while, but I think Minecraft didn't really care if it was bound to IPv4 or IPv6, only real issue is how you pass the address to the client. If you want to enforce Minecraft to one or the other you can pass java this argument when launching the server -Djava.net.preferIPv4Stack=true
or -Djava.net.preferIPv6Stack=true
.
How does iptables -L
look like? -L
alone lists all rules in all chains in current table.
Try also just cleaning up the Minecraft server by moving existing configs and maps, everything except the server.jar, elsewhere and run it clean, see how it behaves that way if you didn't already.
Thanks for replying to me first of all, I appreciate your help very much.
Logs are rather lengthy and I can affix additional as needed.
Anywho, attempting to connect to other public servers yields no problem, I'm not blocking locally (neither are my buddies) and I also attempted to allow the port through my PC's firewall, but of course that did no good.
Anyways, firewall stuffs cut 'n paste.
ss -l shows it's a listenin'
tcp LISTEN 0 4096 23.239.26.130:25565 0.0.0.0:*
ss -tulpn shows it's a listenin'
tcp LISTEN 0 4096 23.239.26.130:25565 0.0.0.0:* users:(("java",pid=25363,fd=52))
-------------------------------------<-- stylish separation bracket
IPtables -L shows it's a listenin'
ACCEPT tcp -- anywhere anywhere tcp dpt:25565
ACCEPT udp -- anywhere anywhere udp dpt:25565
That's what throws me. All laws o' logic say it should still be listening. I have tried making a new server, clean, it's only purpose is to test connection, and it, too, listens about as well as my chihuahua when he sees a cat. Friends in different states are also unable to connect.
As far as server specs, I'm on the dedicated 8gb plan, with 160 gigs space. And the servers did work in the past with no issue (I've run these things for years and never ran into this problem before.) Then all of a sudden here we are.. ports are open, but MC isn't listening. When I said nothing changed, I mean literally lol; I haven't tweaked modified or updated any of the server mods/versions. The only thing that's changed is it suddenly dislikes me.
may have been some apt get update/upgrade stuff in the past, but I don't recall that killing anything. Like I said I've been sitting on this problem for a while thinking it was just me, alone. Makes it difficult to pinpoint what may have happened.
Test subject craft config
(Worth noting the older version configs only required one port specification, none the less)Minecraft server properties
Tue Dec 08 18:02:02 CST 2020
spawn-protection=0
max-tick-time=60000
query.port=25565
generator-settings=
sync-chunk-writes=true
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
text-filtering-config=
difficulty=easy
spawn-monsters=true
broadcast-rcon-to-ops=true
op-permission-level=4
pvp=true
entity-broadcast-range-percentage=100
snooper-enabled=true
level-type=default
hardcore=false
enable-status=true
enable-command-block=false
max-players=20
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
function-permission-level=2
rcon.port=25565
server-port=25565
server-ip=23.239.26.130 (I've tried this with and without specifying)
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=14
resource-pack=
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
max-build-height=256
online-mode=true
level-seed=
use-native-transport=true
prevent-proxy-connections=false
enable-jmx-monitoring=false
enable-rcon=false
rate-limit=0
motd=A Minecraft Server
>
Log
[18:02:02] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:02:02] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:02:02] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:02:02] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[18:02:02] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[18:02:02] [main/INFO]: Reloading ResourceManager: Default
[18:02:04] [Worker-Main-5/INFO]: Loaded 7 recipes
[18:02:04] [Worker-Main-5/INFO]: Loaded 927 advancements
[18:02:07] [Server thread/INFO]: Starting minecraft server version 1.16.4
[18:02:07] [Server thread/INFO]: Loading properties
[18:02:07] [Server thread/INFO]: Default game type: SURVIVAL
[18:02:07] [Server thread/INFO]: Generating keypair
[18:02:07] [Server thread/INFO]: Starting Minecraft server on 23.239.26.130:25565
[18:02:08] [Server thread/INFO]: Using epoll channel type
[18:02:08] [Server thread/INFO]: Preparing level "world"
[18:02:08] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[18:02:10] [Server thread/INFO]: Preparing spawn area: 0%
[18:02:10] [Server thread/INFO]: Preparing spawn area: 0%
[18:02:10] [Server thread/INFO]: Preparing spawn area: 0%
[18:02:10] [Server thread/INFO]: Preparing spawn area: 0%
[18:02:10] [Server thread/INFO]: Preparing spawn area: 0%
[18:02:11] [Server thread/INFO]: Preparing spawn area: 0%
[18:02:11] [Server thread/INFO]: Preparing spawn area: 30%
[18:02:17] [Worker-Main-9/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-6/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-6/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-6/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-6/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-6/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:17] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:18] [Worker-Main-9/INFO]: Preparing spawn area: 83%
[18:02:18] [Worker-Main-4/INFO]: Preparing spawn area: 83%
[18:02:19] [Worker-Main-9/INFO]: Preparing spawn area: 83%
[18:02:19] [Worker-Main-9/INFO]: Preparing spawn area: 83%
[18:02:20] [Worker-Main-6/INFO]: Preparing spawn area: 83%
[18:02:20] [Worker-Main-9/INFO]: Preparing spawn area: 84%
[18:02:21] [Worker-Main-4/INFO]: Preparing spawn area: 85%
[18:02:21] [Worker-Main-6/INFO]: Preparing spawn area: 87%
[18:02:22] [Worker-Main-9/INFO]: Preparing spawn area: 89%
[18:02:22] [Worker-Main-9/INFO]: Preparing spawn area: 91%
[18:02:23] [Server thread/INFO]: Preparing spawn area: 91%
[18:02:23] [Server thread/INFO]: Preparing spawn area: 98%
[18:02:23] [Server thread/INFO]: Time elapsed: 15015 ms(I also tried restarting the linode server lol)
>
sudo lsof -i:25565
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 25363 root 52u IPv4 507070 0t0 TCP minecraft.bleepblanked.com:25565 (LISTEN)
Tried to telnet from my home machine instead of the server console (DUnno why I didn't consider this sooner.. fatigue I guess.)
Unable to telnet into those ports from windows 10 machine.
Connect failed…
So now I've got open ports that aren't open?
I can connect to my mail server ports and so on.. but For some reason I'm blocked from the ports that up until recently, worked..
Firewall issues then clearly, but I can't understand why open and listening ports are blocked..
You write:
Tried to telnet from my home machine instead of the server console (DUnno why I didn't consider this sooner.. fatigue I guess.)
The server console is "localhost". I believe the linux networking stack has an optimization that reduces stuff like:
telnet 1.2.3.4
from IP address 1.2.3.4 to
telnet localhost
There's usually always a rule allowing all ports to be open if the source & dest IPs are both "localhost". Here's mine (interface is localhost, protocol is any, src/dest are both anywhere…for interface localhost, anywhere means only localhost):
4 448 ACCEPT all -- lo any anywhere anywhere
4 is the rule number & 448 is the packet count.
Firewall issues then clearly, but I can't understand why open and listening ports are blocked.
It would be helpful if you would post your firewall configuration someplace so we could see it. I realize that's like leaving your car keys in the ignition in an unlocked car but…
-- sw
Still sitt'n here trying to figure this mess out..
Took a break from it (other projects and this is turning into work, too lol) I'll leave more information but I'm not entirely sure what you need to see.
Anyways, getting on with the info-a-thon which may become a bit re-runish.. I'll compose as I try to backtrack tonight's little excursion.
I'll start with where I'm at and include more stuff..
Ufw numbered (applicable ports) I tried using.. 1234 just to see if it would work being another port, of course not.
Ufw numberdz
[30] 1234/tcp ALLOW IN Anywhere
[31] 1234
[38] 1234/tcp (v6) ALLOW IN Anywhere (v6)
[39] 1234 (v6) ALLOW IN Anywhere (v6)
netstat -ltnup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::1234 :::* LISTEN 31184/java
tcp6 0 0 :::443 :::* LISTEN 1234/apache2
-Ufw Show Listening
tcp6:
1234 * (java)
[38] allow 1234/tcp
[39] allow 1234
-Iptables -L (Mind you I'm using the UFW front-end.)
Now here is where I run into what I have vs what you have, but I'm not really adept with Linux enough to know how to change this for sure, as UFW seems to be the record keeper.
ACCEPT tcp -- anywhere anywhere tcp dpt:1234
ACCEPT tcp -- anywhere anywhere tcp dpt:1234
ACCEPT udp -- anywhere anywhere udp dpt:1234
-user.rules files (from /ufw)
tuple ### allow tcp 1234 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 1234 -j ACCEPT
tuple ### allow any 1234 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 1234 -j ACCEPT
-A ufw-user-input -p udp --dport 1234 -j ACCEPT
-- Now this one's interesting going into the ufw.log
It's no longer making entries but it was clearly doing a blockin' earlier. This is just one line but it's pretty redundant. 129 lines total.
Dec 19 17:12:44 minecraft kernel: [1029739.933761] [UFW BLOCK] IN=eth0 OUT= MAC=f2:3c:91:73:ad:f8:e4:c7:22:10:9c:c1:86:dd SRC=2600:1f16:06ea:9300:cbea:31f5:b99b:10b1 DST=2600:3c00:0000:0000:f03c:91ff:fe73:adf8 LEN=66 TC=0 HOPLIMIT=1 FLOWLBL=22127 PROTO=UDP SPT=28502 DPT=33434 LEN=26
Craft server side, still, shows it's correctly binded to port (per log), but info is simply not reaching it a'tall..
I'm honestly not sure what other information you'd like to see. I'd be willing to gather it up and toss it out there. Otherwise ufw config files (all 11 of them) are pretty much default, i've never tweaked any of the configs, only the rules.
Anyway.. I'm going crosseyed.
Thanks for your time, and your help.
I appreciate it.
You write:
Dec 19 17:12:44 minecraft kernel: [1029739.933761] [UFW BLOCK] IN=eth0 OUT= MAC=f2:3c:91:73:ad:f8:e4:c7:22:10:9c:c1:86:dd SRC=2600:1f16:06ea:9300:cbea:31f5:b99b:10b1 DST=2600:3c00:0000:0000:f03c:91ff:fe73:adf8 LEN=66 TC=0 HOPLIMIT=1 FLOWLBL=22127 PROTO=UDP SPT=28502 DPT=33434 LEN=26
These are reports from iptables(8)…these appear in /var/log/kern.log and on the WebLISH console as well.
ufw(8) is an Ubuntu invention that's meant to be a friendly front-end™ to iptables(8). My suggestion would be to just blow away your entire ufw(8) configuration and start over:
https://www.configserverfirewall.com/ufw-ubuntu-firewall/ufw-delete-rule/
You should be aware that there are some iptables(8) rules that are not manageable by ufw(8) and you should leave those alone.
In my experience, friendly front-end™s are almost never friendly and always have unanticipated side effects. You use them at your own peril…
-- sw
Ok I've returned half a year later LOL.
Time flies when you have no time.
Anyways, I took your suggestion at long last and nuked my firewalls.
Ohhh the tribulations. Tried re-doing Ufw, nah, nope. Removed that, and then Iptables. Welll that created a new problem of now the mirrors weren't working and I could re-install it. My sun addled mind by default always plans for the worse, so I started trying to figure out how'n the heeeeoockysticks one makes a new distro install these days.. anyways during this time, it dawned on me that I did not reboot.
So off we go, I try the old one again, iptables goes on, ufw goes on, I open up the ports I need AAAAAAAAAAAAAnd……. It f!@#$ works!
So there you have it thanks to these kind folks, anyone in the same boat as I. Just nuke the firewall from orbit and start it over. I only put it off for so long because I have a tendancy to.. you know.. destroy simple things like this Lol
Thanks folks, greatly appreciated.
As far as what caused it.. who knows.. Who cares. It works lol