Skip to content

Commit 1115bc9

Browse files
committed
CLOUDSTACK-8067: Fixed NPEs in MS log related to console proxy VM
1 parent 528bc80 commit 1115bc9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

server/src/com/cloud/consoleproxy/AgentHookBase.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,13 @@ public void startAgentHttpHandlerInVM(StartupProxyCommand startupCmd) {
208208
HostVO consoleProxyHost = findConsoleProxyHost(startupCmd);
209209

210210
assert (consoleProxyHost != null);
211-
212-
Answer answer = _agentMgr.send(consoleProxyHost.getId(), cmd);
213-
if (answer == null || !answer.getResult()) {
214-
s_logger.error("Console proxy agent reported that it failed to execute http handling startup command");
215-
} else {
216-
s_logger.info("Successfully sent out command to start HTTP handling in console proxy agent");
211+
if (consoleProxyHost != null) {
212+
Answer answer = _agentMgr.send(consoleProxyHost.getId(), cmd);
213+
if (answer == null || !answer.getResult()) {
214+
s_logger.error("Console proxy agent reported that it failed to execute http handling startup command");
215+
} else {
216+
s_logger.info("Successfully sent out command to start HTTP handling in console proxy agent");
217+
}
217218
}
218219
}catch (NoSuchAlgorithmException e) {
219220
s_logger.error("Unexpected exception in SecureRandom Algorithm selection ", e);

0 commit comments

Comments
 (0)