Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running images with docker for mac & rosetta2 beta feature #175

Closed
jgarec opened this issue Jan 16, 2023 · 6 comments
Closed

running images with docker for mac & rosetta2 beta feature #175

jgarec opened this issue Jan 16, 2023 · 6 comments
Labels
help wanted Extra attention is needed question I have a question that I would like to ask

Comments

@jgarec
Copy link

jgarec commented Jan 16, 2023

Hi,

We have tried to run oracle images on docker for mac and it was not possible (using qemu) so we tried with colima which was ok.

Now, a new version of docker is available (4.16.0) and support native rosetta emulation (instead of using qemu), but it's still does not work as it fails during the "startup nomount" step.

21 and 18 have the same behavior :

sqlplus / as sysdba

SQL*Plus: Release 21.0.0.0.0 - Production on Mon Jan 16 15:56:33 2023
Version 21.3.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORA-03113: end-of-file on communication channel

With Oracle 11g, it's different :

sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Jan 16 16:08:17 2023

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORA-45301: XE Edition single instance violation error
ORA-27300: OS system dependent operation:open failed with status: 0
ORA-27301: OS failure message: Error 0
ORA-27302: failure occurred at: sxecheck4

I use this command line to run images:
docker run -p 1521:1521 --rm --entrypoint=/bin/sh -e ORACLE_RANDOM_PASSWORD=yes -it docker-registry.pico-pfc.dev.echonet/gvenzl/oracle-xe:11.2.0.2-slim-faststart

No problem with the listener, the emulation works as expected
1000 54482 53265 0 16:10 ? 00:00:00 /rosetta/rosetta /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr LISTENER -inherit

Any idea about this last error message ? is there something that can break this check XE Edition single instance violation error ?

thx for your help :)

@gvenzl gvenzl added help wanted Extra attention is needed question I have a question that I would like to ask labels Feb 5, 2023
@gvenzl
Copy link
Owner

gvenzl commented Feb 5, 2023

Hi @jgarec,

Thanks a lot for your interest in these images!

Unfortunately, I am still on an Intel Mac and hence have no experience with Rosetta.
I'll leave this issue open in case we have other users on Mac ARM chips who can provide their insights and help.

@jifbrodeur
Copy link

Hi, running on both side of the fence here is an article that refer to you @gvenzl and explain clearly how to use intel image on M1 mac. https://oralytics.com/2022/09/22/running-oracle-database-on-docker-on-apple-m1-chip/

@sorobon
Copy link

sorobon commented Mar 1, 2023

Its not exactly the same @jifbrodeur . We want to use this image with the new virtualization support (rosseta2). https://github.com/lima-vm/lima/blob/master/docs/multi-arch.md#fast-mode-2 :)

@moonfruit
Copy link

Docker Desktop now supports the use of Apple's Virtualization framework, which supports x86/amd64 emulation through Rosseta2.
This allows docker to run various x86/amd64 images without the need for others such as colima.

I use this oracle image from Testcontainers. And many images used by Testcontainers do not provide an aarch64 version.
But they all worked well in Docker Desktop 4.16.0+ except gvenzl/oci-oracle-xe.

colima now also support Rosseta2 with colima start --arch aarch64 --vm-type=vz --vz-rosetta. I tried to run gvenzl/oci-oracle-xe on it, and it produced the same result as Docker Desktop.

So if gvenzl/oci-oracle-xe can support running on Docker Desktop, it would be great.

@herrkuhn
Copy link

herrkuhn commented Apr 17, 2023

Running gvenzl/oracle-xe:latest on a M1 MacBook Pro I get the following error with Docker Desktop & Rosetta 2 and colima & Rosetta 2:

CONTAINER: starting up...
CONTAINER: first database startup, initializing...
CONTAINER: uncompressing database data files, please wait...
CONTAINER: done uncompressing database data files, duration: 16 seconds.
CONTAINER: starting up Oracle Database...

LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 17-APR-2023 08:20:29

Copyright (c) 1991, 2021, Oracle.  All rights reserved.

Starting /opt/oracle/product/21c/dbhomeXE/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 21.0.0.0.0 - Production
System parameter file is /opt/oracle/homes/OraDBHome21cXE/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/f98f294272a1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 21.0.0.0.0 - Production
Start Date                17-APR-2023 08:20:29
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /opt/oracle/homes/OraDBHome21cXE/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/f98f294272a1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
ORA-03113: end-of-file on communication channel

The container fails after that, no further interaction possible. This happens using Docker Desktop and Rosetta 2 enabled as well as with colima and Rosetta 2. The same image works fine when started from colima using Qemu. There's a similar issue on the docker-images issue tracker, but it looks like they get a bit further and Oracle doesn't quit with ORA-03113.

Qemu works perfectly fine, but it would be great if Rosetta 2 was possible, since that's running much faster.

@gvenzl gvenzl closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2023
@jifbrodeur
Copy link

Hi Gerald, with 19c native arm support, closing this was the best thing to do, I installed the latest Oracle Docker Arm image under Docker 4.24.2 all is good.
Thanks
Jean-François

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question I have a question that I would like to ask
Projects
None yet
Development

No branches or pull requests

6 participants