GridHubConfiguration c = GridHubConfiguration.build(args);
c.setPort(port);
c.setCapabilityMatcher(new JenkinsCapabilityMatcher(Channel.current(), c.getCapabilityMatcher()));
Hub hub = new Hub(c);
hub.start();
<BUG>RegistryHolder.registry = hub.getRegistry();
LOG.fine("Grid Hub started on port " + port);</BUG>
} catch (Exception e) {
Log.error("An error occured while starting the hub", e);
}

GridHubConfiguration c = GridHubConfiguration.build(args);
c.setPort(port);
c.setCapabilityMatcher(new JenkinsCapabilityMatcher(Channel.current(), c.getCapabilityMatcher()));
Hub hub = new Hub(c);
hub.start();
HubHolder.hub = hub;
LOG.fine("Grid Hub started on port " + port);
} catch (Exception e) {
Log.error("An error occured while starting the hub", e);
}
