Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect AI bot to Game Server from outside of machine host. #4244

Closed
markmandel opened this issue Mar 12, 2020 · 2 comments
Closed

Cannot connect AI bot to Game Server from outside of machine host. #4244

markmandel opened this issue Mar 12, 2020 · 2 comments

Comments

@markmandel
Copy link

Description

If I have a STK server hosted in the Cloud, and I want to connect AI agents from other machines in the cloud for system load testing, or from my local machine, because if I do, it gets rejected with the following message:

➜  SuperTuxKart-1.1-linux ./run_game.sh --connect-now=x.x.x.x:7217 --network-ai=3

Running 64-bit version...
...
[info   ] STKHost: Host initialized.
[info   ] ConnectToServer: SETUP
[info   ] ProtocolManager: A 15ConnectToServer protocol has been started.
[info   ] ConnectToServer: Trying connecting to 34.69.193.116:7217 from port 37607, retry remain: 3
[info   ] ConnectToServer: Connected to 34.69.193.116:7217
[info   ] ProtocolManager: A 11ClientLobby protocol has been started.
[info   ] ProtocolManager: A 15ConnectToServer protocol has been terminated.
[info   ] STKHost: Listening has been started.
[info   ] ClientLobby: Synchronous message of type 2
[error  ] STKHost: Connection refused: Invalid player connecting.
[info   ] ProtocolManager: A 11ClientLobby protocol has been terminated.
[info   ] STKHost: Listening has been stopped.

Steps to reproduce

  1. Host a Game Server in the cloud / on the internet somewhere.
  2. Attempt to connect a game AI agent to it, through ./run_game.sh --connect-now=x.x.x.x:port --network-ai=3
  3. Watch it fail. 😭

Configuration

STK release version: 1.1
STK Source (PPA, distribution package, official binary, etc.): official binary
System: Debian

Additional information

I'm assuming the concern here is that people could spam bot a server if you allow AI's to connect from anywhere. It would be useful to have an option in server_config.xml that allows AI connections from anywhere, without having to recompile from source.

My use case is to use this to do load testing and demos of a game server orchestration system, so having this as an option would be highly useful.

@Benau
Copy link
Contributor

Benau commented Mar 12, 2020

#4147 (comment)

You need to change those line for now, actually in latest git it is possible to let ai join in the same process so the ai_handling option will be changed to ai_anywhere soon (but not now, too many todos atm.....)

@markmandel
Copy link
Author

Thanks for the quick response. I made the change as well and compiled, and it is working.

I look forward to the new release with new AI handling options 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants