首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >创建Karaf的Equinox实例

创建Karaf的Equinox实例
EN

Stack Overflow用户
提问于 2014-10-27 10:02:34
回答 1查看 341关注 0票数 0

我正在使用Equinox内核运行Karaf 3.0.1。现在我想创建一个运行Equinox内核的新实例。我试过了:

代码语言:javascript
复制
instance:create test

创建的实例运行Felix核心,所以我尝试更新它的配置${karaf.home}/instances/test/etc/config.properties。在调整之后,每当我尝试连接到这个实例时,我都会收到:

代码语言:javascript
复制
karaf@root: instance:connect test
Connecting to host localhost on port 8105
Error executing command: Failed to get the session

我做错了什么?还有其他方法可以创建Equinox核心实例吗?

EN

回答 1

Stack Overflow用户

发布于 2014-11-23 05:01:57

  1. 使用instance:clone而不是instance:create
  2. Make请确保在创建/克隆实例后启动它,然后再尝试连接。

代码语言:javascript
复制
karaf@root()> bundle:list -t 0 | grep '^ 0'
 0 | Active   |   0 | 3.8.2.v20130124-134944 | OSGi System Bundle     
karaf@root()> instance:clone root test
karaf@root()> instance:list
SSH Port | RMI Registry | RMI Server | State   | PID   | Name
-------------------------------------------------------------
    8101 |         1099 |      44444 | Started | 29306 | root
    8101 |         1099 |      44444 | Stopped | 0     | test
karaf@root()> instance:ssh-port-change test 8102
karaf@root()> instance:rmi-server-port-change test 44445
karaf@root()> instance:rmi-registry-port-change test 1100
karaf@root()> instance:list
SSH Port | RMI Registry | RMI Server | State   | PID   | Name
-------------------------------------------------------------
    8101 |         1099 |      44444 | Started | 29306 | root
    8102 |         1100 |      44445 | Stopped | 0     | test
karaf@root()> instance:start test
karaf@root()> 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.

karaf@test()> bundle:list -t 0 | grep '^ 0'
 0 | Active   |   0 | 3.8.2.v20130124-134944 | OSGi System Bundle     
karaf@test()> 
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26580150

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档