@wlainey said:

nce I realized that SELinux had not been configured properly by using ‘setenforce 0’ everything starting working fine.

You’ll need to set it permanently to permissive as well - you would edit /etc/selinux/config to do that. If you don’t, it’ll stop working again at the next reboot.