暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle 无法连接到企业管理器,收到消息 “对等方重置连接”

ASKTOM 2020-03-03
287

问题描述

你好,汤姆,

几天来,我一直在讨论连接到Oracle Enterprise Manager的问题。

请参阅我的配置:

操作系统: 甲骨文Linux 7
数据库: Oracle Base 12C R2

产品/12.2.0/dbhome_1/网络/管理/tnsnames.ora

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

ORCLPDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orclpdb)
    )
  )




产品/12.2.0/dbhome_1/网络/管理/监听器.ora

LISTENER =
  (DESCRIPTION_LIST =

    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
    )

    #(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=5500))(Presentation=HTTP)(Session=RAW))
    #(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.11)(PORT=5500))(Presentation=HTTP)(Session=RAW))
    #(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=5501))(Presentation=HTTPS)(Session=RAW))
    #(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.11)(PORT=5501))(Presentation=HTTPS)(Session=RAW))
  )





$ lsnrctl状态

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 03-MAR-2020 00:13:40

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                02-MAR-2020 23:50:59
Uptime                    0 days 0 hr. 22 min. 41 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/dima/app/dima/产品/12.2.0/dbhome_1/网络/管理/监听器.ora
Listener Log File         /home/dima/app/dima/diag/tnslsnr/server/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.11)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=5500))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=server.router3ba458.com)(PORT=5501))(Security=(my_wallet_directory=/home/dima/app/dima/product/12.2.0/dbhome_1/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "7f2253409fff7340e055000000000001" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully





SQL> select dbms_xdb_config.gethttpport() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
    5500





SQL> show parameters dispatcher

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
dispatchers        string  (PROTOCOL=TCP) (SERVICE=orclXD
       B)
enable_dnfs_dispatcher       boolean  FALSE
max_dispatchers        integer






SQL> select value from v$parameter where name='local_listener';

VALUE
--------------------------------------------------------------------------------
LISTENER_ORCL






一切似乎都很好,但出于同样的原因,我得到了连接错误:

$ curl http://127.0.0.1:5500/em
curl: (56) Recv failure: Connection reset by peer





我已尝试为所有可能的ip和域连接到EM:

http://server.loc:5500/em/login
http://localhost:5500/em/login
http://127.0.0.1:5500/em/login
http://192.168.0.11:5500/em/login

但是没有运气。

请帮助我解决这个问题,因为我不知道为什么EM不起作用。
我不确定是否在EM或连接中的某个地方出现问题。

防火墙已关闭。我可以成功连接到安装在同一服务器上的Oracle数据库和WebLogic。

$ netstat -lnt | grep 5500
tcp        0      0 127.0.0.1:5500          0.0.0.0:*               LISTEN


$ nmap localhost -p 5500

Starting Nmap 6.40 ( http://nmap.org ) at 2020-03-03 12:45 GMT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000056s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE SERVICE
5500/tcp open  hotline

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds


谢谢。

专家解答

把http改成https应该OK了

[oracle@db122 bin]$ curl -k http://localhost:5500/em
curl: (56) Recv failure: Connection reset by peer
[oracle@db122 bin]$ curl -k https://localhost:5500/em
HTTP/1.1 200 OK
MS-Author-Via: DAV
DAV: 1,2,
Server: Oracle XML DB/Oracle Database
Location: /em/login



文章转载自ASKTOM,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论