1

我正在使用 kie-server-showcase 和 drools-workbench-showcase,通过 docker-run,我可以在 drools UI 中看到 kie-server 并为其部署构建。

在此处输入图像描述

但是,当我使用 docker-compose 时,尝试部署演示 morgauge 项目时出现运行时异常,请参阅此处的日志:http://pastebin.com/qKQ8hgak 但我已经包含了有趣的部分:

kie-server               | 15:24:41,268 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 15690ms - Started 406 of 458 services (106 services are lazy, passive or on-demand)
kie-server               | 15:24:50,369 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://kie_wb:8080/drools-wb/rest/controller/server/kie-server-3aec89f430c2 error Error while sending PUT request to http://kie_wb:8080/drools-wb/rest/controller/server/kie-server-3aec89f430c2 response code 405
kie-server               | 15:25:00,376 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://kie_wb:8080/drools-wb/rest/controller/server/kie-server-3aec89f430c2 error Error while sending PUT request to http://kie_wb:8080/drools-wb/rest/controller/server/kie-server-3aec89f430c2 response code 405
kie-server               | 15:25:10,383 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://kie_wb:8080/drools-wb/rest/controller/server/kie-server-3aec89f430c2 error Error while sending PUT request to http://kie_wb:8080/drools-wb/rest/controller/server/kie-server-3aec89f430c2 response code 405
kie-server               | 15:25:23,534 INFO  [org.kie.server.services.impl.controller.ControllerConnectRunnable] (KieServer-ControllerConnect) Connected to controller, quiting connector thread
kie-server               | 15:25:23,536 INFO  [org.kie.server.services.impl.ContainerManager] (EJB default - 5) About to install containers '[]' on kie server 'KieServer{id='kie-server-3aec89f430c2'name='kie-server-3aec89f430c2'version='6.4.0.Final'location='http://172.18.0.3:8080/kie-server/services/rest/server'}'
kie-server               | 15:26:17,419 WARN  [org.kie.scanner.embedder.MavenSettings] (default task-3) Environment variable M2_HOME is not set
kie-server               | 15:26:17,588 INFO  [org.kie.scanner.Aether] (default task-3) The local repository directory /opt/jboss/.m2/repository doesn't exist. Creating it.
kie-server               | 15:26:18,932 ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /kie-server/services/rest/server/containers/demo: org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalArgumentException: ConversationId not valid - missing releaseId

...

kie-server               | 15:26:19,231 WARN  [org.kie.scanner.MavenRepository] (default task-3) Unable to resolve artifact: mortgages:mortgages:0.0.1
kie-server               | 15:26:20,269 WARN  [org.kie.scanner.MavenRepository] (default task-3) Unable to resolve artifact: mortgages:mortgages:pom:0.0.1
kie-server               | 15:26:20,269 ERROR [org.kie.server.services.impl.KieServerImpl] (default task-3) Error creating container 'demo' for module 'mortgages:mortgages:0.0.1': java.lang.RuntimeException: Cannot find KieModule: mortgages:mortgages:0.0.1
kie-server               |  at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:117) [drools-compiler-6.4.0.Final.jar:6.4.0.Final]

在此处输入图像描述

这是我使用的 docker-compose.yml 文件:

version: '2'

services:

  drools-wb:
    container_name: drools-wb
    image: jboss/drools-workbench-showcase:latest
    ports:
      - 8001:8001
      - 18080:8080
    networks:
      - mckinsey-net

  kie-server:
    container_name: kie-server
    image: jboss/kie-server-showcase:latest
    links:
      - drools-wb:kie_wb
    depends_on:
      - drools-wb
    environment:
      - HOME=/opt/jboss
      - JAVA_HOME=/usr/lib/jvm/java
      - JAVA_OPTS=-XX:MaxPermSize=256m -Xms256m -Xmx512m
      - JBOSS_BIND_ADDRESS=0.0.0.0
      - JBOSS_HOME=/opt/jboss/wildfly
      - KIE_CLASSIFIER=ee7
      - KIE_CONTEXT_PATH=kie-server
      - KIE_MAVEN_REPO=http://localhost:8080/kie-wb/maven2
      - KIE_MAVEN_REPO_PASSWORD=admin
      - KIE_MAVEN_REPO_USER=admin
      - KIE_REPOSITORY=https://repository.jboss.org/nexus/content/groups/public-jboss
      - KIE_SERVER_CONTROLLER_PWD=admin
      - KIE_SERVER_CONTROLLER_USER=admin
      - KIE_SERVER_LOCATION=http://localhost:8080/kie-server/services/rest/server
      - KIE_SERVER_PWD=kieserver1!
      - KIE_SERVER_USER=kieserver
      - KIE_VERSION=6.4.0.Final
      - KIE_WB_ENV_JAVA_HOME=/usr/lib/jvm/java
      - KIE_WB_ENV_JAVA_OPTS=-XX:MaxPermSize=256m -Xms256m -Xmx512m
      - KIE_WB_ENV_JBOSS_BIND_ADDRESS=0.0.0.0
      - KIE_WB_ENV_JBOSS_HOME=/opt/jboss/wildfly
      - KIE_WB_ENV_KIE_CLASSIFIER=wildfly8
      - KIE_WB_ENV_KIE_CONTEXT_PATH=drools-wb
      - KIE_WB_ENV_KIE_DEMO=true
      - KIE_WB_ENV_KIE_REPOSITORY=https://repository.jboss.org/nexus/content/groups/public-jboss
      - KIE_WB_ENV_KIE_SERVER_PROFILE=standalone-full-drools
      - KIE_WB_ENV_KIE_VERSION=6.4.0.Final
      - KIE_WB_ENV_WILDFLY_VERSION=8.2.0.Final
      - KIE_WB_NAME=/kie-server/kie_wb
      - KIE_WB_PORT=tcp://kie_wb:8001
      - KIE_WB_PORT_8001_TCP=tcp://kie_wb:8001
      - KIE_WB_PORT_8001_TCP_ADDR=kie_wb
      - KIE_WB_PORT_8001_TCP_PORT=8001
      - KIE_WB_PORT_8001_TCP_PROTO=tcp
      - KIE_WB_PORT_8080_TCP=tcp://kie_wb:8080
      - KIE_WB_PORT_8080_TCP_ADDR=kie_wb
      - KIE_WB_PORT_8080_TCP_PORT=8080
      - KIE_WB_PORT_8080_TCP_PROTO=tcp
      - KIE_WB_PORT_9990_TCP=tcp://kie_wb:9990
      - KIE_WB_PORT_9990_TCP_ADDR=kie_wb
      - KIE_WB_PORT_9990_TCP_PORT=9990
      - KIE_WB_PORT_9990_TCP_PROTO=tcp
      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      - WILDFLY_VERSION=8.2.0.Final

我不确定为什么它无法解决该工件。有任何想法吗?

4

2 回答 2

1

您必须检查工作台和 kie-server 之间的两个连接,如果它们在不同的节点上运行 - kie-server REST 端点提供的 HTTP 连接以及 kie-server 上的系统 maven 配置,所以它必须使用工作台作为工件的源存储库。

查看 stracktrace,我在运行容器时看到一些 405 错误,并且可能相关,端点可见但不允许...您是否尝试通过其他客户端或命令行向 kie-server 端点发出一些请求?用户有正确的角色吗?在此处查看示例说明

于 2016-10-25T20:50:24.373 回答
0

我最终需要这组 kie-server 环境变量:

      KIE_WB_PORT: tcp://kie_wb:8001
      KIE_WB_PORT_8001_TCP: tcp://kie_wb:8001
      KIE_WB_PORT_8001_TCP_ADDR: kie_wb
      KIE_WB_PORT_8080_TCP: tcp://kie_wb:8080
      KIE_WB_PORT_8080_TCP_ADDR: kie_wb
      KIE_WB_ENV_KIE_CONTEXT_PATH: business-central
于 2021-12-30T00:32:34.810 回答