Bash shell script not getting connect to MongoDB even if status is active