我尝试了解在docker环境中运行的知识。在遇到了一些使知识运行的问题之后,我终于设法登录了。经过更多的问题,我还能够将知识连接到Fiware Orion上下文浏览器。
但是,当我尝试在我的工作区中添加一个座舱时,我收到一个空白的内容页面。知识导航仍然可见并且可以正常工作。看起来像这样:
我按照官方说明(https://hub.docker.com/r/knowagelabs/knowage-server-docker)运行docker-compose。 docker-compose文件如下所示:
knowage:
image: knowagelabs/knowage-server-docker:6.3.3
links:
- knowagedb:db
ports:
- "8080:8080"
environment:
- WAIT_MYSQL=true
knowagedb:
image: mysql:5.6
environment:
- MYSQL_USER=username
- MYSQL_PASSWORD=userpassword
- MYSQL_DATABASE=knowagedb
- MYSQL_ROOT_PASSWORD=rootpassword
我在docker日志中重新认识了两个可能与此行为相对应的问题:
第一:
knowage_1 | SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
knowage_1 | SLF4J: Defaulting to no-operation (NOP) logger implementation
knowage_1 | SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
第二:
knowage_1 | 03-Apr-2019 07:57:50.345 SEVERE [main] org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans Exception processing Global JNDI Resources
knowage_1 | javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: de.myfoo.commonj.work.FooWorkManagerFactory]
knowage_1 | at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:66)
knowage_1 | at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
knowage_1 | at org.apache.naming.NamingContext.lookup(NamingContext.java:839)
knowage_1 | at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
knowage_1 | at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)
knowage_1 | at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
knowage_1 | at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)
knowage_1 | at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:138)
knowage_1 | at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:145)
knowage_1 | at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:110)
knowage_1 | at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:82)
knowage_1 | at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
knowage_1 | at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
knowage_1 | at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:339)
knowage_1 | at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:786)
knowage_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
knowage_1 | at org.apache.catalina.startup.Catalina.start(Catalina.java:687)
knowage_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
knowage_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
knowage_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
knowage_1 | at java.lang.reflect.Method.invoke(Method.java:498)
knowage_1 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
knowage_1 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
knowage_1 | Caused by: java.lang.ClassNotFoundException: de.myfoo.commonj.work.FooWorkManagerFactory
knowage_1 | at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
knowage_1 | at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
knowage_1 | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
knowage_1 | at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:61)
knowage_1 | ... 22 more
knowage_1 |
高度赞赏提供任何支持以使其运行。
谢谢, 凯文
答案 0 :(得分:0)
我自己弄清楚了。
我需要在docker-compose文件中设置可选参数“ PUBLIC_ADDRESS” ...
knowage:
image: knowagelabs/knowage-server-docker:6.3.3
links:
- knowagedb:db
ports:
- "8080:8080"
environment:
- WAIT_MYSQL=true
- PUBLIC_ADDRESS=localhost
knowagedb:
image: mysql:5.6
environment:
- MYSQL_USER=username
- MYSQL_PASSWORD=userpassword
- MYSQL_DATABASE=knowagedb
- MYSQL_ROOT_PASSWORD=rootpassword
我发现许多其他人遇到问题,因为他们没有正确定义基本网址。所以我只是在容器的“ public_address”环境中添加了“ localhost”