使用VirtualBox的Mac上的Oracle与Windows 10无法正常工作

时间:2016-02-21 20:04:23

标签: windows oracle macos virtualbox

我到处研究,无法解决问题。我收到错误了: "状态:失败 - 测试失败:IO错误:从读取调用中减去一个。" ,当我尝试连接到Macbook中VirtualBox上运行的Oracle服务器时。 / p>

到目前为止我做了什么:

  1. 在VirtualBox
  2. 上安装了默认配置的Windows 10 x64
  3. 在步骤#1中安装的Windows上安装了Oracle 11 XE 112 Win 64
  4. 在Macbook上安装了SQL Developer 4.0.2.15(OS X El Captain)
  5. 在VirtualBox上,转到网络(连接到NAT)并添加端口转发:
    • 主机IP:127.0.0.1
    • 主机端口:1521
    • 来宾ip:尝试使用我的mac ip(192.168.2.68)
    • 后空了
    • 访客港口:1521
    • 我还尝试添加Bridged第二个适配器。没有运气。
  6. 使用sql命令行实用程序(" connect hr / hr")在Windows上测试了Oracle本地连接,并且可以成功连接。
  7. 使用lsnrctl实用程序(" status")在Windows上测试了Oracle侦听器,并且可以看到" xe"听众活跃。
  8. 在我的Mac上,尝试使用SQL Developer与我能想象到的所有可能组合进行连接:
    • 用户名/密码:hr / hr
    • 主机名:127.0.0.1 / localhost / 10.0.2.15(虚拟Windows ip)
    • 服务名称:xe / xexdb / orcl
    • 为SID尝试了相同的操作。
    • 每次点击测试,我都会收到之前提到的错误。
  9. 禁用虚拟Windows上的防火墙
  10. 拜托,我在这里到处研究,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: enter image description here

2 个答案:

答案 0 :(得分:0)

您的VirtualBox端口转发配置不正确,来宾IP应为10.0.2.15,而不是您的主机IP地址。之后,您应该能够通过主机操作系统上的127.0.0.1:1521进行连接。

答案 1 :(得分:-1)

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

的说明,它工作得很好