amazon ec2 - ORA-12170 TNS listener in oracle 11g -
i have setup windows server 2008r2 oracle server 11g (11.2) , small database (mydb) in amazon ec2.
now want connect computer database (i use pl/sql developer don't mind using other tools)
in server side have: (where ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com public dns win server.)
tnsnames.ora:
mydb = (description = (address = (protocol = tcp)(host = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(port = 1521)) (connect_data = (service_name = mydb) ) )
listener.ora:
# listener.ora network configuration file: c:\app\administrator\product\11.2.0\dbhome_1\network\admin\listener.ora # generated oracle configuration tools. listener = (description_list = (description = (address = (protocol = tcp)(host = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(port = 1521)) (address = (protocol = ipc)(key = extproc1521)) ) ) adr_base_listener = c:\app\administrator
at pc @ tnsnames.ora have:
mydb= (description = (address = (protocol = tcp)(host = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(port = 1521)) (connect_data = (service_name = mydb) ) )
with these settings, able connect locally @ server, not through computer.
have setup security groups @ ec2:
inbound rules
type protocol port range source rdp tcp 3389 anywhere 0.0.0.0/0 ssh tcp 22 anywhere 0.0.0.0/0 custom icmp rule echo reply n/a anywhere 0.0.0.0/0
when trying connect computer
ora-12170:tns:connect timeout occurred.
any ideas doing wrong, or troubleshooting plan?
your security groups allow rdp , ssh access, on ports 3389 , 22 (plus icmp ping). when attempt connect database you're using port 1521, tnsnames.ora
dictates:
(host = ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com)(port = 1521))
so need add inbound firewall rule allow traffic on tcp port 1521 through ec2 instance, in addition existing ones 3389 , 22. have no idea if sql*net listed in 'type' drop down, might need select 'all tcp'.
you might want make more restrictive though - limiting 'source' pc's ip address perhaps if private, or company's outgoing ip if not; if have static public ip isp.
Comments
Post a Comment