nextgenhealthcare / connect-docker

Official Dockerfiles for Connect https://hub.docker.com/r/nextgenhealthcare/connect
Mozilla Public License 2.0
77 stars 51 forks source link

Mirth does not start up on Apple M1 #15

Open jas550 opened 2 years ago

jas550 commented 2 years ago

Mirth does not start up on Apple M1. It either throws the following error or just hangs:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000004017c7a324, pid=1202, tid=1759
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.8+10) (build 11.0.8+10)
# Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.8+10, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# J 459 c1 java.util.zip.ZipFile.ensureOpen()V java.base@11.0.8 (40 bytes) @ 0x0000004017c7a324 [0x0000004017c7a300+0x0000000000000024]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/connect/hs_err_pid1202.log
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
qemu: uncaught target signal 6 (Aborted) - core dumped

It will be useful to build an arm64 specific docker container that can be used on Apple M1 machines.

cturczynskyj commented 2 years ago

There's some discussion about this topic in the Connect GitHub repo. It sounds like the issue may be with MacOS Monterey and not the M1 based machines themselves but that hasn't been confirmed yet.

jas550 commented 2 years ago

I've tested the mirth docker container on amd64 Mac OS Monterey and the container works fine. However, the mirth client crashes. Therefore I think the discussion only applies when running mirth or mirth client on the host machine.

jas550 commented 2 years ago

@cturczynskyj Why was this closed. This is still an issue. Mirth docker container still doesn't work on Mac M1 machines. The mirth client also crashes on Mac OS Monterey amd64.

cturczynskyj commented 2 years ago

Maybe I misunderstood your comment. It sounded like you were saying that it was only an issue with the client which wouldn't be Docker related. Are you saying that the Docker container fails to start on your Monterey machine?

jas550 commented 2 years ago

@cturczynskyj I was replying back to your earlier comment (below).

There's some discussion about this topic in the Connect GitHub repo. It sounds like the issue may be with MacOS Monterey and not the M1 based machines themselves but that hasn't been confirmed yet.

I've created a table to specify what works in which environment:

Test Environment Works
Mirth Client amd64 Mac OS Monterey No
Mirth Client arm64 (m1) Mac OS Monterey No
Mirth docker container amd64 Mac OS Monterey Yes
Mirth docker container arm64 (m1) Mac OS Monterey No

Let me know if you require any further information to progress this issue.

jas550 commented 1 year ago

@cturczynskyj Can you please open this issue as it wasn't resolved. Or do you want me to open a new issue?

pladesma commented 1 year ago

Related issue https://github.com/nextgenhealthcare/connect-docker/issues/24

jas550 commented 1 year ago

@pladesma @lmillergithub Do you know when this issue will be resolved?

svenczbg commented 1 year ago

Did you try to enable "Use Rosetta for x86/amd64 emulation in Apple Silicon" option in docker desktop? You can find that in the settings tab "Features in development". That allowed me to run the amd64 image on my M1 Mac.

For deploayment in a docker stack, you need to add "--resolve-image never":

docker stack deploy -c stack.yml mirth --resolve-image never