MongoDB に mongo コマンドで接続しようとしたらエラーが出た。
Error: network error while attempting to run command 'isMaster' on host '127.0.0.1:27017'
/etc/mongod.conf で外部接続を許可していないだけでした・・・。
以下のように bindIp をコメントアウトすると動作します。
#bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.