Closed Greelan closed 1 year ago
Can I get a link for the WIP ARMA3 config?
I've found out what's up. The coded ARMA3 module waits 15 seconds before making the first connection attempt. I left a comment saying "Due to a bug in ARMA, connecting too early will cause subsequent attempts to fail.".
Additionally, RCONConnectDelaySeconds wasn't implemented. This affects the delay before the first attempt to connect to RCON. This is now implemented and I've edited my local version of the config to wait the same 15 seconds.
There's a problem somewhere with the password not being set correctly. If I manually set the password internally to be correct then generic with this change connected just fine.
We covered the last thing in Discord.
I'm curious though... Is that not implemented in other RCON modes? I would have assumed putting it in before meant putting it in for all.
The RCON logic is shared across all protocols. The 'wait this long before trying again' delay was implemented and working fine, but the 'wait this long before even trying the first attempt' delay was not implemented, so I've now implemented that. For ARMA/other BE apps I recommend a delay of 15 seconds.
I've also added PersistRandomPassword as a setting which if set, won't cycle the password every single start. Instead it'll generate a random password once and leave it so long as the value is empty to start with. The password is also now stored encrypted.
Tested in CI with the above linked configuration, only tweak is setting RCONConnectDelaySeconds
to 15.
Reopening due to issue being persistent in 2.4.1.2 mainline and 2.4.1.4 CI. Adding to 2.4 LTS milestone.
It was fixed at one stage, and has now reverted.
It is particularly a problem on Windows (at least on Linux the RCON connects and is functional, although after some time it also seems to stop working).
Windows is a mess. As I commented in discord, either:
the server starts, then the instance crashes with a socket error:
[20:53:03] [ErrorReporter:admin Error] : Unhandled Exception: Please report this to the AMP developers.
[20:53:03] [ErrorReporter:admin Error] : [Error] --- Begin Exception Data ---
[Error] OS: Windows (x86_64/None)
[Error] Module: GenericModule, Version: AMP 2.4.1.2
[Error] Release spec: Ci_Build - built by CUBECODERS/buildbot on CCL-DEV
[Error] Instance ID: bc1e42f9-bfa0-4be3-8154-87bc6073aae8
[Error] ObjectDisposedException
[Error] [0] (ObjectDisposedException) : Cannot access a disposed object.
Object name: 'System.Net.Sockets.UdpClient'.
[Error] at Net.Sockets.UdpClient.EndSend(IAsyncResult asyncResult)
at RCONPlugin.BattlEyeClient.<SendPacket>()
at RCONPlugin.BattlEyeClient.<Login>()
at GenericModule.GenericApp.<SetupRCON>()
[Error] --- End Exception Data ---
[20:53:03] [ErrorReporter:admin Info] : ####################################
[20:53:03] [ErrorReporter:admin Info] : # Self Diagnostics #
[20:53:03] [ErrorReporter:admin Info] : ####################################
[20:53:03] [ErrorReporter:admin Info] : AMP Diagnostics could not establish a solution for this exception.
This is even with the (recommended by CubeCoders in the official module) 15 second RCON connection delay.
The problem is even more acute when mods are loaded. The server takes longer, and so the RCON delay is not enough, leading to the socket error.
Surely AMP shouldn't crash if it can't open a socket - rather, it should deal with it gracefully and then try again.
But even if AMP does connect, there is the issue that the RCON communication does not work.
I've verified that once RCon connects in Windows it does NOT allow console input like Greelan says above. Here's the debug logging if it helps:
[20:04:32] [Core:IceOfWraith Debug] : Task Starting Arma 3... () ended: Finished
RCon admin #0 (127.0.0.1:56848) logged in
[20:04:46] [API:IceOfWraith Activity] : Sent to console: `#monitords 1`
And the mods issue is verified as well. Followed the guide he's started here for the list of mods to use. https://gist.github.com/Greelan/92e4a2261366a8b303c4263402d0ca9c#loading
Running in to this myself now too... AMP v2.4.1.2, built 21/12/2022 17:54 Windows 2019 Standard
[14:03:05] [ErrorReporter:smits Error] : Unhandled Exception: This will be automatically reported to the AMP developers.
[14:03:05] [ErrorReporter:smits Error] : [Error] --- Begin Exception Data ---
[Error] OS: Windows (x86_64/HyperV)
[Error] Module: GenericModule, Version: AMP 2.4.1.2
[Error] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Error] Instance ID: 7bf3dcc8-2937-4c5d-8645-0f5970a7868f
[Error] ObjectDisposedException
[Error] [0] (ObjectDisposedException) : Cannot access a disposed object.
Object name: 'System.Net.Sockets.UdpClient'.
[Error] at Net.Sockets.UdpClient.EndSend(IAsyncResult asyncResult)
at RCONPlugin.BattlEyeClient.<SendPacket>()
at RCONPlugin.BattlEyeClient.<Login>()
at GenericModule.GenericApp.<SetupRCON>()
[Error] --- End Exception Data ---
Closing this as it is now generally functional.
Bug Report
System Information
I confirm:
[x] that my operating system is up-to-date.
Symptoms
Putting this issue here so it does not get lost.
Even since the fix in 2.4.0.8 to address SourceRCON/TelnetRCON not working after a server restart (see https://github.com/CubeCoders/AMP/issues/672), BattlEyeRCON has been broken in Generic.
As noted in the comments in the other issue (with for example an Arma3 generic instance):
This is the only issue preventing the finalisation of the Arma3 generic template, as well as DayZ and Arma Reforger.
Reproduction
See above.