Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22543

Computer getChannel() method returns null in ComputerListeners

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None

      The computer channel can't be used in ComputerListeners because it's closed before the call to listeners is done.
      It causes a problem - you can't run any command in slave computer as part of "onOffline" method because the channel closed before the method called.

      e.g (selenium-plugin)
      VirtualChannel mainChannel = computer.getChannel();
      if (mainChannel != null) {
      try {
      mainChannel.call(new StopSeleniumServer(name));
      } catch (Exception e) {
      e.printStackTrace();
      try {
      mainChannel.call(new RunningRemoteSetterCallable(name, "Error"));
      } catch (Exception e1) {
      e1.printStackTrace();
      }
      }
      }

            ronkorland Ron Korland
            ronkorland Ron Korland
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: