sqldeveloper can not connect to database

I have installed oracle 11g in my opensuse 11.1 KDE 4.2.2. I wanted to use Oracle Sqldeveloper, so I installed it. But when I try to connect with the database it fails and gives error message “The network adapter failed to establish connection”. I have changed the /etc/hosts file as
[FONT=Courier New]…
#127.0.0.2 linux-esxp.site linux-esxp
my_ip_address linux-esxp.site linux-esxp

The connection details I provided in sqldeveloper are:
Connection Name: Test
username: my_local_database_connection _name
Password: connection_password
Role: Default
Connection Type: Basic
Hostname: linux-esxp
Port:Port_from listner.ora(1521)
sid: database_oracle_sid

Any help will be appreciated…

[/FONT]

And yes I can ping any website or ip but not of my own!!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So you cannot ping your DB machine? Is Oracle already listening on that
box? Is that separate from your client box? On the DB box run the
following and post the output:

netstat -anp | grep :1521 #assuming 1521 is your DB port by default

  • From your client box:

netcat -zv ipAddressOfDBBox 1521

If you cannot ping the DB box then let’s just get basic network
information from both systems:

ip addr sh
ip route sh
cat /etc/resolv.conf

Good luck.

vendetta18 wrote:
> And yes I can ping any website or ip but not of my own!!
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKBEJTAAoJEF+XTK08PnB5K9IQALoreLAJ2fjJ6siO0EHLrqnd
2DP9o3PwI5Ni5dCfwY4+gdIK08438XAbX7eK9XtLKNXWiinZ+Q2pLZxpeEa4aEwa
PoKha0MVISg3wKkq6hdlVpW+svIe596Dl6RQUGQMeYO9LhNJSq+oB/ai8PXH4cav
7DReM4DwLULwu+8Ez2j4yoIma8FuBuKdDaPl3q/tPNj+QnNhwYFtfQsBkEaFvmcK
VDb71y23UmHIacM/8XRIiQ0phQY/IxryX8ZqqY/Msw+4MwqbWHV1h8UG/FgXo7y+
MrnSj/wRhDZVbJOD696Qbmb/Afr9ZjdNzjSZhugei/obyyrvXxJsSdrNapXkNzIo
gJbGUlUgcts0vZHqvJlzSNYi24TMYvJHJV7RAzCUioezYpPwJ2ybt1YtRrnMfrrM
eQVYr70UASsWkIKbmy+3yl9soDyrqly0WJi+I8/II27UanAJCpGS5v24m9CxomdJ
N/oxnlMA9+Fba+jAP1HsiopJrt7EUh/i1A4MX9BrbklFfUeYgelajuOPUrjn9oCJ
IUp/iG8L1YiPM+Fkxcc/3wRc1UCo7GMif6axFnG62JB7+s2uho28hDv37L99Xyep
99cICWCQ3D1ExvEL6tVYDP+mmxiF7b2PI3D4mt1aS6yPJVawL/L7KpedU4aOG2B7
bH21onWsxUm8PfqMr9bc
=0U7L
-----END PGP SIGNATURE-----

**Thanks fro replying. Here is what you wanted…

netstat -anp | grep :1521

tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 3269/tnslsnr
tcp 0 1 123.236.179.200:29778 123.236.179.67:1521 SYN_SENT 4490/ora_pmon_orcl

netcat -zv 123.236.179.200 1521

123.236.179.200: inverse host lookup failed: Unknown host
(UNKNOWN) [123.236.179.200] 1521 (ncube-lm) open

   # ip addr sh                     

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
inet 127.0.0.2/8 brd 127.255.255.255 scope host secondary lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc pfifo_fast state UP qlen 1000
link/ether 00:16:36:f1:16:48 brd ff:ff:ff:ff:ff:ff
inet 123.236.179.200/24 brd 123.236.179.255 scope global eth0
inet6 fe80::216:36ff:fef1:1648/64 scope link
valid_lft forever preferred_lft forever
3: wmaster0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ieee802.11 00:19:d2:78:8a:0a brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:19:d2:78:8a:0a brd ff:ff:ff:ff:ff:ff
5: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 56:b5:49:11:72:68 brd ff:ff:ff:ff:ff:ff

ip route sh

123.236.179.0/24 dev eth0 proto kernel scope link src 123.236.179.200 metric 1
127.0.0.0/8 dev lo scope link
default via 123.236.179.1 dev eth0 proto static

cat /etc/resolv.conf

/etc/resolv.conf file autogenerated by netconfig!

Before you change this file manually, consider to define the

static DNS configuration using the following variables in the

/etc/sysconfig/network/config file:

NETCONFIG_DNS_STATIC_SEARCHLIST

NETCONFIG_DNS_STATIC_SERVERS

NETCONFIG_DNS_FORWARDER

or disable DNS configuration updates via netconfig by setting:

NETCONFIG_DNS_POLICY=’’

See also the netconfig(8) manual page and other documentation.

Note: Manual change of this file disables netconfig too, but

may get lost when this file contains comments or empty lines

only, the netconfig settings are same with settings in this

file and in case of a “netconfig update -f” call.

Please remove (at least) this line when you modify the file!

search reliancebroadband.co.in
nameserver 124.124.5.141
nameserver 124.124.5.140
nameserver 220.225.236.85

**

I got it working. But I have confusion now. I found out that I am dynamic IP allocation. So whenever my machine starts I have a new IP address. The document I referred to while installing oracle said

>>>>
Check /etc/hosts - Comment out 127.0.0.2 and put your server’s IP
address.

127.0.0.2 sles10.novell.com sles10

192.168.0.12 sles10.novell.com sles10
<<<<<<

Now, am I supposed to make changes to /etc/hosts everytime I log in or is there a solution?