While stopping the ASM instance , on any or all of the nodes (three nodes in my current environment), I got the the below error.
ORA-15097: cannot SHUTDOWN ASM instance with connected client.
I had to do a ps-ef | grep of the grid user, and kill (kill -9 ) a process that was taking up the connection to the ASM instance. I had to do this in all the three servers, then only could execute the below commands.
export ORACLE_SID=+ASM1
sqlplus / as sysasm
shutdown immediate
export ORACLE_SID=+ASM2
sqlplus / as sysasm
shutdown immediate
export ORACLE_SID=+ASM3
sqlplus / as sysasm
shutdown immediate