我發現了這個問題的一個解決方案。爲了解釋我的解決方案,我使用了一些涉及我的真實參數的別名。它們是:
[ME] = my user name
[MYHOST] = my current workstation hostname (netbios name as well)
[MYHOST.mycompany.com] = my worksation's fully qualified domain name
剛開始時我的情況與上面提到的一樣:即使成功安裝後,我仍無法連接到apex服務。
首先,我已經使用了TNSPING Oracle工具:
C:\Users\ME>tnsping MYHOST
這就是答案:
TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=
(PROTOCOL=TCP)(HOST=fe80::5d34:78a:5862:64%20)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=fe80::c27:54a4:1600:86a4%26)(PORT=1521))(ADDRESS=
(PROTOCOL=TCP)(HOST=fe80::38ab:cdb4:dd77:7ed9%12)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)
(HOST=10.9.32.208)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.106)(PORT=1521)))
TNS-12541: TNS:no listener
你看上面很多當前活動不同的IP地址。只有最重要的127.0.0.1丟失。我在筆記本電腦上工作,所以網絡幾乎總是在變化(WLAN,3G,HSDPA,以太網等),只有本地主機是固定的。這是麻煩的真實例子。 (當我在連接到辦公室網絡的辦公環境中工作時,它也在工作。)
當我處於這種情況時,我也開始使用lsnrctl oracle實用程序。 我已經看到了以下內容:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Default Service XE
Listener Parameter File /oraclexe/app/oracle/product/11.2.0/server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\MYHOST\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYHOST.mycompany.com)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
你可以看到,在8080端口頂點服務缺失! 我曾嘗試也正常平其完美工作:
C:\用戶\ ME「平MYHOST.mycompany.com
結果是:
MYHOST.mycompany.com [fe80::c27:54a4:1600:86a4%26] ping
response fe80::c27:54a4:1600:86a4%26: time<10 ms
...
可以實現IPv6地址也存在於我的tnsping審判中。
所以我決定在我的本地主機定義MYHOST文件直接:
127.0.0.1 localhost MYHOST MYHOST.mycompany.com
測試現在用ping:
C:\Users\ME>ping MYHOST
而答案:
MYHOST.mycompany.com [127.0.0.1] ping:
response 127.0.0.1: byte=32 time<10 ms. TTL=128
...
在這點我已經重新啓動(停止並重新啓動)兩個正在運行的Oracle服務(只是肯定):
OracleServiceXE
OracleXETNSListener
,並期待奇蹟:
C:\Users\ME>lsnrctl
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Default Service XE
Listener Parameter File /oraclexe/app/oracle/product/11.2.0/server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\MYHOST\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYHOST.mycompany.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYHOST.mycompany.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
你可以看到PORT = 8080和服務XE實例的重要防線。 所以我很高興入門網址再次運行。
這篇文章喚醒了我的Win7系統上一塊石頭死亡的Oracle 11g XE HTTP偵聽器。只要將指定的行添加到C:\ Windows \ System32 \ drivers \ etc \ hosts並且HTTP服務工作,即使不重新啓動Oracle服務。許多Thanx Miklos,你救了我的一天! –