LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2015, 03:06 AM   #1
thiyagarajancs
LQ Newbie
 
Registered: Nov 2009
Posts: 10

Rep: Reputation: 0
Unable to connect database


Hi,

I have configured in oracle database listener in new server. The configuration is correct and i can able to connect the database within server via listener.

But if i try to connect from outside, It's throwing the below error.

Connecting To 192.168.101.55...Could not open connection to the host, on port 1521: Connect failed.


But there is no port block and i can able access other ports like 22,23 etc., (Telnet <ip> 22).

Please help me fix this issue.

Thanks in advance.
 
Old 11-10-2015, 03:55 AM   #2
dawyda
LQ Newbie
 
Registered: Jul 2014
Posts: 10

Rep: Reputation: Disabled
When you say 'from outside' do you mean from a remote network or from your LAN? If it from a remote network then make sure the correct NAT/PAT is set on your gateway/router. Also ensure your iptables allow the incoming connection to the port 1521 on the listener.
 
Old 11-10-2015, 04:37 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by thiyagarajancs View Post
But there is no port block and i can able access other ports like 22,23 etc., (Telnet <ip> 22).
What happens when you do telnet 192.168.101.55 1521?
Are you sure the database listener listens on an external address? Perhaps it's configured to only listen on the loopback address. Find out with netstat -lntp | grep 1521 (or ss instead of netstat).
And double-check the firewall, as dawyda recommends.
 
Old 11-11-2015, 05:35 AM   #4
thiyagarajancs
LQ Newbie
 
Registered: Nov 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Hi All,

Thanks for your help.

The issue solved by disabling the firewall.


Initially, I have tried the status by "service iptables status". But it gave error and i assumed that iptables are not configured. But later i came to know that the commands are different in linux 7. After i executed the correct command, The issue was solved.

Thanks again..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect mysql database in Jboss AS 7 mlnm Linux - Newbie 5 08-06-2013 08:30 AM
Unable to connect to database while redirecting apache to tomcat mlnm Linux - Newbie 2 10-23-2012 06:43 AM
Unable to connect To Database...PostgreSQL and PHP Manashi Programming 8 04-05-2006 06:57 AM
Unable to connect to (working) mySQL database rcs1000 Linux - Software 1 10-16-2005 07:23 AM
Embedded SQL -Unable to connect to PostgreSQL database vikram_cvk Linux - Software 1 05-30-2004 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration