jkutner / heroku-buildpack-minecraft

A buildpack for running a Minecraft Server on Heroku
MIT License
204 stars 289 forks source link

Submit server.properties to server, then 'Can't connect to server'. #51

Open tommyleung2020 opened 4 years ago

tommyleung2020 commented 4 years ago

I want to change online-mode to false.

In my git repository have this three file: /eula.txt /requirements.txt /server.properties

And server.properties content like this: (I just follow by server console -> ~/server.properties

Minecraft server properties

Mon Apr 20 14:07:49 UTC 2020

spawn-protection=16 max-tick-time=60000 query.port=25565 generator-settings= force-gamemode=false allow-nether=true enforce-whitelist=false gamemode=survival broadcast-console-to-ops=true enable-query=false player-idle-timeout=0 difficulty=easy broadcast-rcon-to-ops=true spawn-monsters=true op-permission-level=4 pvp=true snooper-enabled=true level-type=default hardcore=false enable-command-block=false network-compression-threshold=256 max-players=20 max-world-size=29999984 resource-pack-sha1= rcon.port=25575 server-port=25566 server-ip= spawn-npcs=true allow-flight=false level-name=world view-distance=10 resource-pack= spawn-animals=true white-list=false rcon.password= generate-structures=true online-mode=false max-build-height=256 level-seed= prevent-proxy-connections=false use-native-transport=true motd=A Minecraft Server enable-rcon=false

Minecraft version 1.14.3 In the minecraft server list of my server column, it show 'Can't connect to server'.

Heroku server log:

app[web.1]: t=2020-04-20T15:18:12+0000 lvl=dbug msg="dial private connection" id=1bbcc9d547e2 typ=proxy addr=localhost:25566 err="dial tcp 127.0.0.1:25566: connect: connection refused" app[web.1]: t=2020-04-20T15:18:12+0000 lvl=warn msg="failed to open private leg" id=1bbcc9d547e2 typ=proxy privaddr=localhost:25566 err="dial tcp 127.0.0.1:25566: connect: connection refused"

ghost commented 4 years ago

make online-mode true not false

Bryzizzle commented 4 years ago

You can keep online-mode false (I supposed to make a cracked server). But it's best to remove all the configs you don't need. It seems that you only modified the online-mode setting so all your config file needs to be is this:

#Minecraft server properties
#Mon Apr 20 14:07:49 UTC 2020
online-mode=false

The entire config file will then be rebuilt by the Minecraft server when it runs. Pay attention to the new-line at the end of the file as the build pack seems to append its own port (25566 instead of 25565) to the file without adding a new line character /n.

So essentially just add the configs you need to the server properties file and make sure to add a new line to the end of it