# 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:** 1\
**Showing post:** 2

<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.

---

_[View the full topic](https://forums.unrealengine.com/t/lighting-wont-build-kbm-other-solutions-already-tried/489997)._
