public HttpResponse doRestart() throws IOException, ServletException {
   validateAdmin();
   try {
     channel.call(new StopHubCallable());
   } catch (Exception e) {
     throw new IOException(e);
   }
   channel.close();
   try {
     startHub();
     waitForHubLaunch();
   } catch (Exception e) {
     throw new IOException(e);
   }
   return HttpResponses.forwardToPreviousPage();
 }