Problem
While start the listener is prod database getting an error like this TNS-12542: TNS:address already in use
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 20-AUG-2020 06:06:57
Copyright (c) 1991, 2017, Oracle. All rights reserved.
Starting /oracle/app/oracle/product/12.1.0.2/dbhome/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /oracle/app/oracle/product/12.1.0.2/dbhome/network/admin/listener.ora
Log messages written to /oracle/app/oracle/diag/tnslsnr/dbaclass-host/listener_prod/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=chaitanya-host)(PORT=1524)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=chaitanya-host)(PORT=1524)))
TNS-12542: TNS:address already in use ---- >>>
TNS-12560: TNS:protocol adapter error
TNS-00512: Address already in use
Linux Error: 125: Address already in use
Listener failed to start. See the error message(s) above...
Solution
To find the solution we need to check the Listener file listener.ora
LISTENER_PROD =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = chaitanya-host)(PORT = 1524)) --- >>>
(ADDRESS = (PROTOCOL = TCP)(HOST = chaitanya-host)(PORT = 1524)) --- >>>
)
)
SID_LIST_LISTENER_PROD =
(SID_LIST =
(SID_DESC =
(SID_NAME = PRODDB)
(ORACLE_HOME = /oracle/app/oracle/product/12.1.0.2/dbhome)
)
)
Inside the listener file we have found that two address entries in the same host and same port number (1524) so starting the listener it will get the conflict so unable to start the database
(ADDRESS = (PROTOCOL = TCP)(HOST = chaitanya-host)(PORT = 1524))
(ADDRESS = (PROTOCOL = TCP)(HOST = chaitanya-host)(PORT = 1524))
To fix the error in give different port numbers for both the address entries
The listener will look like this after change the port numbers
LISTENER_PROD =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = chaitanya-host)(PORT = 1524)) --- >>>
(ADDRESS = (PROTOCOL = TCP)(HOST = chaitanya-host)(PORT = 1525)) --- >>>
)
)
SID_LIST_LISTENER_PROD =
(SID_LIST =
(SID_DESC =
(SID_NAME = PRODDB)
(ORACLE_HOME = /oracle/app/oracle/product/12.1.0.2/dbhome)
)
)
Now start the listener
# lsnrctl start LISTENER_PROD
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 20-AUG-2020 06:15:09
Copyright (c) 1991, 2017, Oracle. All rights reserved.
Starting /oracle/app/oracle/product/12.1.0.2/dbhome/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /oracle/app/oracle/product/12.1.0.2/dbhome/network/admin/listener.ora
Log messages written to /oracle/app/oracle/diag/tnslsnr/chaitanya-host/listener_prod/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=chaitanya-host)(PORT=1524)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=chaitanya-host)(PORT=1525)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=chaitanya-host)(PORT=1524)))
STATUS of the LISTENER
------------------------
Alias LISTENER_PROD
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 20-AUG-2020 06:15:09
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/12.1.0.2/dbhome/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/chaitanya-host/listener_prod/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=chaitanya-host)(PORT=1524)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=chaitanya-host)(PORT=1525)))
Services Summary...
Service "PRODDB" has 1 instance(s).
Instance "PRODDB", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Listener started successfully.
Listener started sucessfully and listener listening in on both the ports 1524 and 1525 so ports should be unique for each address in the listener
THANKS FOR VIEWING MY BLOG FOR MORE UPDATES FOLLOW ME OR SUBSCRIBE ME