./bitcoin-cli stop error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/home/ubuntu/.bitcoin/bitcoin.conf)
This happens if you have bitcoind running, then you edit bitcoin.conf to add RPC port & credentials. Then you want to restart bitcoin daemon. But it is impossible to stop it as it tries to connect & close RPC that does not exist yet. So one have to kill the daemon.