1 2 Previous Next 28 Replies Latest reply on Mar 18, 2011 2:07 AM by EdStevens Go to original post
      • 15. Re: ORA-12541: TNS:No listener error
        His host name in listener.ora doesn't match the hostname in tnsnames.ora, he already posted the info.
        The host will send the IP address of the different hostname back ---------> ora-12541


        -----------
        Sybrand Bakker
        Senior Oracle DBA
        • 16. Re: ORA-12541: TNS:No listener error
          513920
          Thank you Sybrand, I have corrected that.
          Now they are matched. To my surprise still the same error.

          Thanks for pointing that.
          • 17. Re: ORA-12541: TNS:No listener error
            513920
            Recent status from Guest

            C:\>tnsping orcl

            TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 17-MAR-2011 15:40:07

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

            Used parameter files: C:\orcl\app\db\product\11.2.0\client_1\network\admin\sqlnet.ora

            Used TNSNAMES adapter to resolve the alias
            Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = pc-e6510)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
            TNS-12541: TNS:no listener

            C:\>

            Thanks.
            • 18. Re: ORA-12541: TNS:No listener error
              513920
              Hi all, any other tips would be helpful, so that I can try. I don't like to be stuck-in this !!

              Please post your thoughts, I will carry on this from home - roughly after an hour.

              Thanks.

              Edited by: Yar on Mar 17, 2011 12:56 PM
              • 19. Re: ORA-12541: TNS:No listener error
                EdStevens
                Yar wrote:
                No I can't. But can ping on pc-e6510

                -- from GUEST
                C:\>ping 192.168.171.68

                Pinging 192.168.171.68 with 32 bytes of data:

                Destination host unreachable.
                Ping statistics for 192.168.171.68: Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),

                C:\>ping pc-e6510

                Pinging pc-e6510 [192.168.56.1] with 32 bytes of data:

                Reply from 192.168.56.1: bytes=32 time<1ms TTL=128
                Reply from 192.168.56.1: bytes=32 time<1ms TTL=128

                Ping statistics for 192.168.56.1:
                Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
                Approximate round trip times in milli-seconds:
                Minimum = 0ms, Maximum = 0ms, Average = 0ms

                The downside of changing/ping on 192.168.171.68 won't be a solution ( I guess) because my Host IP is not static, tomorrow this IP will change.
                That is a HUGE problem. Servers should have static IP addresses. Period. How do you expect a client to find the host if the host keeps changing addresses.

                And to clarify what was going on when Chinar asked you to change the client's tnsnames from referencing the host name to the ip address .. There was no magic or secret there. You can use a host name, but you have to be sure it gets resolved to the correct IP address. His suggestion was to simplify the chain of events by removing the need to resolve the name to an address.

                See the discussion on most of your problems at edstevensdba.wordpress.com/presentations/
                Thanks again.

                Edited by: Yar on Mar 17, 2011 12:16 PM
                1 person found this helpful
                • 20. Re: ORA-12541: TNS:No listener error
                  513920
                  Thanks EdStevens for the clarification and reviewing this issue;

                  My understanding on regular ping on IP or HostName should return the same result. i.e, when I ping the guest & host they are good.
                  The issues is on tnsping - I have tried tnsping keeping the IP address but didn't worked, even not able to send regular ping.

                  Due you think its because I have 2 entries in Host file..
                  I edited the host file entry at the HOST OS (C:\Windows\System32\drivers\etc)
                  +192.168.171.68     pc-e6510+
                  +192.168.56.1     pc-e6510+

                  I have one question though - assume if the server IP changes on regular basis, can't we resolve with host name in tnsentry, rather than specifying IP address.

                  Thanks.
                  • 21. Re: ORA-12541: TNS:No listener error
                    sb92075
                    can't we resolve with host name in tnsentry, rather than specifying IP address.
                    post results after doing so,
                    • 22. Re: ORA-12541: TNS:No listener error
                      513920
                      Hurray....! the issue has been solved.
                      Thanks for everyone who patently gone through each line to resolve this item.

                      Okay, this what I did, I got rid of host file entries completely, then tnsping worked;

                      --GUEST*

                      C:\>tnsping orcl

                      TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 17-MAR-2011 18:57:30

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

                      Used parameter files:
                      C:\orcl\app\db\product\11.2.0\client_1\network\admin\sqlnet.ora


                      Used TNSNAMES adapter to resolve the alias
                      Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = pc-e6510)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
                      OK (10 msec)

                      C:\>


                      --HOST*

                      C:\>tnsping orcl

                      TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production on 17-MAR-2011 19:02:09

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

                      Used parameter files:
                      C:\oracle10g\product\10.2.0\client_1\network\admin\sqlnet.ora


                      Used TNSNAMES adapter to resolve the alias
                      Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = pc-e6510)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
                      OK (10 msec)

                      C:\>


                      I like to make a point here - I didn't change the tnsnames.ora with IP address, still it reads but the Host IP address has changed (now 192.168.1.104)
                      ORCL =
                      (DESCRIPTION =
                      (ADDRESS = (PROTOCOL = TCP)(HOST = pc-e6510)(PORT = 1521))
                      (CONNECT_DATA =
                      (SERVER = DEDICATED)
                      (SERVICE_NAME = orcl)
                      )
                      )

                      LISTENER_ORCL =
                      (ADDRESS = (PROTOCOL = TCP)(HOST = pc-e6510)(PORT = 1521))



                      I really appreciate all your help which leads to find the solution, thanks again.

                      Until next time,
                      Yar.
                      • 23. Re: ORA-12541: TNS:No listener error
                        513920
                        See the last post for the solution.
                        • 24. Re: ORA-12541: TNS:No listener error
                          EdStevens
                          Yar wrote:
                          Thanks EdStevens for the clarification and reviewing this issue;

                          My understanding on regular ping on IP or HostName should return the same result. i.e, when I ping the guest & host they are good.
                          The issues is on tnsping - I have tried tnsping keeping the IP address but didn't worked, even not able to send regular ping.

                          Due you think its because I have 2 entries in Host file..
                          I edited the host file entry at the HOST OS (C:\Windows\System32\drivers\etc)
                          +192.168.171.68     pc-e6510+
                          +192.168.56.1     pc-e6510+
                          So which IP address do you expect pc-e6510+ to resolve to? Why?

                          This is a fundamentally mis-configured hosts file. A given name (in your case, pc-e6510+) should only be associated with one IP address.
                          I have one question though - assume if the server IP changes on regular basis, can't we resolve with host name in tnsentry, rather than specifying IP address.
                          Only if that host name is reliably resolved to the correct - and ever changing - ip address. By what mechanism do you expect that to happen?

                          Servers - even test servers running under vm on your laptop - need fixed IP addresses. Your need to run it on a hostonly network doesn't change that requirement, and doesn't make that requirement difficult to meet. Just configure it for a fixed IP address. Google is your friend on how to do that.
                          Thanks.
                          • 25. Re: ORA-12541: TNS:No listener error
                            513920
                            Well, I have configured my host file incorrectly, on first place I didn't focused on that file, my bad !! and I have posted that host file details in the thread.

                            Later, I don't like to have a loop-back adapter or fix an IP. As I read more docs it makes sense to refer the servers (any not just oracle) by Host name rather than IP address or even localhost.

                            Could you please add some light to this - "Servers - even test servers running under vm on your laptop - need fixed IP addresses". I like to understand better, in what situations we would face an issue if we have dynamic IP for servers? - an URL should be sufficient.

                            Thanks.

                            Edited by: Yar on Mar 17, 2011 4:37 PM
                            • 26. Re: ORA-12541: TNS:No listener error
                              As soon as the server IP expires you have an issue.
                              This is because sqlnet only looks up the IP using DNS when the connection is initiated and communicates over the IP address once the connection has been established.

                              So why you want to stick to DHCP is a mystery, Oracle doesn't work on DHCP, and it is also in the installation documentation.

                              -------------
                              Sybrand Bakker
                              Senior Oracle DBA
                              1 person found this helpful
                              • 27. Re: ORA-12541: TNS:No listener error
                                513920
                                Thanks, straight to the point... that's my next step.
                                And it's time for me to go through this;
                                [Oracle Database Preinstallation Requirements|http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/reqs.htm#sthref291]

                                Thank you.
                                • 28. Re: ORA-12541: TNS:No listener error
                                  EdStevens
                                  Yar wrote:
                                  Well, I have configured my host file incorrectly, on first place I didn't focused on that file, my bad !! and I have posted that host file details in the thread.

                                  Later, I don't like to have a loop-back adapter or fix an IP. As I read more docs it makes sense to refer the servers (any not just oracle) by Host name rather than IP address or even localhost.

                                  Could you please add some light to this - "Servers - even test servers running under vm on your laptop - need fixed IP addresses". I like to understand better, in what situations we would face an issue if we have dynamic IP for servers? - an URL should be sufficient.

                                  Thanks.

                                  Edited by: Yar on Mar 17, 2011 4:37 PM
                                  Servers need a fixed IP because clients need to know where to find them. Remember, in networking, any and all references to server names have to be able to be resolved to an ip address. The routers and switches only know about ip addresses, not names. Having a server on a DHCP assigned address is no different than if you changed your telephone number every day. How would you expect a prospective employer to contact you if the number you put on your resume (cv) was not today's telephone number?

                                  Please explain why you are so opposed to using a fixed IP address? ("I don't like to have a loop-back adapter or fix an IP. As I read more docs it makes sense to refer the servers (any not just oracle) by Host name rather than IP address"). I also prefer to refer to servers by name instead of IP. It makes things much easier to fix when there is a necessary change to the IP address. But that is NOT inconsistent with assigning a fixed IP address. And for your vm test machines on your laptop, no loopback is needed (as if that were a "problem") I have 6 vm's running under VMworkstation on my XP Pro laptop - 4 linux, 1 Win server 2003, one Win 7 . Every one has a fixed IP address.
                                  1 2 Previous Next