Site icon IT Tutorial

TNS-00512: Address already in use

Hi,

Sometimes You can get ” TNS-00512: Address already in use ” error.

 

Details of error are as follows.

TNS-00512: Address already in use
Cause: Specified listener address is already being used.
Action: Start your listener with an unused address.

 

When I create a new listener on Standby database, i got the following error.

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-APR-2020 14:24:31

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

Starting /u01/app/oracle/product/11.2.0/dbhome_2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/msdbadm01/listener_standby/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=msdbadm01)(PORT=1453)))
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
TNS-00512: Address already in use
Linux Error: 98: Address already in use

 

This is caused by related port busy. Check if it is used or not.

$ netstat -na|grep -i 1453
tcp 0 0 127.0.0.1:34244 127.0.0.1:1453 TIME_WAIT
tcp 0 0 127.0.0.1:34245 127.0.0.1:1453 TIME_WAIT
tcp 0 0 ::ffff:127.0.0.1:1453 :::* LISTEN

 

To solve this error, Use different port for the Standby listener. I have changed the listener port with 1463 instead of 1453.

 

Start and check the listener status.

$ lsnrctl start LISTENER_STANDBY

$ lsnrctl status LISTENER_STANDBY


LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-APR-2020 15:09:53

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=msdbadm01)(PORT=1463)))
STATUS of the LISTENER
------------------------
Alias LISTENER_STANDBY
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 24-APR-2020 15:07:36
Uptime 0 days 0 hr. 2 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/msdbadm01/listener_standby/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=msdbadm01)(PORT=1463)))
Services Summary...
Service "MSDB1" has 1 instance(s).
Instance "MSDB1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

 

 

Do you want to learn more details about RMAN, then read the following articles.

https://ittutorial.org/rman-backup-restore-and-recovery-tutorials-for-beginners-in-the-oracle-database/

 

Exit mobile version