Are you able to connect to that port from inside the RHEL VM?
Is there a local firewall on the RHEL VM that needs to allow traffic on TCP/1521?
unable to ping Oracle port 1521 in Azure VM but other ports are working fine
I have created a VM(RHEL -linux) in Azure and installed Oracle DB on it. I want to connect to Oracle DB using 'Oracle SQL Developer' in my Windows system. The below are the Listener and tnsnames details.
cat listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCLCDB)
(ORACLE_HOME = /opt/oracle/product/19c/dbhome_1)
(SID_NAME = ORCLCDB)
The entries of tnsnames.ora cat tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCLCDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = azurerhel.internal.cloudapp.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCLCDB)
)
)
LISTENER_ORCLCDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = azurerhel.internal.cloudapp.net)(PORT = 1521))
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = azurerhel.internal.cloudapp.net)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /opt/oracle
Oracle service is working fine without any issues. and lsnrctl status is showing the url for that's different from those showing in above file.
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 10-DEC-2022 06:23:21
Uptime 6 days 7 hr. 14 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/azureRHEL/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=azureRHEL.tolzstizeobujjzahdvcdkfbwa.rx.internal.cloudapp.net)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=azureRHEL.tolzstizeobujjzahdvcdkfbwa.rx.internal.cloudapp.net)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "ORCLCDB" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDBXDB" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ef748d50f3d7d6efe0530400000a867c" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "orclpdb1" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
The command completed successfully
But when i am pinging from my windows PC, all the other ports(80,22,443) are connecting fine but not port 1521.
I have already set up inbound rules for windows firewall in my PC and VM side port 1521 is opened at Azure VM as well.
I have gone through lot of search but nothing could resolve the issue and and i am unable to connect my SQL Developer. Could somebody who is expert in this networking issues shed light on this?
Azure Virtual Machines
2 answers
Sort by: Most helpful
-
Anders Jensen 106 Reputation points
2022-12-18T03:10:21.943+00:00 -
dkrishnaveni-MSFT 1,961 Reputation points Microsoft Employee
2022-12-26T15:45:50.903+00:00 Hi,
On your netstat results, I see that port 1521 is listening on tcp6 which is TCP on IPv6 address. Can you make sure that your service is listening on IPv4 address and then try again?
Regards,
Divya