[
https://issues.apache.org/jira/browse/KARAF-4904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15769665#comment-15769665
]
ASF subversion and git services commented on KARAF-4904:
--------------------------------------------------------
Commit da03f64c8dd81b9059eb6f581d444f1ab230feaf in karaf's branch
refs/heads/karaf-4.0.x from [~ffang]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=da03f64 ]
[KARAF-4904]instance:create should use next free ssh port
(cherry picked from commit 6baf47d332587b45b48c4f899aa2a12c92e1fc00)
> instance:create should use next free ssh port
> ---------------------------------------------
>
> Key: KARAF-4904
> URL: https://issues.apache.org/jira/browse/KARAF-4904
> Project: Karaf
> Issue Type: Bug
> Components: karaf-instance
> Affects Versions: 4.0.7
> Reporter: Josef Ludvíček
> Assignee: Freeman Fang
>
> 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.
> {code}
> 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
> {code}
> Port is automatically increased when creating new child instances.
> It should do the same also for the first one
> {code}
> 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
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)