无法运行示例 Activiti Cloud 应用程序

发布于 2025-01-12 21:08:08 字数 3149 浏览 1 评论 0原文

我正在尝试在 docker 中运行 Activiti Cloud 示例。
我正在使用这个官方教程:
https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose

前面的步骤全部成功直到我尝试
“要开始工作,请在 Postman Keycloak 集合中执行 getKeycloakToken hruser。然后在 rb-my-app Postman 集合中运行 startProcess。”

我成功在Postman Keycloak集合中执行getKeycloakToken hruser。
我无法在 rb-my-app Postman 集合中运行 startProcess 。

当我在 Postman 建模集合中执行 getModels 时,得到 404。
当我在 Postman rb 集合中执行 startProcess 时,我得到了 500 。

日志中主要错误信息:

example-runtime-bundle             | 2022-03-08 19:08:30.970  WARN [rb,,] 7 --- [nio-8080-exec-1] o.keycloak.adapters.KeycloakDeployment   : Failed to load URLs from http://127.0.0.1.nip.io/auth/realms/activiti/.well-known/openid-configuration
example-runtime-bundle             | 
example-runtime-bundle             | java.net.ConnectException: Connection refused (Connection refused)

相关配置:
在 docker-compose.yml 中:

  keycloak:
    container_name: keycloak
    image: activiti/activiti-keycloak
    volumes:
      - ./activiti-realm.json:/opt/jboss/keycloak/activiti-realm.json
    restart: unless-stopped
    depends_on:
      - nginx

  example-runtime-bundle:
    container_name: example-runtime-bundle
    image: activiti/example-runtime-bundle:${VERSION}
    environment:
      # JAVA_OPTS: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -noverify"
      SPRING_JMX_ENABLED: "false"
      ACT_KEYCLOAK_URL: "http://${DOCKER_IP}/auth"
      SPRING_RABBITMQ_HOST: "rabbitmq"
      SERVER_SERVLET_CONTEXT_PATH: /rb
      SPRING_DATASOURCE_URL: jdbc:postgresql://activiti-postgres:5432/activitidb
      SPRING_DATASOURCE_USERNAME: activiti
      SPRING_DATASOURCE_PASSWORD: mypassword
      SPRING_JPA_DATABASE_PLATFORM: org.hibernate.dialect.PostgreSQLDialect
      SPRING_JPA_GENERATE_DDL: "true"
      SPRING_JPA_HIBERNATE_DDL_AUTO: update
      # ACTIVITI_SECURITY_POLICIES_0_NAME: "HR Group restricted to SimpleProcess and ConnectorProcess"
      # ACTIVITI_SECURITY_POLICIES_0_GROUPS: "hr"
      # ACTIVITI_SECURITY_POLICIES_0_ACCESS: "WRITE"
      # ACTIVITI_SECURITY_POLICIES_0_SERVICENAME: "rb-my-app"
      # ACTIVITI_SECURITY_POLICIES_0_KEYS: "SimpleProcess,ConnectorProcess,fixSystemFailure,twoTaskProcess"
      # ACTIVITI_SECURITY_POLICIES_1_NAME: "testgroup not restricted at all"
      # ACTIVITI_SECURITY_POLICIES_1_GROUPS: "testgroup"
      # ACTIVITI_SECURITY_POLICIES_1_ACCESS: "WRITE"
      # ACTIVITI_SECURITY_POLICIES_1_SERVICENAME: "rb-my-app"
      # ACTIVITI_SECURITY_POLICIES_1_KEYS: "*"
    restart: unless-stopped
    depends_on:
      - nginx
      - keycloak
      - rabbitmq
      - activiti-postgres

.env 中:

DOCKER_IP=127.0.0.1.nip.io
VERSION=7.1.0-M13
KEYCLOAK_REALM=activiti
KEYCLOAK_RESOURCE=activiti

完整日志输出位于此处:

应该做什么调试/检测问题并消除错误?
谢谢。

I am trying to run Activiti Cloud example in docker.
I am using this official tutorial:
https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud/getting-started-docker-compose

All the prior steps succeeded till I try
"To start work, execute getKeycloakToken hruser in Postman Keycloak collection. Then run startProcess in rb-my-app Postman collection."

I succeeded to execute getKeycloakToken hruser in Postman Keycloak collection.
I failed to run startProcess in rb-my-app Postman collection.

I got 404 when I execute getModels in Postman modeling collection.
I got 500 when I execute startProcess in Postman rb collection.

The major error message in logs:

example-runtime-bundle             | 2022-03-08 19:08:30.970  WARN [rb,,] 7 --- [nio-8080-exec-1] o.keycloak.adapters.KeycloakDeployment   : Failed to load URLs from http://127.0.0.1.nip.io/auth/realms/activiti/.well-known/openid-configuration
example-runtime-bundle             | 
example-runtime-bundle             | java.net.ConnectException: Connection refused (Connection refused)

The related configurations:
in docker-compose.yml:

  keycloak:
    container_name: keycloak
    image: activiti/activiti-keycloak
    volumes:
      - ./activiti-realm.json:/opt/jboss/keycloak/activiti-realm.json
    restart: unless-stopped
    depends_on:
      - nginx

  example-runtime-bundle:
    container_name: example-runtime-bundle
    image: activiti/example-runtime-bundle:${VERSION}
    environment:
      # JAVA_OPTS: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -noverify"
      SPRING_JMX_ENABLED: "false"
      ACT_KEYCLOAK_URL: "http://${DOCKER_IP}/auth"
      SPRING_RABBITMQ_HOST: "rabbitmq"
      SERVER_SERVLET_CONTEXT_PATH: /rb
      SPRING_DATASOURCE_URL: jdbc:postgresql://activiti-postgres:5432/activitidb
      SPRING_DATASOURCE_USERNAME: activiti
      SPRING_DATASOURCE_PASSWORD: mypassword
      SPRING_JPA_DATABASE_PLATFORM: org.hibernate.dialect.PostgreSQLDialect
      SPRING_JPA_GENERATE_DDL: "true"
      SPRING_JPA_HIBERNATE_DDL_AUTO: update
      # ACTIVITI_SECURITY_POLICIES_0_NAME: "HR Group restricted to SimpleProcess and ConnectorProcess"
      # ACTIVITI_SECURITY_POLICIES_0_GROUPS: "hr"
      # ACTIVITI_SECURITY_POLICIES_0_ACCESS: "WRITE"
      # ACTIVITI_SECURITY_POLICIES_0_SERVICENAME: "rb-my-app"
      # ACTIVITI_SECURITY_POLICIES_0_KEYS: "SimpleProcess,ConnectorProcess,fixSystemFailure,twoTaskProcess"
      # ACTIVITI_SECURITY_POLICIES_1_NAME: "testgroup not restricted at all"
      # ACTIVITI_SECURITY_POLICIES_1_GROUPS: "testgroup"
      # ACTIVITI_SECURITY_POLICIES_1_ACCESS: "WRITE"
      # ACTIVITI_SECURITY_POLICIES_1_SERVICENAME: "rb-my-app"
      # ACTIVITI_SECURITY_POLICIES_1_KEYS: "*"
    restart: unless-stopped
    depends_on:
      - nginx
      - keycloak
      - rabbitmq
      - activiti-postgres

in .env:

DOCKER_IP=127.0.0.1.nip.io
VERSION=7.1.0-M13
KEYCLOAK_REALM=activiti
KEYCLOAK_RESOURCE=activiti

Full logs output is here:
https://gist.github.com/chang4tech/affd504809249733ee1f553da1d03763

What am I supposed to do to debug/detect the problem and eliminate the errors?
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文