Table of Contents
Introduction
In this article, we'll look at resolving the port 1521 provided for this listener is currently in use issue.
Cause
I noticed at the time of database creation that when I was at the Listener creation step I faced this port 1521 provided for this listener is currently in use issue due to which I was unable to proceed further, but it was a little surprising for me because I was creating the same setup in another machine in which this step got completed without any issue.
Solution
After searching I found an issue that hides inside the /etc/hosts location where I missed putting the correct domain name due to which I got this issue.
Wrong Entry
192.168.X.X test2.localdomian.com test2
Correct Entry
192.168.X.X test2.localdomain.com test2
Output of IP address before fixing the entry
[root@test2 ~]# hostname -i
172.232.4.213 172.232.31.180 172.232.25.148
Output of IP address after fixing the entry
[root@test2 ~]# hostname -i
192.168.X.X
Finally!! I can create the listener entry after fixing the entries which was causing the port 1521 provided for this listener is currently in use issue.
Conclusion
We need to check the IP address, Hostname, and Alias name entries inside the /etc/hosts file, there is the possibility that the IP address or the Hostname or the Alias name entries may be incorrect.
Note: If you want to set the Lab in your home for practice to get your hands dirty then you can download and install Oracle VirtualBox, followed by the operating system, the Oracle binary software, and finally, create the database.