Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[BUG] Getting attachment on Docker

未关闭
#415 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
32/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
docker, java, mariadb

调研方向

The failure is AttachmentUtil.getMessageAttachment returning null for an HL7 OBX attachment id under concurrent channels on Docker+MariaDB, while Windows/SQL Server and Linux/MariaDB without Docker do not. Start from how message attachments are stored and retrieved in the engine (the AttachmentUtil path and the 10-attempt retry shown in the screenshot), then compare timing/locking against the provided compose stack. Done when getContentString no longer returns null under parallel reprocessing without a sleep.

由索引模型根据 Issue 内容生成。

描述

bug

Hi,

We have a problem when getting the contentString of attachments when using OIE on Docker.
More errors occurs when 2 or more channels do the same things.

we use this code :
var attachmentIdRegex = /${ATTACH:([0-9a-fA-F-]{36})}/;
var attachmentId = segment['OBX.5']['OBX.5.5'].toString();

attachmentId = attachmentId.match(attachmentIdRegex)[1];

var attachmentContent = AttachmentUtil.getMessageAttachment(connectorMessage, attachmentId).getContentString();

And the error :
TypeError: Cannot call method "getContentString" of null

But just, reprocess the message and it's sometimes ok, and if we have a lot of messages when the error occurs all the files after have the same issues.

We tried this on other mirth :
On windows with sqlserver => never happened
On linux with mariaDb => never happened

It's seems that the problem comes with Docker.

We also tried to solve this problem using a sleep before the getContentString and we have fewer errors

Source config of the channel:
Image

The attachment is not found after 10 attemps:
Image

Notes : We reproduce the same errors with Mirth 4.5.2 in the same configuration.

The config :

services:

mariadb_oie:
image: mariadb:10.11
container_name: mariadb_oie
restart: always

command:
  [
    '--server-id=1',
    '--max_connections=300',
    '--character-set-server=latin1',
    '--collation-server=latin1_swedish_ci',
    '--default-authentication-plugin=mysql_native_password',
    '--sql-mode=NO_ENGINE_SUBSTITUTION'
  ]

ports:
  - "3308:3306"

environment:
  MARIADB_ROOT_PASSWORD: root123
  MARIADB_DATABASE: oiedb
  MARIADB_USER: oie
  MARIADB_PASSWORD: oie123

volumes:
  - /data/oie/mysql:/var/lib/mysql

networks:
  - oie_net

oie:
image: openintegrationengine/engine:latest
container_name: oie

restart: always

depends_on:
  - mariadb_oie

ports:
  - "9444:8443"
  - "9081:8080"

environment:
  DATABASE: mysql
  DATABASE_URL: jdbc:mysql://mariadb_oie:3306/oiedb?useUnicode=false&characterEncoding=latin1&useSSL=false&allowPublicKeyRetrieval=true
  DATABASE_USERNAME: oie
  DATABASE_PASSWORD: oie123

  MIRTH_ADMIN_USERNAME: toto
  MIRTH_ADMIN_PASSWORD: toto

volumes:
  - /data/oie/appdata:/opt/connect/appdata

networks:
  - oie_net

networks:
oie_net:
driver: bridge

主要语言
Java
星标
227
派生
81
平均合并
3 天 6 小时
30 天内合并 PR
15

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenIntegrationEngine/engine 的其他 Issue

查看 OpenIntegrationEngine/engine 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。