@@ -112,6 +112,7 @@ public Answer executeRequest(final Command cmd) {
112112 }
113113
114114 private Answer execute (StartConsoleProxyAgentHttpHandlerCommand cmd ) {
115+ s_logger .info ("Invoke launchConsoleProxy() in responding to StartConsoleProxyAgentHttpHandlerCommand" );
115116 launchConsoleProxy (cmd .getKeystoreBits (), cmd .getKeystorePassword (), cmd .getEncryptorPassword ());
116117 return new Answer (cmd );
117118 }
@@ -361,29 +362,31 @@ public void run() {
361362 try {
362363 Class <?> consoleProxyClazz = Class .forName ("com.cloud.consoleproxy.ConsoleProxy" );
363364 try {
365+ s_logger .info ("Invoke setEncryptorPassword(), ecnryptorPassword: " + encryptorPassword );
364366 Method methodSetup = consoleProxyClazz .getMethod (
365367 "setEncryptorPassword" , String .class );
366368 methodSetup .invoke (null , encryptorPassword );
367369
370+ s_logger .info ("Invoke startWithContext()" );
368371 Method method = consoleProxyClazz .getMethod (
369372 "startWithContext" , Properties .class ,
370373 Object .class , byte [].class , String .class );
371374 method .invoke (null , _properties , resource , ksBits ,
372375 ksPassword );
373376 } catch (SecurityException e ) {
374- s_logger .error ("Unable to launch console proxy due to SecurityException" );
377+ s_logger .error ("Unable to launch console proxy due to SecurityException" , e );
375378 System .exit (ExitStatus .Error .value ());
376379 } catch (NoSuchMethodException e ) {
377- s_logger .error ("Unable to launch console proxy due to NoSuchMethodException" );
380+ s_logger .error ("Unable to launch console proxy due to NoSuchMethodException" , e );
378381 System .exit (ExitStatus .Error .value ());
379382 } catch (IllegalArgumentException e ) {
380- s_logger .error ("Unable to launch console proxy due to IllegalArgumentException" );
383+ s_logger .error ("Unable to launch console proxy due to IllegalArgumentException" , e );
381384 System .exit (ExitStatus .Error .value ());
382385 } catch (IllegalAccessException e ) {
383- s_logger .error ("Unable to launch console proxy due to IllegalAccessException" );
386+ s_logger .error ("Unable to launch console proxy due to IllegalAccessException" , e );
384387 System .exit (ExitStatus .Error .value ());
385388 } catch (InvocationTargetException e ) {
386- s_logger .error ("Unable to launch console proxy due to InvocationTargetException" );
389+ s_logger .error ("Unable to launch console proxy due to InvocationTargetException " + e . getTargetException (). toString (), e );
387390 System .exit (ExitStatus .Error .value ());
388391 }
389392 } catch (final ClassNotFoundException e ) {
@@ -402,22 +405,22 @@ public void run() {
402405 Method methodSetup = consoleProxyClazz .getMethod ("setEncryptorPassword" , String .class );
403406 methodSetup .invoke (null , encryptorPassword );
404407 } catch (SecurityException e ) {
405- s_logger .error ("Unable to launch console proxy due to SecurityException" );
408+ s_logger .error ("Unable to launch console proxy due to SecurityException" , e );
406409 System .exit (ExitStatus .Error .value ());
407410 } catch (NoSuchMethodException e ) {
408- s_logger .error ("Unable to launch console proxy due to NoSuchMethodException" );
411+ s_logger .error ("Unable to launch console proxy due to NoSuchMethodException" , e );
409412 System .exit (ExitStatus .Error .value ());
410413 } catch (IllegalArgumentException e ) {
411- s_logger .error ("Unable to launch console proxy due to IllegalArgumentException" );
414+ s_logger .error ("Unable to launch console proxy due to IllegalArgumentException" , e );
412415 System .exit (ExitStatus .Error .value ());
413416 } catch (IllegalAccessException e ) {
414- s_logger .error ("Unable to launch console proxy due to IllegalAccessException" );
417+ s_logger .error ("Unable to launch console proxy due to IllegalAccessException" , e );
415418 System .exit (ExitStatus .Error .value ());
416419 } catch (InvocationTargetException e ) {
417- s_logger .error ("Unable to launch console proxy due to InvocationTargetException" );
420+ s_logger .error ("Unable to launch console proxy due to InvocationTargetException " + e . getTargetException (). toString (), e );
418421 System .exit (ExitStatus .Error .value ());
419422 } catch (final ClassNotFoundException e ) {
420- s_logger .error ("Unable to launch console proxy due to ClassNotFoundException" );
423+ s_logger .error ("Unable to launch console proxy due to ClassNotFoundException" , e );
421424 System .exit (ExitStatus .Error .value ());
422425 }
423426 }
0 commit comments