# Lighting won't build (KBM & other solutions already tried)

**URL:** <https://forums.unrealengine.com/t/lighting-wont-build-kbm-other-solutions-already-tried/489997>\
**Category:** Rendering\
**Tags:** swarm-agent, lighting-build, unreal-engine, Lighting, question\
**Created:** [October 20, 2021, 12:41am UTC](https://forums.unrealengine.com/t/lighting-wont-build-kbm-other-solutions-already-tried/489997 "2021-10-20T00:41:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hperk209](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hperk209/32/679714_2.png) [@hperk209](https://forums.unrealengine.com/u/hperk209)\
**Post date:** [October 20, 2021, 12:41am UTC](https://forums.unrealengine.com/t/lighting-wont-build-kbm-other-solutions-already-tried/489997/1 "2021-10-20T00:41:33Z")

</div>

Hi!

Thanks in advance to anyone taking a look. I know your instinct will be to point me to existing articles on this, as there are many. But of the dozens I’ve searched (both official and unofficial), no solution has worked for me so far. A link to my project: [https://drive.google.com/drive/folders/1-GX3VO4Bex-MM3VfrNyrQxe7V3jp8hp6?usp=sharing](https://drive.google.com/drive/folders/1-GX3VO4Bex-MM3VfrNyrQxe7V3jp8hp6?usp=sharing)

My lighting won’t build. It started a few months ago. It’s not just this project. I even started a project from scratch, and it wouldn’t build lighting on that either. I opened this same project on a separate computer, and lighting generated fine. I will post the Swarm log below, and then things I’ve tried. Now, depending on troubleshooting steps I’ve taken, sometimes the log changes and is able to successfully connect to Coordinator, for instance. But the failing certificate is interesting, and I’m wondering if that’s a hangup for which I’ve not found a solution.

2:54:20 PM: Starting up SwarmAgent …  
2:54:20 PM: … registering SwarmAgent with remoting service  
2:54:20 PM: … registering SwarmAgent network channels  
2:54:20 PM: … initializing SwarmAgent  
2:54:20 PM: … certificate check has failed  
2:54:20 PM: … initializing cache  
2:54:20 PM: … using cache folder ‘C:/Users/hperk/AppData/Local/UnrealEngine/4.27/Saved/Swarm\SwarmCache’  
2:54:20 PM: … recreating SwarmAgent cache staging area  
2:54:20 PM: … initializing connection to SwarmCoordinator  
2:54:20 PM: … using SwarmCoordinator on HPERK209-DTOP  
2:55:02 PM: [Ping] Communication with the coordinator failed, job distribution will be disabled until the connection is established  
2:55:02 PM: … SwarmCoordinator failed to be initialized  
2:55:02 PM: … initializing local performance monitoring subsystem  
2:55:02 PM: … initialization successful, SwarmAgent now running  
2:55:02 PM: [Interface:TryOpenConnection] Local connection established  
2:55:02 PM: [Interface:OpenJob] Error: Invalid class

* * *

Things I’ve tried:

- Updating. W10, Windows drivers, Intel drivers, NVIDIA drivers, display drivers
- I ran an sfc /scannow to fix any corrupted files
- Completely reinstalled the engine
- Cleared cache in the DOTNET/Swarmcache folder
- Changed Swarm directory, cleared its cache
- Launched Swarm agent .exe from directory
- Despite having no commercial antivirus, and exceptions into Windows Def for Swarm and Unreal, temporarily turned off firewall
- Trying an earlier version of the engine, all the way back to 4.25.4
- Since Swarm can ping Remote Agent but not Coordinator, I set Coordinator to my desktop name. But still resulted in error
- Clearing C:\Users\AppData\Local\UnrealEngine\4.27\Saved\Swarm\SwarmCache and having it create a new directory
- Enabling Developer Settings in Swarm Agent and setting EnableLocalPerformanceMonitoring to false

* * *

Computer specs:

Intel(R) Core™ i7-8086K CPU @ 4.00GHz  
NVIDIA GeForce GTX 1080  
16 GB RAM  
Windows 10

* * *

---

<div class="post-metadata">

**Author:** ![ahvaas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ahvaas/32/892705_2.png) [@ahvaas](https://forums.unrealengine.com/u/ahvaas)\
**Post date:** [August 9, 2022, 8:28am UTC](https://forums.unrealengine.com/t/lighting-wont-build-kbm-other-solutions-already-tried/489997/2 "2022-08-09T08:28:53Z")

</div>

Here is the solution:

> [@SwarmAgent InvalidClass](https://forums.unrealengine.com/t/swarmagent-invalidclass/318432/2):
>
> After some time. I no get only Invalid Class exception 11:09:46: [CloseConnection] Closing orphaned Job () 11:09:46: [CloseConnection] Connection disconnected 1CE5C080 11:09:46: [GetMessage] Safely returning to 1CE5C080 with no message 11:09:46: [Interface:TryOpenConnection] Local connection established 11:09:46: [Interface:OpenJob] Error: Недопустимый класс 11:09:47: [MaintainConnections] Local connection has closed (1CE5C080) 11:09:47: [MaintainConnections] Removed connection 1CE5C080

Also read this article:

> **[WMI: Repository Corruption, or Not?](https://techcommunity.microsoft.com/t5/ask-the-performance-team/wmi-repository-corruption-or-not/ba-p/375484)**
>
> First published on TECHNET on Aug 08, 2014 ScenarioWindows Management Instrumentation failing due to repository being corruptedThe WMI Repository..

To fix this error I did this In PowerShell (Admin):

> net stop winmgmt /y  
> winmgmt /resetrepository  
> winmgmt /salvagerepository  
> winmgmt /verifyrepository

Done. The lighting now builds successfully.

PS: If some commands were not necessary - please correct me.
