You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Docker Compose启动连接MySQL数据库报错求助

解决Docker Compose启动WSO2 APIM时的TransactionManager和AsyncIndexer报错问题

大家好,我最近在本地搭建了Docker环境,用来运行连接开发环境MySQL数据库的WSO2 APIM开发代码。所有配置都完成后,docker-compose build执行得很顺利,但运行docker-compose up的时候却弹出了一堆报错,其中最关键的两条是:

ERROR - TransactionManager Failed to start new registry transaction.
ERROR- AsyncIndexer. Error while indexing

我已经尝试参考社区方案做了一些调整:

  • 修改了master-datasources.xml文件,把数据库最大活跃连接数限制为50
  • 将JDBC连接URL改成了这个格式:jdbc:mysql://${db_url}:${db_port}/${carbon_db}?autoReconnect=true&relaxAutoCommit=true

我的环境版本信息如下:

  • Docker:19.03.5
  • Docker Compose:1.24.1

下面是我的相关配置文件,麻烦各位帮忙分析下问题出在哪,给个解决方案:

配置文件详情

docker-compose.yml

services:
  wso2am:
    build: ./apim
    image: wso2am:2.1.0
    env_file:
      - sample.env
    ports:
      - "9444:9444"
      - "8281:8281"
      - "8244:8244"
    depends_on:
      - wso2is-km
  wso2is-km:
    build: ./is-as-km
    image: wso2is-km:5.3.0
    env_file:
      - sample.env
    ports:
      - "9443:9443"

sample.env

HOST_NAME=<hostname>
DB_URL=<db_connection_url>
DB_USER=admin
DB_PASS=adminpassword
DB_PORT=3306
CARBON_DB=carbondb
APIM_DB=apimdb
ADMIN_PASS=<wso2_password>

恳请各位大佬帮忙指点迷津!

内容的提问来源于stack exchange,提问作者Arun s

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 09:04:18