ACE in docker

ruki
Novice
Posts: 6
Joined: Sat Dec 28, 2013 4:06 pm

ACE in docker

Post by ruki » Mon Feb 22, 2021 7:55 am

Probably a pretty small use case, but I was looking into this recently. UT99 works fine in a container but implementing ACE has some challenges.

Wondering if anyone has gotten this to work.

ACE detects and enforces a LAN server based on the internal docker ip 172.0.0.x and then sends the client back the 172.0.0.x container address on the internal port. This behaviour is fair enough but it'd be nice to have an override for this. Something similar to ForcedWANIP= would be good that would, that overrides the ip sent to the client. We would probably need the ability to override the port sent to the client as well I suppose.

I tried overriding the Lan server detection with bIsLanServer=0 under ACEv12e_S.ACENICHelper/ACEv12e_S.ACEActor and coupled that with a fake WANIP (local lan) from my own WANQueryServer just as a long shot to no avail.

Code: Select all

[ACEv12e]: DEBUG: ACE found the following network card: lo
[ACEv12e]: DEBUG: - IPv4 Properties -> Address: 127.0.0.1 - Subnet:  - Internet Access: False
[ACEv12e]: DEBUG: - Can listen on this interface? True
[ACEv12e]: DEBUG: ACE found the following network card: eth0
[ACEv12e]: DEBUG: - IPv4 Properties -> Address: 172.17.0.2 - Subnet:  - Internet Access: False
[ACEv12e]: DEBUG: - Can listen on this interface? True
[ACEv12e]: DEBUG: NICHelper recommends listening on all interfaces
Resolved utgl.unrealadmin.org (158.106.137.11)
[ACEv12e]: PlayerManager Initialization Complete.
[ACEv12e]: - This is a LAN server.
[ACEv12e]: - LAN ListenIP: 172.17.0.2:7779
[ACEv12e]: - WAN ListenIP: xxx.xxx.xxx.xxx:7779 [UPDATING]
[ACEv12e]: - The server's filelist was signed by: AnthraX
[ACEv12e]: Registered Event Handler: ACEv12e_EH.ACEEventActor
[MV14] Maps Reloaded. Total Maps = 515
[ACEv12e]: - WAN IP Retrieved: xxx.xxx.xxx.xxx

Code: Select all

[NPLoaderv19b] Player Join: xxxxxx (192.168.0.201:63686)
[NPLoaderv19b] Loading complete for player: xxxxxx
[ACEv12e]: DEBUG: New player with IP: 192.168.0.201 - Is local IP? 1 - Sending player to server: 172.17.0.2:7779
[ACEv12e]: [xxxxxx]: Player Kicked
[ACEv12e]: [xxxxxx]: Kick Message 0: You have been kicked because of a timeout during the ACE checks.
[ACEv12e]: [xxxxxx]: Kick Message 1: This is usually caused by severe connection problems.
[ACEv12e]: [xxxxxx]: Kick Message 2: Try shutting down all programs that use a lot of bandwidth, memory or CPU time.
[ACEv12e]: [xxxxxx]: [KICKREASON] Connection Problems
Close TcpipConnection0 Mon Feb 22 06:38:46 2021
This is on a linux server, yes I am aware of the disclaimer and am happy to be told this is the behaviour that makes it incompatible but from my testing locally it seems to function enough for my test case providing I can get around the LAN ip detection enforcement.

I am prepping an upgrade to 469 and shifting our servers into docker so we can spin up event/test instances.

Any feedback would be appreciated, thanks.
Image

User avatar
anth
Skilled
Posts: 242
Joined: Thu May 13, 2010 2:23 am

Re: ACE in docker

Post by anth » Mon Feb 22, 2021 9:15 am

This is a bit of a weird corner case. The IP you're connecting from is also a LAN IP (albeit in a different range), so ACE expects that it will route to the LAN IP of the player-manager. That does not seem to be the case here.

I am currently working on ACE v1.3 and will see if I can add new configuration options to override this behavior. An alternative would be to either open source this part of ACE or to add an API that external mods can use to override networking functionality. Will think about it!

ruki
Novice
Posts: 6
Joined: Sat Dec 28, 2013 4:06 pm

Re: ACE in docker

Post by ruki » Mon Feb 22, 2021 9:29 am

Great thanks Anth,

I couldn't ask for more.

Knew it was a corner case but it would really open up some automation paths with ut99 general use, testing and/or event servers.

Let me know if you need any testing done, i'm happy to help out.
Image