Skip to content
Advertisement

How do I open a specific port on RHEL 6.4?

I’m setting up the remote connection to oracle database and it requires that the connection should be established through port 1521 by default. However, i’m getting the error repeatly:

[Oracle JDBC Driver]Error establishing socket to host and port: :1521. Reason: Connection refused

Checking deeper, I realize that the port 1521 cannot be connected on the local machine:

telnet localhost 1521 Trying ::1… telnet: connect to address ::1: Connection refused Trying 127.0.0.1… telnet: connect to address 127.0.0.1: Connection refused

The connection through this port is not established by anyway. Moreover, the iptables is disable on local and remote machines as well. Ping for localhost is working fine.

I notice that only port 1521 is refusing connection. When I tried to telnet with port 80, it is working fine.

Do we really need to have port 1521 on netstat output to establish the connection through it? If yes then how we can do.

Thank you for your help in advances.

Regards,

Anh

Advertisement

Answer

I hope you are trying to connect to a remote oracle database server from your local machine. If yes you have to use the following command

telnet 1521

Are sure you are using a port other than default oracle database port. I believe the default oracle database port is 1158.

Also please check the service up and running by the following command at the remote database server.

netstat -plnt | grep 1158 ( or the port number that you have assigned )

Or you can access the oracle database in the remote machine browser by accessing the following URL https://localhost:1158/em

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement