AllTheMods / Server-Scripts

Server Startup Scripts
Other
68 stars 37 forks source link

Fails to ping IP addresses, but addresses are reachable #59

Open ignirtoq opened 4 years ago

ignirtoq commented 4 years ago

I am trying to do a fresh install of the All the Mods 4 server pack on a CentOS 7 machine on my home network.

I run the startserver.sh script, and it successfully downloads and runs the serverstarter-1.2.7-forge-1.14.4.jar, however that jar then fails. The output suggests the jar is attempting to ping a couple of well known IP addresses, I suppose with the goal of verifying a valid internet connection, but claims they fail. Manually pinging those same addresses immediately after the script terminates works without issue.

The following is the output of the startserver.sh script along with the output of the immediate subsequent pings of the two addresses in question after the script's failure.

[chaigreen@blueberry All-the-Mods-4-v0.1.9]$ ./startserver.sh
https://yoosk.pl/serverstarter-1.2.7-forge-1.14.4.jar
DEBUG: (wget) Downloading https://yoosk.pl/serverstarter-1.2.7-forge-1.14.4.jar
--2019-11-08 14:26:31--  https://yoosk.pl/serverstarter-1.2.7-forge-1.14.4.jar
Resolving yoosk.pl (yoosk.pl)... 2606:4700:30::681b:a0f1, 2606:4700:30::681b:a1f1, 104.27.160.241, ...
Connecting to yoosk.pl (yoosk.pl)|2606:4700:30::681b:a0f1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2708398 (2.6M) [application/java-archive]
Saving to: ‘serverstarter-1.2.7-forge-1.14.4.jar’

100%[==============================================================================>] 2,708,398   9.16MB/s   in 0.3s

2019-11-08 14:26:32 (9.16 MB/s) - ‘serverstarter-1.2.7-forge-1.14.4.jar’ saved [2708398/2708398]

[14:26:32] [INFO] ::::::::::::::::::::::::::::::::::::::::::::::::::::
[14:26:32] [INFO]    Minecraft-Forge Server install/launcher jar
[14:26:32] [INFO]    (Created by the "All The Mods" modpack team)
[14:26:32] [INFO] ::::::::::::::::::::::::::::::::::::::::::::::::::::
[14:26:32] [INFO]
[14:26:32] [INFO]    This jar will launch a Minecraft Forge Modded server
[14:26:32] [INFO]
[14:26:32] [INFO]    Github:    https://github.com/AllTheMods/ServerStarter
[14:26:32] [INFO]    Discord:   http://discord.allthepacks.com
[14:26:32] [INFO]
[14:26:32] [INFO] You are playing All The Mods 4
[14:26:32] [INFO] Starting to install/launch the server, lean back!
[14:26:32] [INFO] ::::::::::::::::::::::::::::::::::::::::::::::::::::
[14:26:32] [INFO]
[14:26:32] [INFO] Pinging 8.8.8.8.
[14:26:33] [INFO] Reached 8.8.8.8: false
[14:26:33] [INFO] Pinging 1.1.1.1.
[14:26:34] [INFO] Reached 1.1.1.1: false
[14:26:34] [INFO] Reached 0 out of 2 IPs.
[14:26:34] [ERROR] Not every host could be reached. There could be a problem with your internet connection!!!!
[14:26:34] [ERROR] Problems with the Internet connection, shutting down.
[chaigreen@blueberry All-the-Mods-4-v0.1.9]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=20.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=21.1 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=20.3 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 20.324/20.717/21.102/0.338 ms
[chaigreen@blueberry All-the-Mods-4-v0.1.9]$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=56 time=21.6 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=56 time=21.8 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=56 time=21.1 ms
^C
--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 21.128/21.532/21.832/0.341 ms

My issue comes in two parts:

  1. How do I fix or get around this supposed ping issue (clearly internet connectivity is not the problem).
  2. Why is the script even doing these pings at all? It should just try to do the thing it wants to do, which I'm guessing is downloading the actual forge jar, and fail when that doesn't work. Attempting any kind of "precheck" like this just opens the door to more edge cases that cause the check to fail when the actual task to be performed would not. Better to ask for forgiveness than permission.
clavierp commented 3 years ago

In the server-setup-config.yaml, set launch:checkOffline to no

# checks with the help of a few unrelated server whether the server is online checkOffline: no

ps: It's a necrobump but it's the first result that comes up on google when searching this problem so i'll leave it here if it helps anyone