2014-10-27 23 views
0

我正在用Equinox核心運行Karaf 3.0.1。現在我想創建一個也運行Equinox核心的新實例。我曾嘗試:創建卡拉夫的Equinox實例

instance:create test 

創建的實例運行菲利克斯核心,所以我嘗試更新其配置${karaf.home}/instances/test/etc/config.properties。調整後,每當我嘗試連接到此實例,我收到:

[email protected]: instance:connect test 
Connecting to host localhost on port 8105 
Error executing command: Failed to get the session 

我做了什麼錯?有沒有另一種方法來創建Equinox核心實例?

回答

0
  1. 使用instance:clone而不是instance:create
  2. 確保您啓動實例您創建後/克隆它 嘗試連接之前。

[email protected]()> bundle:list -t 0 | grep '^ 0' 
0 | Active | 0 | 3.8.2.v20130124-134944 | OSGi System Bundle  
[email protected]()> instance:clone root test 
[email protected]()> instance:list 
SSH Port | RMI Registry | RMI Server | State | PID | Name 
------------------------------------------------------------- 
    8101 |   1099 |  44444 | Started | 29306 | root 
    8101 |   1099 |  44444 | Stopped | 0  | test 
[email protected]()> instance:ssh-port-change test 8102 
[email protected]()> instance:rmi-server-port-change test 44445 
[email protected]()> instance:rmi-registry-port-change test 1100 
[email protected]()> instance:list 
SSH Port | RMI Registry | RMI Server | State | PID | Name 
------------------------------------------------------------- 
    8101 |   1099 |  44444 | Started | 29306 | root 
    8102 |   1100 |  44445 | Stopped | 0  | test 
[email protected]()> instance:start test 
[email protected]()> instance:connect test 
Connecting to host localhost on port 8102 
Connecting to unknown server. Automatically adding to known hosts. 
Storing the server key in known_hosts. 
Password: ***** 
Connected 
     __ __     ____  
    ///_/____ __________ _/ __/  
    /,</__ `/ ___/ __ `/ /_  
    //| |/ /_/////_//__/  
    /_/ |_|\__,_/_/ \__,_/_/  

    Apache Karaf (3.0.2) 

Hit '<tab>' for a list of available commands 
and '[cmd] --help' for help on a specific command. 
Hit 'system:shutdown' to shutdown Karaf. 
Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session. 

[email protected]()> bundle:list -t 0 | grep '^ 0' 
0 | Active | 0 | 3.8.2.v20130124-134944 | OSGi System Bundle  
[email protected]()>