Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4904

instance:create should use next free ssh port

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.7
    • Fix Version/s: 4.1.0, 4.0.9
    • Component/s: karaf
    • Labels:
      None

      Description

      When karaf is started with different ssh port - (8102 for instance)
      then newly created instances should automatically increase it's ssh port to avoid conflict.

      karaf@root()> instance:list
      SSH Port | SSH Host | RMI Registry | RMI Registry Host | RMI Server | RMI Server Host | State   | PID   | Name
      --------------------------------------------------------------------------------------------------------------
          8102 |  0.0.0.0 |         1099 |           0.0.0.0 |      44444 |         0.0.0.0 | Started | 32538 | root
      
      karaf@root()> instance:create abc
      
      karaf@root()> instance:list
      SSH Port | SSH Host | RMI Registry | RMI Registry Host | RMI Server | RMI Server Host | State   | PID   | Name
      --------------------------------------------------------------------------------------------------------------
          8102 |  0.0.0.0 |         1099 |           0.0.0.0 |      44444 |         0.0.0.0 | Started | 32538 | root
          8102 |  0.0.0.0 |         1100 |           0.0.0.0 |      44445 |         0.0.0.0 | Stopped | 0     | abc
      
      karaf@root()> instance:start abc 
      
      karaf@root()> instance:list
      SSH Port | SSH Host | RMI Registry | RMI Registry Host | RMI Server | RMI Server Host | State   | PID   | Name
      --------------------------------------------------------------------------------------------------------------
          8102 |  0.0.0.0 |         1099 |           0.0.0.0 |      44444 |         0.0.0.0 | Started | 32538 | root
          8102 |  0.0.0.0 |         1100 |           0.0.0.0 |      44445 |         0.0.0.0 | Started | 781   | abc
      

      Port is automatically increased when creating new child instances.
      It should do the same also for the first one

      karaf@root()> instance:create abc2
      karaf@root()> instance:list
      SSH Port | SSH Host | RMI Registry | RMI Registry Host | RMI Server | RMI Server Host | State   | PID   | Name
      --------------------------------------------------------------------------------------------------------------
          8102 |  0.0.0.0 |         1099 |           0.0.0.0 |      44444 |         0.0.0.0 | Started | 32538 | root
          8102 |  0.0.0.0 |         1100 |           0.0.0.0 |      44445 |         0.0.0.0 | Started | 781   | abc
          8103 |  0.0.0.0 |         1101 |           0.0.0.0 |      44446 |         0.0.0.0 | Stopped | 0     | abc2
      

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Fang
              Reporter:
              ludvicekj Josef Ludvíček
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: