I’m using the ResavePackage commandlet to build lighting on my builder (Apple Silicon, Unreal 5.4), but I faced a similar issue. UnrealEditor-Cmd was not communicating with the UnrealLightmass subprocess, even though I had disabled all firewalls. I realized that only UnrealLightmass was listening to port 6666. After some debugging, I discovered that UnrealEditor-Cmd was not starting the UdpMessaging system and hence didn’t listen to the port. As a workaround, I added -messaging to the build command forcing the UnrealEditor-Cmd to start the UdpMessagin system, and I finally got it running.
Here is my final command to automate building lighting:
[BUILDER_WORKSPACE]/UnrealEngine/Engine/Binaries/Mac/UnrealEditor-Cmd "[BUILDER_WORKSPACE]/Project/Project.uproject" -run=ResavePackages -buildtexturestreaming -buildlighting -messaging -quality=Preview -MapsOnly -ProjectOnly -AllowCommandletRendering -SkipSkinVerify -Map=MainMap