Hosting a bot from Ubuntu server?
-
I've looked around and can't seem to find any helpful tips on hosting a bot from a headless linux server (specifically ubuntu 18.04). Is it possible? If I missed the topic please point me to the right location. Thanks!
-
@Michael-Hoover Are you attempting to do it live in the lobby?
-
Yeah I would like to if I can.
-
@Michael-Hoover hmm we might need to dig but here is a link for the current Linux pre release
https://github.com/triplea-game/triplea/releases/download/2.0.18542/TripleA_2.0.18542_unix.sh
https://github.com/triplea-game/triplea/releases/download/2.0.18542/triplea-game-headless-2.0.18542.zip
sadly as a win 10 user I am not sure if that is much help -
Thanks I'll check it out.
-
@prastle I can send you a copy of my current bot script np
-
@prastle @Michael-Hoover sent by forum pm
-
thanks
-
@Michael-Hoover in the triplea-game-headless link prastle posted, if you unzip the file you should notice there is a 'run_bot' linux executable. Edit the script with the right parameters as needed, then if you run it, should work.
-
Excellent! Thanks again I'll start messing around with this today.
-
Well, I thought I had everything set up correctly, alas here be the errors I am currently getting after running the script:
Mar 31, 2020 1:50:53 PM org.triplea.game.server.HeadlessGameServer <init>
INFO: Game Server initialized
Mar 31, 2020 1:50:53 PM org.triplea.game.server.HeadlessGameServer lambda$new$1
INFO: Headless Start
Mar 31, 2020 1:50:54 PM games.strategy.engine.message.UnifiedMessengerHub messageReceived
INFO: Adding endpoint: games.strategy.engine.message.unifiedmessenger.HasEndPointImplementor:games.strategy.engine.framework.ui.ServerStartup.SERVER_REMOTE, from: Node(name=Bot_ubuntutest_1, address=/45.79.2.151, port=3300)
Mar 31, 2020 1:50:54 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): ---> POST https://lobby.triplea-game.org/lobby/game-hosting-request HTTP/1.1
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): <--- ERROR SSLHandshakeException: No subject alternative DNS name matching lobby.triplea-game.org found. (737ms)
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): ---> RETRYING
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): ---> POST https://lobby.triplea-game.org/lobby/game-hosting-request HTTP/1.1
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): <--- ERROR SSLHandshakeException: No subject alternative DNS name matching lobby.triplea-game.org found. (92ms)
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): ---> RETRYING
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): ---> POST https://lobby.triplea-game.org/lobby/game-hosting-request HTTP/1.1
Mar 31, 2020 1:50:55 PM org.triplea.http.client.HttpClient$1 log
INFO: GameHostingFeignClient#sendGameHostingRequest(Map): <--- ERROR SSLHandshakeException: No subject alternative DNS name matching lobby.triplea-game.org found. (103ms)
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 -
OK I got the test to work by rolling back to version 1.9.0.0.12226
Is this OK?In the meanwhile I am going to tidy up a bit and see about automating the bot on reboot...
-
OK so the only two things I can't seem to figure out:
- When I start the bot the "Name" field in the lobby is always blank. Not sure how to default this value?
- Not sure how to allocate AI to open positions (this may not be a thing please let me know if you can)?
-
- 1.9.0.0.12226 is a good version for bots. There is something we messed up in 13066.
- The name field should be coming from one of the parameters in the run_bot script. It's interesting you can join and have a blank name. Let us know if you cannot find it.
- Adding AIs to bot games is currently not possible
-
Thanks for all the help everyone. I have four bots up on an Ubuntu server now. 3 are public, one is passworded for my personal use. Let me know if anything is funky. I know I don't have all the maps downloaded yet but I want to let them run for a bit for QC/testing.
I realize you guys probably don't need the extra bots, but this has become an academic exercise for me at this point
-
@Michael-Hoover Play tested briefly a bit of a round. WELL DONE SIR!
-
FWIW @Michael-Hoover , this is the script we use to download all maps: https://github.com/triplea-game/triplea/blob/master/infrastructure/ansible/roles/bot/templates/download-all-maps.j2
The stuff in
{{ }}
are template variables, you'll want to remove/update those as necessary.