On some servers, port 1521 will not be enabled by default because of security reasons. You can enable this specific port inside linux using below commands.
If you are working on AWS EC2 server, then you need to enable default listener port 1521 in order to accept connections from applications.
iptables -I INPUT -p tcp --dport 1521 -j ACCEPT iptables -I INPUT -p tcp --dport 80 -j ACCEPT
You can change the port number in above commands to enable specific ports.