PazerOP / tf2_bot_detector

Automatically detects and votekicks cheaters/bots in TF2 casual.
MIT License
403 stars 54 forks source link

[BUG] TF2 never accepts RCON connections #378

Closed BadCoder2 closed 2 years ago

BadCoder2 commented 2 years ago

Describe the bug

TF2 never accepts the RCON connection. To Reproduce Steps to reproduce the behavior:

  1. Launch TF2BD.
  2. Start TF2 with the special button.
  3. TF2 never accepts the RCON connection.

Expected behavior

TF2BD should start normally.

Logs

Add any relevant logs. Logs are found by going to File → Open Logs Folder 2021-10-10_17-55-48.log

Desktop:

  • OS: Windows 10
  • Version of bot detector: 1.2.1.934

Additional context

After a quick look through the logs, the problem seems to be the following:

[18:00:56] RCONActionManager.cpp(91):operator (): [SRCON] class srcon::srcon_error @ D:\a\tf2_bot_detector\tf2_bot_detector\submodules\SourceRCON\src\async_client.cpp:103 in send_command(): Failed to initiate RCON connection: No connection could be made because the target machine actively refused it.

I've tried the obvious stuff (installer + portable, disabling AV/firewall) and don't have a clue what could be causing this. It could be related to the fact that I just switched to a new computer (though I did install the required redistributables.) If you care about parts, the CPU is a Ryzen 5 5600x and the GPU is a RTX 3070 Ti.

ClusterConsultant commented 2 years ago

can you verify that tf2bd is setting the launch options correctly?

BadCoder2 commented 2 years ago

Sorry, could you tell me how to do that?

ClusterConsultant commented 2 years ago

In powershell ps hl2 | select commandline

BadCoder2 commented 2 years ago

Returns nothing. Guessing that's the issue? image

ClusterConsultant commented 2 years ago

That would be it. Try setting the options manually as a work around.

dummy -game tf -steam -secure -usercon -high +developer 1 +alias developer +contimes 0 +alias contimes +ip 0.0.0.0 +alias ip +sv_rcon_whitelist_address 127.0.0.1 +alias sv_rcon_whitelist_address +sv_quota_stringcmdspersecond 1000000 +alias sv_quota_stringcmdspersecond +rcon_password hMVVoAtGhNe7YTTN +alias rcon_password +hostport 47632 +alias hostport +alias cl_reload_localization_files +net_start +con_timestamp 1 +alias con_timestamp -condebug -conclearlog

you can/should change the port and password to be something random

BadCoder2 commented 2 years ago

The boot options aren't changing anything for some reason. In PS it still says no command line arguments, despite command prompt having no issues: image

BadCoder2 commented 2 years ago

...but the weirdest part is in Process Explorer, it shows the command arguments as present: image

BadCoder2 commented 2 years ago

I just reinstalled TF2 and it still isn't working- but adding other launch flags like -novid (skip valve intro) does take effect.

BadCoder2 commented 2 years ago

alright- because I waited long enough it decided to work. maybe it's something in my config? I don't think I changed anything related to RCON. In any case, it works! Thanks for your contributions :)