Can't connect to my local oracle

the bug
when i try to connect to oracle i get this error
i'm running metabase on docker using wsl ubuntu distro
and my oracle is installed locally not docker image.

Logs
Caused by: oracle.net.ns.NetException: ORA-12541: Cannot connect. No listener at host localhost port 1521. (CONNECTION_ID=caCJrUBpRWWWAXoM5cmg9w==)
https://docs.oracle.com/error-help/db/ora-12541/
at oracle.net.nt.TcpNTAdapter.handleEstablishSocketException(TcpNTAdapter.java:414)
at oracle.net.nt.TcpNTAdapter.establishSocket(TcpNTAdapter.java:346)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:224)
at oracle.net.nt.ConnOption.connect(ConnOption.java:332)
at oracle.net.nt.ConnStrategy.executeConnOption(ConnStrategy.java:1199)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:742)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:708)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:959)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:328)
at oracle.jdbc.driver.T4CConnection.connectNetworkSessionProtocol(T4CConnection.java:3173)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:1000)
... 27 more
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Unknown Source)
at java.base/sun.nio.ch.Net.connect(Unknown Source)
at java.base/sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at java.base/sun.nio.ch.SocketAdaptor.connect(Unknown Source)
at oracle.net.nt.TimeoutSocketChannel.doConnect(TimeoutSocketChannel.java:288)
at oracle.net.nt.TimeoutSocketChannel.initializeSocketChannel(TimeoutSocketChannel.java:268)
at oracle.net.nt.TimeoutSocketChannel.connect(TimeoutSocketChannel.java:235)
at oracle.net.nt.TimeoutSocketChannel.(TimeoutSocketChannel.java:202)
at oracle.net.nt.TcpNTAdapter.establishSocket(TcpNTAdapter.java:335)
... 36 more
2024-05-20 14:23:34,100 DEBUG middleware.log :: POST /api/database 400 13.3 ms (0 DB calls)
{:message "Hmm, we couldn't connect to the database. Make sure your Host and Port settings are correct",
:errors {:host "check your host settings", :port "check your port settings"}}

Screenshots
image

Additional context
this is the java version on container:
java -version
openjdk version "11.0.23" 2024-04-16
OpenJDK Runtime Environment Temurin-11.0.23+9 (build 11.0.23+9)
OpenJDK 64-Bit Server VM Temurin-11.0.23+9 (build 11.0.23+9, mixed mode)

Metabase Diagnostic Info

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.23+9",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.23",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.23+9",
    "os.name": "Linux",
    "os.version": "5.15.133.1-microsoft-standard-WSL2",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "16.3 (Debian 16.3-1.pgdg120+1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.7.2"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2024-05-16",
      "tag": "v0.49.11",
      "hash": "b894f2d"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

If Metabase is running in Docker then "localhost" refers to the internal docker image. You could try host.docker.internal as the hostname.

If that doesn't work - can you confirm that you're able to connect to Oracle from within the Docker container without using Metabase?

oracle is not running on docker, it's running locally on my machine, metabase is the one running on docker.
but i tried host.docker.internal and i tried this ip 127.0.0.1 and still the same issue.

I have airbyte running on docker and it can connect to my local oracle so it seems that metabase on docker can't connect to localhost machines.