我最近使用本教程在Openshift上制作了一个Minecraft服务器。在我进行端口转发后,我确实能够在Minecraft中连接到我的服务器。但是我无法登录!它只是以消息结束:Timed-Out
。在服务器日志中,我只看到,我知道:我失去了连接。以下是日志:
2016-01-01 17:29:17 [INFO] Starting minecraft server version 1.
2016-01-01 17:29:17 [INFO] Loading properties
2016-01-01 17:29:17 [INFO] Default game type: SURVIVAL
2016-01-01 17:29:17 [INFO] Generating keypair
2016-01-01 17:29:18 [INFO] Starting Minecraft server on 127.2.1
2016-01-01 17:29:18 [INFO] Preparing level "world"
2016-01-01 17:29:18 [INFO] Preparing start region for level 0
2016-01-01 17:29:20 [INFO] Preparing spawn area: 52%
2016-01-01 17:29:20 [INFO] Done (1.911s)! For help, type "help"
2016-01-01 17:30:41 [SEVERE] Reached end of stream
2016-01-01 17:30:41 [INFO] /127.2.105.129:29361 lost connection
java.io.IOException: Bad packet id 72
at ei.a(SourceFile:193)
at ci.i(SourceFile:250)
at ci.c(SourceFile:16)
at cj.run(SourceFile:94)
2016-01-01 18:10:21 [INFO] /127.2.105.129:32075 lost connection
java.io.IOException: Bad packet id 72
at ei.a(SourceFile:193)
at ci.i(SourceFile:250)
at ci.c(SourceFile:16)
at cj.run(SourceFile:94)
2016-01-01 18:10:21 [INFO] /127.2.105.129:32098 lost connection
java.io.IOException: Bad packet id 72
at ei.a(SourceFile:193)
at ci.i(SourceFile:250)
at ci.c(SourceFile:16)
at cj.run(SourceFile:94)
java.io. IOException:错误的数据包ID 72
将处理格式错误的数据包。我读过它可能意味着从未指定正确的端口到尝试连接不兼容的mod版本的任何事情。
在您的示例中,看起来您在< code>server.properties中显式定义了< code>server-ip。在启动日志中:
2016-01-01 17:29:18 [INFO] Starting Minecraft server on 127.2.1
< code>127.2.1不是一个有效的地址,因此我认为数据包传输格式不正确是有道理的。将此字段留空(默认情况下)或提供有效的IPv4地址。
我很有信心这就是正在发生的事情,因为您提供的教程也让您设置了这个字段。
< code>Bad packet id 72表示您正在尝试登录端口配置不正确的服务器。在日志中,您已经提到< code>2016-01-01 17:29:18 [INFO]在127.2.1启动《我的世界》服务器。
解决方案:(我已经将我的测试服务器配置为与您的类似)1。转到server.properties,然后在server-ip:
部分中删除内容。这将使其成为默认ip
转到路由器主页,将服务器端口转发到 25565
现在应该可以工作了
祝你的新服务器好运!:)