The common issue when we are rebuilding the standby through RMAN. Follow the below steps and resolve the RMAN 04006 error ...

Listener Entry:

(DESCRIPTION=
(ADDRESS=...)
(ADDRESS=...)
(CONNECT_DATA=
(SERVICE_NAME=xxxxxx)))

In Pfile below parameter entry :

db_name=xxxxxx

Password file:

Make sure whether we have created the password file on both primary and standby along with DBNAME. ex:

primary (PROD) =password would be orapwdPROD
standby(PRODSTB)=password would be orapwdPROD