Lighting not building. Swarm seems to be the cause

Hi there. I am having trouble building my lighting in 4.7.3. It simply will not build at all. I get a Starting up Swarm Connection dialogue box for a split second followed by nothing.

So far I have attempted:

  • Uninstalling and reinstalling twice
  • Making sure that firewalls are allowing swarm to load
  • Disabling firewalls completely and then trying a light build
  • Testing a light build in 4.6.1 (which works)
  • Testing build 4.7.3 on my work computer (which also works)

This is what I get in the log for Swarm Agent

21:06:49: Starting up SwarmAgent …
21:06:49: … registering SwarmAgent with remoting service
21:06:49: … registering SwarmAgent network channels
21:06:49: … initializing SwarmAgent
21:06:49: … certificate check has failed
21:06:49: … initializing cache
21:06:49: … using cache folder ‘C:/Users//AppData/Local/UnrealEngine/4.7/Saved/Swarm\SwarmCache’
21:06:49: … recreating SwarmAgent cache staging area
21:06:49: … initializing connection to SwarmCoordinator
21:06:49: … using SwarmCoordinator on RENDER-01
21:06:51: … SwarmCoordinator failed to be initialized
21:06:51: … initializing local performance monitoring subsystem
21:06:53: … initialization successful, SwarmAgent now running
21:06:58: [Interface:TryOpenConnection] Local connection established
21:06:58: [Interface:OpenJob] Error: Invalid namespace

Any ideas on what is wrong here?

Thanks for reading

Hi ,

the “Invalid namespace” looks like Windows WMI error.

  1. Are you using sources or binary version of the engine?

  2. Are you able to startup SwarmAgent.exe normally? Not through the editor?

Thanks,

Hi , apologies for the late reply.

I am able to open SwarmAgent.exe.

How would I go about finding out if I’m using a binary version or sources?

Thanks for getting back to me,

If you downloaded the engine through the Launcher you are using a binary one.

If you synced the engine sources through GitHub and built it you are using sources.

If you start SwarmAgent.exe normally (not from the editor) what is the log in there?

I downloaded it through the launcher so that’ll make it binary.

This is what I got from the log from swarm.exe without launching the editor

22:45:50: Starting up SwarmAgent …
22:45:50: … registering SwarmAgent with remoting service
22:45:50: … registering SwarmAgent network channels
22:45:50: … initializing SwarmAgent
22:45:50: … certificate check has failed
22:45:50: … initializing cache
22:45:50: … using cache folder ‘C:\Program Files\Epic Games\4.7\Engine\Binaries\DotNET/SwarmCache’
22:45:50: … recreating SwarmAgent cache staging area
22:45:50: … initializing connection to SwarmCoordinator
22:45:50: … using SwarmCoordinator on RENDER-01
22:45:52: … SwarmCoordinator failed to be initialized
22:45:52: … initializing local performance monitoring subsystem
22:45:52: … initialization successful, SwarmAgent now running

Also this is what I get when I try and build lighting:

22:49:26: [Interface:TryOpenConnection] Local connection established
22:49:26: [Interface:OpenJob] Error: Invalid namespace

Ok, so I’d like to ask you to try something:

  1. Close all SwarmAgent.exe/SwarmCoordinator.exe instances.
  2. Backup SwarmInterface.dll and SwarmInterface.pdb (if it exists) in your Engine\Binaries\DotNET.
  3. Extract contents of attached file to Engine\Binaries\DotNET.
  4. Open up SwarmAgent.exe.
  5. Try to build lighting again.
  6. Copy log from SwarmAgent.exe and paste it here.

This will help me investigate as it is not happening here :(.

Thanks,

Hi , I followed your steps.

When I extracted the files you sent me into Engine/Binaries/DotNET I noticed that SwarmInterface.pdb was missing.

This is the log I got from Swarm after a light build.

01:08:44: Starting up SwarmAgent …
01:08:44: … registering SwarmAgent with remoting service
01:08:44: … registering SwarmAgent network channels
01:08:44: … initializing SwarmAgent
01:08:44: … certificate check has failed
01:08:44: … initializing cache
01:08:44: … using cache folder ‘C:\Program Files\Epic Games\4.7\Engine\Binaries\DotNET/SwarmCache’
01:08:44: … recreating SwarmAgent cache staging area
01:08:44: … initializing connection to SwarmCoordinator
01:08:44: … using SwarmCoordinator on RENDER-01
01:08:46: … SwarmCoordinator failed to be initialized
01:08:46: … initializing local performance monitoring subsystem
01:08:48: … initialization successful, SwarmAgent now running
01:10:26: [Interface:TryOpenConnection] Local connection established
01:10:27: [Interface:OpenJob] Error: Invalid namespace

and…

Server stack trace:
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementObjectSearcher.Initialize()
at System.Management.ManagementObjectSearcher.Get()
at Agent.Agent.GetProcessPathById(Int32 ProcessID)
at Agent.Agent.SetCurrentDirectoryByProcessID(Int32 ProcessID)
at Agent.Agent.OpenJob_1_0(Int32 ConnectionHandle, Hashtable InParameters, Hashtable& OutParameters)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at NSwarm.IAgentInterfaceWrapper.OpenJobDelegate.EndInvoke(Hashtable& OutParameters, IAsyncResult result)
at NSwarm.IAgentInterfaceWrapper.OpenJob(Int32 ConnectionHandle, AgentGuid JobGuid) in d:\GitHub\UnrealEngine\release\UnrealEngine\Engine\Source\Editor\SwarmInterface\DotNET\SwarmInterface.cs:line 464
at NSwarm.FSwarmInterface.OpenJob(FGuid JobGuid) in d:\GitHub\UnrealEngine\release\UnrealEngine\Engine\Source\Editor\SwarmInterface\DotNET\SwarmInterface.cs:line 2006

Hey,

that may help!

Could you verify WMI permissions for your account that SwarmAgent is running?

Here is a tutorial how to set it:

Required namespace is: Root/CIMV2.

I think minimum required permission is “Enable Account”, but if that won’t help you can experiment with full permissions.

Let me know if that helps.

Thanks,

There doesn’t seem to be a CIMV2 inside the Root folder :frowning:

Hmm, so that’s basically our problem, cause Swarm is using it :(.

This is OS specific, but I’ll try to look around what it means and if there are some workarounds.

Thanks,

This page contains steps how to fix missing WMI namespaces:

You’re interested in Scenario 1, and missing namespace is CimV2.

Please, let me know if that helped!

Thanks,

I’m probably missing something simple here but I only got this far this morning. In the command prompt it says CimWin32.mof not found. These files do exist though in C:\Windows\System32\wbem


Thanks,

TBH it’s a OS problem and I’m not really sure how to fix it.

Could you try suggestions on this page? It seems like it solves similar problem.

Thanks,

Hi ,

have you managed to fix your problem? It would be helpful if you could confirm what helped in your case if anyone else encounters it.

Thanks,

Hey there sorry for the late reply. I tried the suggestions but no success.

This is what happened with the script


And this is what happened with the second suggestion.


when running winmgmt.exe/standalonehost it says please stop and restart Winmgmt. I couldn’t find it, That’s as far as I could get with it as my understanding of these sort of things are practically non-existant.

Thanks,

According to the forums CimV2 should be there on a healthy system. I’m affraid that we’re going to end up on some MS forums to resolve this.

Anyway, could you try one more thing? I just realized that when you said that mofcomp.exe had reported that CimWin32.mof had been missing you had executed it from C:\Windows\system32.

Could you try it again from C:\Windows\system32\wbem?

Thanks,

This is what I get when mofcomp.exe is executed from C:\Windows\system32\wbem

Definitely we’re getting closer, cause on my machine it finishes with success.

Are you doing it on console with elevated privledges (i.e. as administrator)? If not, please retry as admin.