简体   繁体   English

无法连接到MongoDB:无法连接到:333.33.333.333:27017:连接被拒绝

[英]Unable to connect to MongoDB: Failed to connect to: 333.33.333.333:27017: Connection refused

Hello am trying to connect mongodb on live server using codeigniter an getting following error . 您好,正在尝试使用codeigniter在实时服务器上连接mongodb,但出现以下错误。

Unable to connect to MongoDB: Failed to connect to: Connection refused 无法连接到MongoDB:无法连接:连接被拒绝

Everything working fine on my local machine. 在我的本地计算机上一切正常。

here is my connection setting in mongo_db.php file in config folder 这是我在config文件夹中的mongo_db.php文件中的连接设置

$config['mongo_db']['default']['no_auth'] = FALSE;
$config['mongo_db']['default']['hostname'] = '333.33.333.333';
$config['mongo_db']['default']['port'] = '27017';
$config['mongo_db']['default']['username'] = 'abcd';
$config['mongo_db']['default']['password'] = 'abcdef';
$config['mongo_db']['default']['database'] = 'db_seeker';
$config['mongo_db']['default']['db_debug'] = TRUE;
$config['mongo_db']['default']['return_as'] = 'array';
$config['mongo_db']['default']['write_concerns'] = (int)1;
$config['mongo_db']['default']['journal'] = TRUE;
$config['mongo_db']['default']['read_preference'] = NULL;
$config['mongo_db']['default']['read_preference_tags'] = NULL;

333.33.333.333不是有效的IP,因此我怀疑您的服务器已绑定到该IP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法连接到数据库:无法连接到:localhost:27017:连接被拒绝 - Unable to connect to Database: Failed to connect to: localhost:27017: Connection refused 无法连接到:localhost:27017:连接被拒绝 - Failed to connect to: localhost:27017: Connection refused “致命错误:未捕获的异常'MongoConnectionException',消息为'无法连接至:/tmp/mongodb-27017.sock:0:连接被拒绝'” - “Fatal error: Uncaught exception 'MongoConnectionException' with message 'Failed to connect to: /tmp/mongodb-27017.sock:0: Connection refused''” MongoDB + PHP:错误“无法连接到 127.0.0.1:27017” - MongoDB + PHP: Error “Failed to connect to 127.0.0.1:27017” curl无法连接拒绝连接 - curl Failed to connect Connection refused 无法连接到smtp(连接被拒绝) - Unable to connect to smtp (Connection refused) 无法连接到:连接被拒绝 - cURL PHP - Failed to connect to : Connection refused - cURL PHP 无法连接到本地主机端口 9515:连接被拒绝 - Failed to connect to localhost port 9515: Connection refused 无法从php“拒绝连接”连接到MySQL - Unable to connect to MySQL from php “Connection Refused” Codeigniter错误无法连接到MongoDB:连接失败:身份验证失败 - Codeigniter error Unable to connect to MongoDB: Failed to connect: auth failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM