Warning: Failed to build lighting!!! Lighting build failed.

My lighting builds are failing with no log output except the failure message in the title. I’ve tried on source builds of the master branch (pulled yesterday), the release branch (4.26.0), and pre-built versions 4.26.0 and 4.24.3. Tried fresh projects. Lighting fails on all of them as soon as the map contains any of the standard meshes included with the engine (like the standard floor, a cube, etc.) The only engine mesh that doesn’t cause it to fail is the default one that comes fresh in a new level, and I’m guess that’s because the level possibly comes with lighting pre-built.

I’ve tried some suggestions in this thread:

https://forums.unrealengine.com/development-discussion/rendering/1627373-failed-to-build-lighting-for-no-reason

What I’ve tried related to that thread:

  • I’m not using a VPN
  • disabled firewall
  • changed DNS servers
  • flushed DNS cache
  • changed network connection from ethernet (realtek adapter) to wifi (intel adapter)
  • disabled hyper-v to rule out the virtual network adapter causing problems
  • network adapter drivers are up to date

I’m running out of ideas. Anyone having this issue or know of a fix? My current guess is it’s something to do with connection settings in Windows or some connection configuration or interaction with the newest Windows 10 Pro update.

I’ve found my way into the Swarm Agent window where I could view its logs:


[Interface:OpenJob] Error: Access denied

There are no other errors in the Swarm Agent logs.

Why did you do a ton of network-related fixes on something that not only does not use but is completely incapable of interacting with the internet???

The similar issue in the thread I linked was caused by network settings, and I’m having other issues unrelated to UE that are network issues.

Here are the full Swarm logs:



Starting up SwarmAgent ...
... registering SwarmAgent with remoting service
... registering SwarmAgent network channels
... initializing SwarmAgent
...... checking certificate
......... certificate check has failed
...... initializing cache
......... using cache folder 'C:/Users/myuser/source/repos/UnrealEngine/Engine/Saved/Swarm\SwarmCache'
......... recreating SwarmAgent cache staging area
...... initializing connection to SwarmCoordinator
......... using SwarmCoordinator on RENDER-01
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] Coordinator ping failed
......... SwarmCoordinator failed to be initialized
...... initializing local performance monitoring subsystem
... initialization successful, SwarmAgent now running
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[Interface:TryOpenConnection] Local connection established
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[Interface:OpenJob] **Error**: Access denied 
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[RequestShutdown] Shutdown has been requested
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[CloseConnection] Closing connection 62DFB789 using handle 62DFB789
[CloseConnection] Connection confirmed for disconnection 62DFB789
[FlushMessageQueue] Draining message queue for 62DFB789
[FlushMessageQueue] Lock acquired for 62DFB789
[FlushMessageQueue] Lock released for 62DFB789
[FlushMessageQueue] Drain complete for 62DFB789
[CloseConnection] Closing orphaned Job ()
[FlushMessageQueue] Draining message queue for 62DFB789
[FlushMessageQueue] Lock acquired for 62DFB789
[FlushMessageQueue] Lock released for 62DFB789
[FlushMessageQueue] Drain complete for 62DFB789
[PostJobStatsToDB] Database **error:**
[PostJobStatsToDB] Object reference not set to an instance of an object.
[FlushMessageQueue] Draining message queue for 62DFB789
[FlushMessageQueue] Lock acquired for 62DFB789
[FlushMessageQueue] Lock released for 62DFB789
[FlushMessageQueue] Drain complete for 62DFB789
[FlushMessageQueue] Draining message queue for 62DFB789
[FlushMessageQueue] Lock acquired for 62DFB789
[FlushMessageQueue] Lock released for 62DFB789
[CloseConnection] Connection disconnected 62DFB789
[FlushMessageQueue] Drain complete for 62DFB789
[PingCoordinator] Determined that we couldn't ping the coordinator
[PingCoordinator] CoordinatorResponding is false
[GetMessage] Safely returning to 62DFB789 with no message




If I run UE4Editor.exe as administrator, lighting builds successfully. However this prevents me from being able to launch the editor through project shortcuts. I tried running SwarmAgent.exe as administrator with UE4Editor.exe not as administrator, however it fails to build lighting for a different reason. SwarmAgent seems to successfully build the lighting, but some final handshake with the editor seems to fail.

An important detail as well is that I built a new computer a bit over a week ago. On my old computer, I wasn’t running into these issues at all. I think it might have to do with some setting in Windows.

I reinstalled Windows and the problem went away. Still not sure what was causing it, but it seems to have been either a driver or Windows setting of some sort. Other problems that I was having with other programs that seemed to be network-related went away as well. I’ll try to update this if I ever find out what caused it.

2 Likes

Have solved similar issue today, by fixing SwarmAgent and rebuilding it from sources.
In my case, error messages in Swarm Agent log were “Interface:OpenJob Error: value cannot be null”

OS: Windows 10 x64 with all recent updates
UE: version 4.26, installed from Epic Games launcher (not built from source)

I have downloaded sources of UE from Github.
Then I’ve extracted DotNETCommon, UnrealControls, UnrealSwarm subdirectories, patched and rebuilt SwarmAgent.

The patch is below.

❯ cd /path/unreal_swarm/Source/Programs/UnrealSwarm/Agent
❯ diff connections.old/Connections.cs Connections.cs
894c894,897
<                       Environment.CurrentDirectory = GetProcessPathById(ProcessID);
---
>                       string process_path = GetProcessPathById(ProcessID);
>                       if (process_path != null) {
>                               Environment.CurrentDirectory = process_path;
>                       }
❯

After update of SwarmAgent binary, lighting building has proceeded successfully.

Swarm Agent was trying to determine working directory for requesting UE4Editor.exe through Windows Management and Instrumentation (WMI) but was failing and received null instead of path.
Setting workdirectory to NULL has caused exceptions.