Hosting a Bot Through Linux
-
Hello,
I have been trying to host a bot through linux. I have downloaded and setup ngrok. I have downloaded and setup the bot files. When I run the bot I am given this output in the terminal:
Sep 08, 2021 1:10:31 PM games.strategy.engine.framework.map.file.system.loader.AvailableGamesFileSystemReader lambda$parseMapFiles$0 INFO: Found game: World War II Revised LHTR @ jar:file:/home/DeusAstra/triplea/downloadedMaps/world_war_ii_revised-master.zip!/world_war_ii_revised-master/map/games/lhtr.xml Sep 08, 2021 1:10:31 PM games.strategy.engine.framework.map.file.system.loader.AvailableGamesFileSystemReader lambda$parseMapFiles$0 INFO: Found game: World War II Revised @ jar:file:/home/DeusAstra/triplea/downloadedMaps/world_war_ii_revised-master.zip!/world_war_ii_revised-master/map/games/ww2v2.xml Sep 08, 2021 1:10:31 PM org.triplea.game.server.HeadlessGameServer <init> INFO: Game Server initialized Sep 08, 2021 1:10:31 PM org.triplea.game.server.HeadlessGameServer lambda$new$1 INFO: Headless Start Exception in thread "Initialize Headless Server Setup Model" feign.RetryableException: No subject alternative DNS name matching lobby.triplea-game.org found. executing POST https://lobby.triplea-game.org/lobby/game-hosting-request
Any ideas on what I'm doing wrong?
Thank you.
-
As an update, I have made a little progress. Keep in mind I am a little new to this and I am learning as I go.
In the guide for setting up a bot it says https://triplea-game.org/user-guide/how-to-host-with-relay:
Setting up your bot I assume you’ll be using @prastle’s script from here. You can find it here. We have to add modify the last part a bit: We replace -Ptriplea.server.password=%BOT_PASSWORD% with -Ptriplea.server.password=%BOT_PASSWORD%^ -PcustomHost=0.tcp.ngrok.io^ -PcustomPort=19404 at the end of the file.
I had to remove the "^" for the commands and add a "" to get recognized. It may be useful for newer users to list this information on that page.
When I downloaded the headless file for version 2.5.22294 the "run_bot" file had the incorrect LOBBY_URI variable. In the downloaded file the variable is set to "https://lobby.triplea-game.org". I found this page https://github.com/triplea-game/triplea/blob/master/servers.yml and saw that the variable should be called "https://prerelease.triplea-game.org".
After these changes I am at least been able to connect to it via the same computer that the bot is hosted on.
Hopefully this helps new users as so far it seems to work for me.
-
@deusastra https://prod2-lobby.triplea-game.org is the right one.
-
@lafayette Thank you! That got my game to appear in the lobby. I am now having the issue of getting a password to appear. I have this code but I believe it may be a syntax error? Apologies, I am an inexperienced coder.
readonly BOT_PASSWORD="default password" # # The hostname of the lobby to which the bot will connect. # # The default value is the hostname for the TripleA community's public lobby. # Under normal circumstances, you will not have to change this variable. # readonly LOBBY_URI="https://prod2-lobby.triplea-game.org" ############################################################################### # VARIABLES THAT YOU MAY CUSTOMIZE END HERE # # DO NOT MODIFY ANYTHING BELOW THIS LINE! ############################################################################### java \ -server \ -Xmx256M \ -Djava.awt.headless=true \ -jar triplea-game-headless-2.5.22294.jar \ -Ptriplea.lobby.uri="$LOBBY_URI" \ -Ptriplea.map.folder="$MAPS_FOLDER" \ -Ptriplea.name="$BOT_NAME" \ -Ptriplea.port="$BOT_PORT" \ -Ptriplea.server.password="$BOT_PASSWORD" \
Thank you for the help!
-
@deusastra I'm not 100% sure if bots can even be passworded. The 'server' password refers to how the bot is controlled via admin commands. I don't think it is even used anymore even.