Oracle 在 mac 上使用 VirtualBox,Windows 10 不工作

Oracle on mac using VirtualBox with Windows 10 not working

到处研究都没有解决问题。我收到错误: "Status: Failure-Test failed: IO Error: Got minus one from a read call." 在我的 Mac 书中尝试连接到 VirtualBox 上的 Oracle 服务器 运行 时。

到目前为止我做了什么:

  1. 已安装 Windows 10 x64,在 VirtualBox 上使用默认配置
  2. 在步骤 #1Windows 中安装的 Windows 上安装了 Oracle 11 XE 112 Win 64
  3. 在我的Mac书上安装了SQL Developer 4.0.2.15(OS X El Captain)
  4. 在 VirtualBox 上,转到网络(连接到 NAT)并添加端口转发:
    • 主机IP:127.0.0.1
    • 主机端口:1521
    • 来宾 ip: 尝试为空,然后尝试使用我的 mac ip (192.168.2.68)
    • 来宾端口:1521
    • 我还尝试添加桥接第二个适配器。运气不好。
  5. 使用 sql 命令行实用程序 ("connect hr/hr") 在 Windows 上测试了 Oracle 本地连接并且可以成功连接。
  6. 使用 lsnrctl 实用程序 ("status") 在 Windows 上测试了 Oracle 侦听器,可以看到 "xe" 侦听器处于活动状态。
  7. 在我的 Mac 上,尝试使用 SQL Developer 连接我能想到的所有可能的组合:
    • username/password: hr/hr
    • hostname: 127.0.0.1 / localhost / 10.0.2.15 (就是虚拟Windows ip)
    • 服务名称:xe / xexdb / orcl
    • 对 SID 进行了同样的尝试。
    • 每次我点击测试,我都会收到前面提到的错误。
  8. 在虚拟机上禁用防火墙 Windows

拜托,我在这里到处研究,google,oracle 社区,VirtualBox 社区什么都没有。非常感谢您。

我的 mac 上的 ifconfig:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 ::1 prefixlen 128 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet 127.94.0.2 netmask 0xff000000 
    inet 127.94.0.1 netmask 0xff000000 
    nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 54:26:96:e0:e7:57 
    inet6 fe80::5626:96ff:fee0:e757%en0 prefixlen 64 scopeid 0x4 
    inet 192.168.2.68 netmask 0xffffff00 broadcast 192.168.2.255
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 32:00:1b:a0:70:e0 
    media: autoselect <full-duplex>
    status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 32:00:1b:a0:70:e1 
    media: autoselect <full-duplex>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 06:26:96:e0:e7:57 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether 6a:0e:9b:1d:78:7b 
    inet6 fe80::680e:9bff:fe1d:787b%awdl0 prefixlen 64 scopeid 0x8 
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 56:26:96:0e:29:00 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 5 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    nd6 options=1<PERFORMNUD>
    media: <unknown type>
    status: inactive
vboxnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:00 
    inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255

虚拟 Windows 框上的 ipconfig:

您的 VirtualBox 端口转发配置不正确,来宾 IP 应该是 10.0.2.15,而不是您的主机 IP 地址。之后,您应该能够通过主机 OS.

上的 127.0.0.1:1521 进行连接

我找不到安装 Windows 10 的解决方案,但按照 post

的说明,它工作得非常好