0

几天以来,我一直在玩 apache felix。启动 lb 命令时可以看到一切正常:

START LEVEL 2
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (4.0.3)
    1|Active     |    2|Apache Felix Bundle Repository (1.6.6)
    2|Active     |    2|Apache Felix Configuration Admin Service (1.6.0)
    3|Active     |    2|Apache Felix Gogo Command (0.12.0)
    4|Active     |    2|Apache Felix Gogo Runtime (0.10.0)
    5|Active     |    2|Apache Felix Gogo Shell (0.10.0)
    6|Active     |    2|Apache Felix Http Bundle (2.2.0)
    7|Active     |    2|Apache Felix iPOJO (1.8.6)
    8|Active     |    2|Apache Felix iPOJO OSGi Junit Runner (1.0.0)
    9|Active     |    2|Apache Felix Shell Service (1.4.3)
   10|Active     |    2|Apache Felix Web Management Console (3.1.8)
   11|Installed  |    3|[Optimacs/OSGi] DataService - Hello World (1.1.0)
   12|Active     |    2|[Optimacs/OSGi] DataService Model (0.4.1.SNAPSHOT)
   13|Active     |    2|[Optimacs/OSGi] DataService Network API (0.4.1.SNAPSHOT)
   14|Active     |    2|[Optimacs/OSGi] DataService Container (0.4.1.SNAPSHOT)

根据这个列表,我可以使用 Web 管理控制台。为此,我将 org.osgi.service.http.port 选项设置为 8080。当我打开浏览器(Chrome,最新版本)并尝试访问 Web 控制台 ( url = http://localhost:8080/system/console) 时,会出现问题。我收到错误 102(连接被拒绝)。我错过了任何特定的配置步骤吗?

编辑

运行inspect cap servicegogo shell 会报告以下关于 HttpService 的信息:

org.apache.felix.http.bundle [6] provides:
------------------------------------------
service; javax.servlet.http.HttpServlet with properties:
   http.felix.dispatcher = org.apache.felix.http.base.internal.DispatcherServlet
   service.description = Dispatcher for bridged request handling
   service.id = 20
   service.vendor = The Apache Software Foundation
service; java.util.EventListener with properties:
   http.felix.dispatcher = org.apache.felix.http.base.internal.EventDispatcher
   service.description = Dispatcher for bridged HttpSession events
   service.id = 21
   service.vendor = The Apache Software Foundation

不幸的是,没有关于使用的端口的指示。

4

1 回答 1

0

由于 Neil 的评论,该问题已得到解决:

我想知道 HttpService 是否存在,你能从 shell 检查 cap 服务并扫描 HttpService 吗?如果它在那里,它还应该报告它正在使用的端口号。

于 2013-01-29T07:35:32.237 回答