oci-oracle-xe: Running Oracle XE on Apple M1 not working (ORA-12547: TNS:lost contact)

Hi!

I tried starting Oracle XE on Docker 20.10.10 on an Apple M1 computer.

docker run -p 1521:1521 -e ORACLE_PASSWORD=pwd --platform linux/amd64 gvenzl/oracle-xe

Here is my docker info:

Client:
 Cloud integration: v1.0.20
 Version:           20.10.10
 API version:       1.41
 Go version:        go1.16.9
 Git commit:        b485636
 Built:             Mon Oct 25 07:43:15 2021
 OS/Arch:           darwin/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.10
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       e2f740d
  Built:            Mon Oct 25 07:41:10 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.11
  GitCommit:        5b46e404f6b9f661a205e28d59c982d3634148f8
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

It fails whith the following log:

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

ERROR:

ORA-12547: TNS:lost contact



SP2-0306: Invalid option.

Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]

where <logon> ::= <username>[/<password>][@<connect_identifier>]

      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]

SP2-0306: Invalid option.

Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]

where <logon> ::= <username>[/<password>][@<connect_identifier>]

      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

Is Oracle XE not yet working on Apple M1?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 31 (8 by maintainers)

Commits related to this issue

Most upvoted comments

There has been some movement over on https://github.com/oracle/docker-images/discussions/1951 in the meantime. It seems that users are able to spin up Oracle databases by using a Docker Desktop alternative called colima. Unfortunately, I still don’t have an M1 Mac so I cannot verify myself but if anybody would be able to verify the approach reported over there, I would be deeply grateful.

The solution seems to be:

brew install colima
brew install docker
colima start --memory 4 --arch x86_64
docker run ...

Hey all, I’ve been chatting with my friends at Testcontainers (wink, wink @kiview and @eddumelendez) and they have had other users bring up the question of colima, see here.

It appears, that with the following config, Testcontainers works just fine with colima:

export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
export DOCKER_HOST="unix://${HOME}/.colima/docker.sock"

I can confirm this is working 🥳 🥳 🥳

Hey all, I’ve been chatting with my friends at Testcontainers (wink, wink @kiview and @eddumelendez) and they have had other users bring up the question of colima, see here.

It appears, that with the following config, Testcontainers works just fine with colima:

export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
export DOCKER_HOST="unix://${HOME}/.colima/docker.sock"

That’s amazing, thanks so much for doing that, @tomdevroomen!

I have added the instructions into the ReadMe as well. Hopefully, this will help all other Apple M chip users to run these images!

The above-mentioned solution is working perfectly 👍

I just ran into the same problem 😦. @gvenzl any chance you could add a note about the apple/arm compatibility problems to your dockerhub docs?

No. I should have come back to post my findings. I tried to build with different versions of XE with no luck. All resulted in the same TNS error.

I may have to resort to a UTM based Linux VM until there is an acceptable alternative.

@gvenzl @XavierLevaux I am also trying to get this running on Apple silicon. I have specified the --platform linux/amd64 attribute to tell Docker to emulate x86, but I am getting the same error as above. I’ll try to run buildx locally to see if that makes a difference, and I’ll report any findings.

Additionally, I’m willing to run any tests or gather additional diagnostics if anyone has ideas on how to make it work.