Oracle 12c(Windows10)配置Apex后无法访问管理页面求助
Hey there, let's work through some practical steps to fix that "localhost didn’t send any data" error you’re seeing with your APEX setup on Oracle 12c. Here’s what to check:
1. Verify Embedded PL/SQL Gateway (EPG) Port & Status
First, make sure the EPG is configured correctly and listening on a valid port:
- Open SQL*Plus as
SYSDBA(runsqlplus / as sysdbain Command Prompt) - Run this query to check the current HTTP port:
SELECT DBMS_XDB.GETHTTPPORT() FROM DUAL;- If it returns
0, the HTTP port isn’t enabled. Enable it with a free port (e.g., 8080 or 8081):EXEC DBMS_XDB.SETHTTPPORT(8080); COMMIT;
- If it returns
- Confirm XDB is valid and running:
The result should beSELECT STATUS FROM DBA_REGISTRY WHERE COMP_ID = 'XDB';VALID.
2. Check for Port Conflicts
Windows might have another process using your APEX port:
- Open Command Prompt and run:
(Replacenetstat -ano | findstr :80808080with your actual port number) - If you see a PID listed, open Task Manager, go to the Details tab, find that PID, and end the process if it’s not critical. Alternatively, switch APEX to a different unused port using the
DBMS_XDB.SETHTTPPORTcommand above.
3. Rule Out Firewall/Antivirus Blocking
Local security tools often block internal HTTP requests:
- Temporarily disable Windows Firewall (go to Control Panel > Windows Defender Firewall > Turn Windows Defender Firewall on or off) and try accessing the APEX admin page again.
- If that works, add an inbound/outbound rule for your APEX port (e.g., 8080) to allow traffic.
- Do the same check for any third-party antivirus software you’re using—ensure it’s not blocking the port or Oracle processes.
4. Validate APEX Installation & Workspace Status
Make sure APEX itself is properly installed and configured:
- In SQL*Plus (as SYSDBA), check APEX’s status:
It should showSELECT VERSION, STATUS FROM DBA_REGISTRY WHERE COMP_ID = 'APEX';VALIDstatus. - Confirm the default
INTERNALworkspace exists and is active:
Look forSELECT WORKSPACE, STATUS FROM APEX_WORKSPACES;INTERNALwithACTIVEstatus.
5. Test Access with IP Instead of localhost
Sometimes localhost resolution can cause issues. Try accessing the admin page using:
http://127.0.0.1:8080/apex/apex_admin(replace 8080 with your port)- Or your machine’s local IP address (e.g.,
http://192.168.1.100:8080/apex/apex_admin—find your IP viaipconfigin Command Prompt)
6. Ensure Oracle Services Are Running
All critical Oracle services need to be active:
- Open Services (type
services.mscin the Start menu) - Check that these services are running:
OracleService<YOUR_SID>(e.g.,OracleServiceORCL)OracleOraDB12Home1TNSListenerOracleDBConsole<YOUR_SID>
Bonus: Re-Run EPG Configuration Script
If you suspect the EPG setup was incomplete, re-run the configuration script:
- In SQL*Plus (as SYSDBA), navigate to your APEX directory (usually
ORACLE_HOME\apex) and run:
Replace@apex_epg_config.sql ORACLE_HOMEORACLE_HOMEwith your actual Oracle installation path (e.g.,C:\app\user\product\12.2.0\dbhome_1)
If none of these steps resolve the issue, check the Oracle alert log (located in ORACLE_BASE\diag\rdbms\<YOUR_SID>\<YOUR_SID>\trace) for any error messages related to XDB or APEX—this can help pinpoint specific configuration issues.
内容的提问来源于stack exchange,提问作者Laxmi

