9 Replies Latest reply: Jan 29, 2011 11:18 PM by 834947 RSS

    listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server

    834947
      I have installed Oracle 11.2.0.1 on Centos 5.5 64-bit in a guest VM with a Windows 7 64 host OS. The Centos OS is running well and the Oracle database that I created is working well locally. However, I am unable to tnsping the database from a client machine. When I attempt to tnsping from a windows machine (with the appropriate tnsname entry), I get TNS-12541: TNS: no listener. When I attempt to tnsping from another Linux enironment (with the appropriate tnsnames entry), I get the following:

      $tnsping demo

      TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 28-JAN-2011 00:36:13

      Copyright (c) 1997, 2005, Oracle. All rights reserved.

      Used parameter files:
      /u01/app/oracle/product/10.2/db_1/network/admin/sqlnet.ora


      Used TNSNAMES adapter to resolve the alias
      Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = demo)))
      TNS-12560: TNS:protocol adapter error


      Here is my tnsnames entry from the linux environment from which I am executing the tnsping (192.168.1.74 is definitely the correct IP):

      DEMO =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = demo)
      )
      )


      The SID name is 'demo' and the listener is running. Here is the out put of lsnrctl status:

      /home/oracle> lsnrctl status

      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:26:32

      Copyright (c) 1991, 2009, Oracle. All rights reserved.

      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
      STATUS of the LISTENER
      ------------------------
      Alias LISTENER
      Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
      Start Date 28-JAN-2011 00:04:26
      Uptime 0 days 0 hr. 22 min. 6 sec
      Trace Level off
      Security ON: Local OS Authentication
      SNMP OFF
      Listener Parameter File /opt/oracle/11.2.0.2/network/admin/listener.ora
      Listener Log File /opt/oracle/diag/tnslsnr/demo/listener/alert/log.xml
      Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=1521)))
      Services Summary...
      Service "demo.localdomain" has 1 instance(s).
      Instance "demo", status READY, has 1 handler(s) for this service...
      Service "demoXDB.localdomain" has 1 instance(s).
      Instance "demo", status READY, has 1 handler(s) for this service...
      The command completed successfully

      AND lsnrctl service:

      /home/oracle> lsnrctl service

      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:41:04

      Copyright (c) 1991, 2009, Oracle. All rights reserved.

      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
      Services Summary...
      Service "demo.localdomain" has 1 instance(s).
      Instance "demo", status READY, has 1 handler(s) for this service...
      Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
      LOCAL SERVER
      Service "demoXDB.localdomain" has 1 instance(s).
      Instance "demo", status READY, has 1 handler(s) for this service...
      Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
      DISPATCHER <machine: demo, pid: 3432>
      (ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=13848))
      The command completed successfully
      /home/oracle>


      I have to admit to being a bit confused about the 2 separate handlers and the "demoXDB.localdomain"

      I have copied the listener.ora file from a similar environment that is working correctly, stopped and restarted the listener, verified my tnsnames entries many times etc. I am wondering if the problem may be related to the fact that this environment is running in a VM. Maybe some special network configuration is required for the VM network adapter - I have resolved many sqlnet issues over the years, but this one has me baffled. Any help is much appreciated.
        • 1. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
          Lubiez Jean-Valentin
          Hello,


          I noticed some strange things:
          TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 28-JAN-2011 00:36:13
          Do you use a 10.2.0.1 Client to contact a 11.2.0.1 Database ?

          If yes, you need to apply a Patchset on the Client, you should be at least in *10.2.0.2* and, 10.2.0.4 / 10.2.0.5 is recommended.
          LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:26:32
          ...
          Listener Parameter File /opt/oracle/11.2.0.2/network/admin/listener.ora
          How did you install the Server ? Did you make several installations ( *11.2.0.1* and *11.2.0.2* ) ? Do you have several ORACLE_HOME ? Are you sure to have the correct environment variables (ORACLE_HOME, PATH) ?


          Hope this help.
          Best regards,
          Jean-Valentin
          • 2. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
            824063
            Hi,

            Hope you have TNSnames.ORA configured right.
            If so, in your linux machine edit the file "host"
            etc/host
            add an extra line like this

            192.168.1.74 HOST_NAME

            and then try TNSping

            Regards
            Remil Chalat
            • 3. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
              834947
              Lubiez Jean-Valentin wrote:
              Hello,


              I noticed some strange things:
              TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 28-JAN-2011 00:36:13
              Do you use a 10.2.0.1 Client to contact a 11.2.0.1 Database ?

              If yes, you need to apply a Patchset on the Client, you should be at least in *10.2.0.2* and, 10.2.0.4 / 10.2.0.5 is recommended.
              LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:26:32
              ...
              Listener Parameter File /opt/oracle/11.2.0.2/network/admin/listener.ora
              How did you install the Server ? Did you make several installations ( *11.2.0.1* and *11.2.0.2* ) ? Do you have several ORACLE_HOME ? Are you sure to have the correct environment variables (ORACLE_HOME, PATH) ?


              Hope this help.
              Best regards,
              Jean-Valentin
              Thanks for the suggestions. All of the environmental variables i.e. ORACLE_HOME and PATH etc are set correctly. Also, I understand that the Linux client may need to be patched, but that isn't related to the listener issue on the server, as the tnsping fails from other WIndows and Linux clients also.

              Edited by: user8778100 on Jan 28, 2011 6:40 AM
              • 4. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
                834947
                remil wrote:
                Hi,

                Hope you have TNSnames.ORA configured right.
                If so, in your linux machine edit the file "host"
                etc/host
                add an extra line like this

                192.168.1.74 HOST_NAME

                and then try TNSping

                Regards
                Remil Chalat
                I have tried using a host name (with the appropriate /etc/hosts entry) in place of the IP address. It doesn't make a difference.

                Edited by: user8778100 on Jan 28, 2011 6:37 AM

                Edited by: user8778100 on Jan 28, 2011 6:39 AM
                • 5. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
                  HG75
                  is your windows inside or outside the vmware?
                  • 6. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
                    EdStevens
                    user8778100 wrote:
                    I have installed Oracle 11.2.0.1 on Centos 5.5 64-bit in a guest VM with a Windows 7 64 host OS. The Centos OS is running well and the Oracle database that I created is working well locally. However, I am unable to tnsping the database from a client machine. When I attempt to tnsping from a windows machine (with the appropriate tnsname entry), I get TNS-12541: TNS: no listener. When I attempt to tnsping from another Linux enironment (with the appropriate tnsnames entry), I get the following:

                    $tnsping demo

                    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 28-JAN-2011 00:36:13

                    Copyright (c) 1997, 2005, Oracle. All rights reserved.

                    Used parameter files:
                    /u01/app/oracle/product/10.2/db_1/network/admin/sqlnet.ora


                    Used TNSNAMES adapter to resolve the alias
                    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = demo)))
                    TNS-12560: TNS:protocol adapter error


                    Here is my tnsnames entry from the linux environment from which I am executing the tnsping (192.168.1.74 is definitely the correct IP):

                    DEMO =
                    (DESCRIPTION =
                    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521))
                    (CONNECT_DATA =
                    (SERVER = DEDICATED)
                    (SERVICE_NAME = demo)
                    )
                    )


                    The SID name is 'demo' and the listener is running. Here is the out put of lsnrctl status:

                    /home/oracle> lsnrctl status

                    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:26:32

                    Copyright (c) 1991, 2009, Oracle. All rights reserved.

                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
                    STATUS of the LISTENER
                    ------------------------
                    Alias LISTENER
                    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
                    Start Date 28-JAN-2011 00:04:26
                    Uptime 0 days 0 hr. 22 min. 6 sec
                    Trace Level off
                    Security ON: Local OS Authentication
                    SNMP OFF
                    Listener Parameter File /opt/oracle/11.2.0.2/network/admin/listener.ora
                    Listener Log File /opt/oracle/diag/tnslsnr/demo/listener/alert/log.xml
                    Listening Endpoints Summary...
                    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
                    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=1521)))
                    Services Summary...
                    Service "demo.localdomain" has 1 instance(s).
                    Instance "demo", status READY, has 1 handler(s) for this service...
                    Service "demoXDB.localdomain" has 1 instance(s).
                    Instance "demo", status READY, has 1 handler(s) for this service...
                    The command completed successfully

                    AND lsnrctl service:

                    /home/oracle> lsnrctl service

                    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:41:04

                    Copyright (c) 1991, 2009, Oracle. All rights reserved.

                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
                    Services Summary...
                    Service "demo.localdomain" has 1 instance(s).
                    Instance "demo", status READY, has 1 handler(s) for this service...
                    Handler(s):
                    "DEDICATED" established:0 refused:0 state:ready
                    LOCAL SERVER
                    Service "demoXDB.localdomain" has 1 instance(s).
                    Instance "demo", status READY, has 1 handler(s) for this service...
                    Handler(s):
                    "D000" established:0 refused:0 current:0 max:1022 state:ready
                    DISPATCHER <machine: demo, pid: 3432>
                    (ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=13848))
                    The command completed successfully
                    /home/oracle>


                    I have to admit to being a bit confused about the 2 separate handlers and the "demoXDB.localdomain"

                    I have copied the listener.ora file from a similar environment that is working correctly, stopped and restarted the listener, verified my tnsnames entries many times etc. I am wondering if the problem may be related to the fact that this environment is running in a VM. Maybe some special network configuration is required for the VM network adapter - I have resolved many sqlnet issues over the years, but this one has me baffled. Any help is much appreciated.
                    forget the tns layer for a moment. Have you checked basic IP routing between the host os and the guest vm? From each machine "ping" the other by ip and by name.
                    • 7. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
                      834947
                      EdStevens wrote:
                      user8778100 wrote:
                      I have installed Oracle 11.2.0.1 on Centos 5.5 64-bit in a guest VM with a Windows 7 64 host OS. The Centos OS is running well and the Oracle database that I created is working well locally. However, I am unable to tnsping the database from a client machine. When I attempt to tnsping from a windows machine (with the appropriate tnsname entry), I get TNS-12541: TNS: no listener. When I attempt to tnsping from another Linux enironment (with the appropriate tnsnames entry), I get the following:

                      $tnsping demo

                      TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 28-JAN-2011 00:36:13

                      Copyright (c) 1997, 2005, Oracle. All rights reserved.

                      Used parameter files:
                      /u01/app/oracle/product/10.2/db_1/network/admin/sqlnet.ora


                      Used TNSNAMES adapter to resolve the alias
                      Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = demo)))
                      TNS-12560: TNS:protocol adapter error


                      Here is my tnsnames entry from the linux environment from which I am executing the tnsping (192.168.1.74 is definitely the correct IP):

                      DEMO =
                      (DESCRIPTION =
                      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.74)(PORT = 1521))
                      (CONNECT_DATA =
                      (SERVER = DEDICATED)
                      (SERVICE_NAME = demo)
                      )
                      )


                      The SID name is 'demo' and the listener is running. Here is the out put of lsnrctl status:

                      /home/oracle> lsnrctl status

                      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:26:32

                      Copyright (c) 1991, 2009, Oracle. All rights reserved.

                      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
                      STATUS of the LISTENER
                      ------------------------
                      Alias LISTENER
                      Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
                      Start Date 28-JAN-2011 00:04:26
                      Uptime 0 days 0 hr. 22 min. 6 sec
                      Trace Level off
                      Security ON: Local OS Authentication
                      SNMP OFF
                      Listener Parameter File /opt/oracle/11.2.0.2/network/admin/listener.ora
                      Listener Log File /opt/oracle/diag/tnslsnr/demo/listener/alert/log.xml
                      Listening Endpoints Summary...
                      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
                      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=1521)))
                      Services Summary...
                      Service "demo.localdomain" has 1 instance(s).
                      Instance "demo", status READY, has 1 handler(s) for this service...
                      Service "demoXDB.localdomain" has 1 instance(s).
                      Instance "demo", status READY, has 1 handler(s) for this service...
                      The command completed successfully

                      AND lsnrctl service:

                      /home/oracle> lsnrctl service

                      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-JAN-2011 00:41:04

                      Copyright (c) 1991, 2009, Oracle. All rights reserved.

                      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
                      Services Summary...
                      Service "demo.localdomain" has 1 instance(s).
                      Instance "demo", status READY, has 1 handler(s) for this service...
                      Handler(s):
                      "DEDICATED" established:0 refused:0 state:ready
                      LOCAL SERVER
                      Service "demoXDB.localdomain" has 1 instance(s).
                      Instance "demo", status READY, has 1 handler(s) for this service...
                      Handler(s):
                      "D000" established:0 refused:0 current:0 max:1022 state:ready
                      DISPATCHER <machine: demo, pid: 3432>
                      (ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=13848))
                      The command completed successfully
                      /home/oracle>


                      I have to admit to being a bit confused about the 2 separate handlers and the "demoXDB.localdomain"

                      I have copied the listener.ora file from a similar environment that is working correctly, stopped and restarted the listener, verified my tnsnames entries many times etc. I am wondering if the problem may be related to the fact that this environment is running in a VM. Maybe some special network configuration is required for the VM network adapter - I have resolved many sqlnet issues over the years, but this one has me baffled. Any help is much appreciated.
                      forget the tns layer for a moment. Have you checked basic IP routing between the host os and the guest vm? From each machine "ping" the other by ip and by name.
                      I can ping from any other machine. I can also connect via SSH with no problem from any other machine. Interestingly, I cannot FTP into the server from any other machine. I am very familiar with th evsftp configuration and have that running on several other boxes. However, it isn't working on this VM. That is one reason that I suspect some sort of configuration issue with the VM.
                      • 8. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
                        EdStevens
                        user8778100 wrote:
                        <snip>
                        I can ping from any other machine. I can also connect via SSH with no problem from any other machine. Interestingly, I cannot FTP into the server from any other machine. I am very familiar with th evsftp configuration and have that running on several other boxes. However, it isn't working on this VM. That is one reason that I suspect some sort of configuration issue with the VM.
                        Ok, how about firewall rules on the vm? CHeck your iptables to make sure the port for the listener (1521?) is open.
                        • 9. Re: listener failing - Oracle 11.2.0.1 64 / Centos 5.5 64 / VMware server
                          834947
                          EdStevens wrote:
                          user8778100 wrote:
                          <snip>
                          I can ping from any other machine. I can also connect via SSH with no problem from any other machine. Interestingly, I cannot FTP into the server from any other machine. I am very familiar with th evsftp configuration and have that running on several other boxes. However, it isn't working on this VM. That is one reason that I suspect some sort of configuration issue with the VM.
                          Ok, how about firewall rules on the vm? CHeck your iptables to make sure the port for the listener (1521?) is open.
                          That was the issue - Thanks very much. This is a demo environment, so I just killed the firewall with the following commands:

                          /etc/init.d/iptables save
                          /etc/init.d/iptables stop