Oracle tnsping hostname/IP display Tns-12541:tns:no listener

Source: Internet
Author: User
Tags snmp

Today is a cloudy day, God want to down, sleepy always want to sleep ...

The amount of ... Don't say much nonsense.

Today, I want to do a catalog library, I installed on the virtual machine oracle11g, this is different from the target database,

So there was no default port number 1521 when configuring listening, and as usual, I was too lazy to manually create a listener,

NETCA Create Listen, listen to the default name listener, the port number is changed to 1526;

Then start the database, register the ALTER system register, start the monitoring, [[email protected] admin]$ lsnrctl start

To view the listening status:

[Email protected] ~]$ lsnrctl status

Lsnrctl for linux:version 11.2.0.4.0-production on 23-sep-2014 21:25:12

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

Connecting to (Description= (address= (protocol=tcp) (Host=jibo) (port=1526)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.4.0-production
Start Date 23-sep-2014 15:59:46
Uptime 0 days 5 hr. Min. sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File/u01/app/oracle/diag/tnslsnr/jibo/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (Host=jibo) (port=1526)))
(Description= (address= (PROTOCOL=IPC) (key=extproc1526)))
Services Summary ...
Service "PROD" has 1 instance (s).
Instance "PROD", status ready, have 1 handler (s) for the This service ...
Service "Prodxdb" has 1 instance (s).
Instance "PROD", status ready, have 1 handler (s) for the This service ...
The command completed successfully

Well...... Very good, everything is normal;

I copied a copy of the catalog library Tnsnames.ora to the target database Tnsnames.ora, so that the target database remote access to the catalog library;

First Test if you can connect:

Sqlplus Hr/[email protected]

(The Catalog library service name I set to Prod,target library service name I set to ORCL)

Results...... Uh, I didn't pass, error ...

I was wondering ... Install the database what are set up well, do not remember what is wrong ...

I thought about it, is it the catalog library problem or the target library?

Do not think, the target library has been used well, listen to anything is not a problem,

(My target hostname Demon Ip192.168.1.8/catalog Library host name Jibo ip192.168.1.4)

Check target, tnsping 192.168.1.4.

[Email protected] admin]$ tnsping 192.168.1.4

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 00:43:42

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.4) (PORT= 1521)))
Tns-12541:tns:no Listener
There are errors ... No boot monitoring? No, No.

The above look has been started ...

Tnsping yourself again;

[Email protected] admin]$ tnsping 192.168.1.8

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 00:45:33

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.8) (PORT= 1521)))
OK (msec)

I tnsping myself no problem

Test the Catalog library again

[Email protected] ~]$ tnsping 192.168.1.8

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 00:48:02

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.8) (PORT= 1521)))
OK (msec)
Tnsping Target Library no problem.

Tnsping yourself a little bit more:

[Email protected] ~]$ tnsping 192.168.1.4

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 00:48:14

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.4) (PORT= 1521)))
Tns-12541:tns:no Listener


Amount, error, no monitoring, check monitoring, what is the reason ...

[Email protected] admin]$ LSNRCTL status Listener

Lsnrctl for linux:version 11.2.0.4.0-production on 23-sep-2014 23:09:33

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

Connecting to (Description= (address= (protocol=tcp) (Host=jibo) (port=1526)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.4.0-production
Start Date 23-sep-2014 23:01:40
Uptime 0 days 0 hr. 7 min. sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File/u01/app/oracle/diag/tnslsnr/jibo/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (Host=jibo) (port=1526)))
(Description= (address= (PROTOCOL=IPC) (key=extproc1526)))
Services Summary ...
Service "PROD" has 1 instance (s).
Instance "PROD", status ready, have 1 handler (s) for the This service ...
Service "Prodxdb" has 1 instance (s).
Instance "PROD", status ready, have 1 handler (s) for the This service ...
The command completed successfully

It's normal, there's a problem with the catalog library, what's the problem?

Try Tnsping host name again

[Email protected] ~]$ tnsping Jibo

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 00:51:55

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.4) (PORT= 1521)))
Tns-12541:tns:no Listener

Error......

Tnsping Service Name Try ...

[Email protected] ~]$ tnsping PROD

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 00:53:09

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

Used parameter files:


Used TNSNames Adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = Jibo) (PORT = 1526)) (Connect_data = (SERVER = DEDI cated) (service_name = PROD)))
OK (msec)

This can be ah ... What's the problem?

Does the hostname and IP address match?

View/etc/hosts

[Email protected] ~]# cat/etc/hosts
# don't remove the following line, or various programs
# that require network functionality would fail.
127.0.0.1 localhost.localdomain localhost
:: 1 localhost6.localdomain6 Localhost6

192.168.1.4 Jibo
[Email protected] ~]#
It's normal.

Restart Monitoring Lsnrctl Reload

Try again ...

Still reported Tns-12541:tns:no listener error; View Tnsnames.ora

PROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Jibo) (PORT = 1526))
(Connect_data =
(SERVER = dedicated)
(service_name = PROD)
)
)

Listener_prod =
(ADDRESS = (PROTOCOL = TCP) (HOST = Jibo) (PORT = 1526))

When viewing Listener.ora

LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Jibo) (PORT = 1526))
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1526))
)
)

Adr_base_listener =/u01/app/oracle

I am suddenly somewhat puzzled, why NETCA automatically create the listening Tnsnames.ora and Listener.ora of the listener name is not the same, is not automatically generated also wrong ...

So what's the name of the listener registered in the database?

I'll look at the Local_listener parameter again.

[email protected]>show parameter Local_listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Local_listener string Listener_prod
[email protected]>
Well, not the listener name I created for listener, why?

Well......

Oh, I remember. Listener the listener name is the default listener name for Oracle, and the default listening port is 1521,

I have been tnsping host name/IP, according to the default listener name, it automatically find the port for 1521 monitoring, it is certainly not found ...

Netstat-pan|grep 1521 is not enabled for this port ...

It seems that the default listener name is not so good,

I manually changed the monitor name to Listener_prod in Listener.ora.

Restart monitoring Lsnrctl Reload Listener_prod

And then shut down the default listener Lsnrctl stop

[Email protected] ~]$ sqlplus hr/[email protected]: 1526/prod

Sql*plus:release 11.2.0.4.0 Production on Wed Sep 24 09:01:14 2014

Copyright (c) 1982, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options

Sql>

Simple connection no problem, 1526 this port is available

Try again tnsping.

[Email protected] admin]$ tnsping 192.168.1.4

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 09:01:28

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.4) (PORT= 1521)))
Tns-12541:tns:no Listener
[Email protected] admin]$ tnsping Jibo

TNS Ping Utility for linux:version 11.2.0.4.0-production on 24-sep-2014 09:01:41

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

Used parameter files:

Used HOSTNAME Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTOCOL=TCP) (host=192.168.1.4) (PORT= 1521)))
Tns-12541:tns:no Listener
[Email protected] admin]$

No, it's like you have to go 1521 this port, but the default has changed,

or this port ... Well, who has a good way to let it use 1526 of this port please leave a message ah ...

The result was successful, with a port of 1526; The default configuration monitoring is really pit ...

Oracle tnsping hostname/IP display Tns-12541:tns:no listener

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.