Fixed mongodb conn failed issue