12 Replies Latest reply: Apr 14, 2013 5:30 AM by user11309581 RSS

    Having trouble connecting SQL Developer to database on LINUX machine

    user11309581
      Having trouble connecting SQL Developer to database on LINUX machine
      Hello,
      I am trying to connect my windows 7 home premium machine to an oracle database 11g on a RedHat 5 machine using SQL Developer. i got this error message on SQL Developer
      Status : Failure - Test failed :The Network Adapter could not establish the connection


      on Linux
      LSNRCTL> status
      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
      STATUS of the LISTENER
      ------------------------
      Alias                     LISTENER
      Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
      Start Date                03-APR-2013 16:13:13
      Uptime                    7 days 22 hr. 16 min. 41 sec
      Trace Level               off
      Security                  ON: Local OS Authentication
      SNMP                      OFF
      Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
      Listener Log File         /u01/app/oracle/product/11.2.0/db_1/network/log/listener.log
      Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.X.X.X)(PORT=1521)))
      Services Summary...
      Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
      Service "orc11g" has 1 instance(s).
      Instance "orc11g", status READY, has 1 handler(s) for this service...
      Service "orc11gXDB" has 1 instance(s).
      Instance "orc11g", status READY, has 1 handler(s) for this service...
      Service "orc11g_XPT" has 1 instance(s).
      Instance "orc11g", status READY, has 1 handler(s) for this service...
      The command completed successfully
      LSNRCTL>
      and TNSPING
      tnsping 172.x.x.x
      
      TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 11-APR-2013 14:32:17
      
      Copyright (c) 1997, 2005, Oracle.  All rights reserved.
      
      Used parameter files:
      /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
      
      Used EZCONNECT adapter to resolve the alias
      Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=172.x.x.x))(ADDRESS=(PROTOCOL=TCP)(HOST=172.x.x.x)(PORT=1521)))
      OK (0 msec)
      [oracle@ltebilling ~]$
      Tnsnames.ora On Linux ,
      ORC11G =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orc11g)
      )
      )
      Listner on Linux ,
      SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
      (PROGRAM = extproc)
      )
      )
      
      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
      )
      )
      /ect/hosts Linux ,
      # Do not remove the following line, or various programs
      # that require network functionality will fail.
      127.0.0.1               localhost.localdomain localhost
      172.x.x.x             LTEBilling
      and there is no problem of ping linux from windows

      Edited by: user11309581 on Apr 11, 2013 3:16 PM
        • 1. Re: Having trouble connecting SQL Developer to database on LINUX machine
          Paul M.
          windows 7 home premium
          Said that no Windows home editions are certified for Oracle products,
          Tnsnames.ora On Linux
          do you have one on Windows ? how did you try to connect ?
          • 2. Re: Having trouble connecting SQL Developer to database on LINUX machine
            user11309581
            im already installed Oracle Database on Windows , its working fine SQL Developer connected to the local windows without problem but i cant connect to the linux server


            tnsnames.ora as below ,
            # tnsnames.ora Network Configuration File: D:\app\ubai\product\11.2.0\dbhome_2\network\admin\tnsnames.ora
            # Generated by Oracle configuration tools.
            
            ORACLR_CONNECTION_DATA =
            (DESCRIPTION =
            (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
            )
            (CONNECT_DATA =
            (SID = CLRExtProc)
            (PRESENTATION = RO)
            )
            )
            
            ORCL =
            (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.100)(PORT = 1521))
            (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = orcl)
            )
            )
            
            ORC11G =
            (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
            (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = orc11g)
            )
            )
            Edited by: user11309581 on Apr 11, 2013 2:29 PM

            Edited by: user11309581 on Apr 11, 2013 2:31 PM
            • 3. Re: Having trouble connecting SQL Developer to database on LINUX machine
              EdStevens
              user11309581 wrote:
              im already installed Oracle Database on Windows , its working fine SQL Developer connected to the local windows without problem but i cant connect to the linux server


              tnsnames.ora as below ,
              # tnsnames.ora Network Configuration File: D:\app\ubai\product\11.2.0\dbhome_2\network\admin\tnsnames.ora
              # Generated by Oracle configuration tools.
              
              ORACLR_CONNECTION_DATA =
              (DESCRIPTION =
              (ADDRESS_LIST =
              (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
              )
              (CONNECT_DATA =
              (SID = CLRExtProc)
              (PRESENTATION = RO)
              )
              )
              
              ORCL =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.100)(PORT = 1521))
              (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = orcl)
              )
              )
              
              ORC11G =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
              (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = orc11g)
              )
              )
              Edited by: user11309581 on Apr 11, 2013 2:29 PM

              Edited by: user11309581 on Apr 11, 2013 2:31 PM
              I have yet to see an actual error message .... Simply saying "I can't connect" is like me saying "I can't start my car. Please tell me what's wrong.".
              • 4. Re: Having trouble connecting SQL Developer to database on LINUX machine
                Jaroslaw Bicz
                Did you check iptables and selinux ?
                • 5. Re: Having trouble connecting SQL Developer to database on LINUX machine
                  user11309581
                  as i already desciped earlier , i cant connect to the Linux server throw my Windows SQL Server , with error message below ,
                  tatus : Failure - Test failed :The Network Adapter could not establish the connection
                  • 6. Re: Having trouble connecting SQL Developer to database on LINUX machine
                    user11309581
                    yes really i'm already enaple the port 1521 and SELINUX=disabled
                    [root@ltebilling ~]# /etc/init.d/iptables status
                    Table: filter
                    Chain INPUT (policy ACCEPT)
                    num  target     prot opt source               destination
                    1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0
                    
                    Chain FORWARD (policy ACCEPT)
                    num  target     prot opt source               destination
                    1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0
                    
                    Chain OUTPUT (policy ACCEPT)
                    num  target     prot opt source               destination
                    
                    Chain RH-Firewall-1-INPUT (2 references)
                    num  target     prot opt source               destination
                    1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
                    2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
                    3    ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
                    4    ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
                    5    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
                    6    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
                    7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
                    8    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
                    9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:1521
                    10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
                    11   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
                    but from windows system when i'm try tnsping i got this error
                    C:\Windows\system32>tnsping orc11g
                    
                    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-APR-2
                    013 14:44:09
                    
                    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
                    
                    Used parameter files:
                    D:\app\ubai\product\11.2.0\dbhome_2\network\admin\sqlnet.ora
                    
                    
                    Used TNSNAMES adapter to resolve the alias
                    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x
                    .x)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orc11g))
                    )
                    TNS-12535: TNS:operation timed out
                    
                    C:\Windows\system32>
                    • 7. Re: Having trouble connecting SQL Developer to database on LINUX machine
                      EdStevens
                      user11309581 wrote:
                      as i already desciped earlier , i cant connect to the Linux server throw my Windows SQL Server , with error message below ,
                      tatus : Failure - Test failed :The Network Adapter could not establish the connection
                      that is too generic to mean anything. The application hid the real error message. You got it when you did the tnsping and got "TNS-12535: TNS:operation timed out". Now THAT is an error message.

                      This would indicate a firewall/routing problem. You said earlier you could ping the server, but now we see tnsping fails. The two use different protocols, so while the successful ping proves a valid physical route, it doesn't guarantee all traffic will go. What happens with
                      c:\ telnet 172.x.x.x 1521
                      • 8. Re: Having trouble connecting SQL Developer to database on LINUX machine
                        user11309581
                        from linux
                        [root@ltebilling /]# telnet 172.x.x.x 1521
                        Trying 172.x.x.x...
                        Connected to LTEBilling (172.x.x.x).
                        Escape character is '^]'.
                        from windows there is a problem
                        C:\Users\ubai>telnet 172.x.x.x 1521
                        Connecting To 172.x.x.x...Could not open connection to the host, on port 1521:
                        Connect failed
                        for test this working fine from windows
                        telnet 172.x.x.x 22

                        Edited by: user11309581 on Apr 11, 2013 4:26 PM
                        • 10. Re: Having trouble connecting SQL Developer to database on LINUX machine
                          EdStevens
                          user11309581 wrote:
                          from linux
                          [root@ltebilling /]# telnet 172.x.x.x 1521
                          Trying 172.x.x.x...
                          Connected to LTEBilling (172.x.x.x).
                          Escape character is '^]'.
                          from windows there is a problem
                          C:\Users\ubai>telnet 172.x.x.x 1521
                          Connecting To 172.x.x.x...Could not open connection to the host, on port 1521:
                          Connect failed
                          for test this working fine from windows
                          telnet 172.x.x.x 22

                          Edited by: user11309581 on Apr 11, 2013 4:26 PM
                          Then we can definitely conclude that something outside of the db server is blocking TCP traffic to port 1521 on the db server. You need to be working with your network admin. They probably are blocking it at a router.
                          • 11. Re: Having trouble connecting SQL Developer to database on LINUX machine
                            Paul M.
                            What's your Windows machine's IP address ?
                            • 12. Re: Having trouble connecting SQL Developer to database on LINUX machine
                              user11309581
                              Thanks to all , Network admin was blocking it at a router , its working now ,

                              thanks for making me thinking in a good way