MongoDB after-installation error, couldn't connect to server

Clash Royale CLAN TAG#URR8PPP up vote
2
down vote
favorite
I was following the (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/) instructions to install MongoDB.
After completing till 4th step, i.e., after running the following command:-
sudo apt-get install -y mongodb-org
when I run mongo command to get the CLI, I am getting the following error:-
MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
2018-04-20T12:02:10.947+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-04-20T12:02:10.999+0530 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
Also when I run sudo service mongod start, nothing happens. But when after that, I run sudo service mongod status, I get the following error:-
â mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset:
Active: failed (Result: exit-code) since Fri 2018-04-20 12:04:50 IST; 37s ago
Docs: https://docs.mongodb.org/manual
Process: 28034 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exite
Main PID: 28034 (code=exited, status=217/USER)
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: Started High-performance, schema-free
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Main process exited,
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Unit entered failed s
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Failed with result 'e
lines 1-11/11 (END)
Can anyone help in resolving this issue?
server database mongodb
add a comment |Â
up vote
2
down vote
favorite
I was following the (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/) instructions to install MongoDB.
After completing till 4th step, i.e., after running the following command:-
sudo apt-get install -y mongodb-org
when I run mongo command to get the CLI, I am getting the following error:-
MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
2018-04-20T12:02:10.947+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-04-20T12:02:10.999+0530 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
Also when I run sudo service mongod start, nothing happens. But when after that, I run sudo service mongod status, I get the following error:-
â mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset:
Active: failed (Result: exit-code) since Fri 2018-04-20 12:04:50 IST; 37s ago
Docs: https://docs.mongodb.org/manual
Process: 28034 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exite
Main PID: 28034 (code=exited, status=217/USER)
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: Started High-performance, schema-free
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Main process exited,
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Unit entered failed s
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Failed with result 'e
lines 1-11/11 (END)
Can anyone help in resolving this issue?
server database mongodb
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I was following the (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/) instructions to install MongoDB.
After completing till 4th step, i.e., after running the following command:-
sudo apt-get install -y mongodb-org
when I run mongo command to get the CLI, I am getting the following error:-
MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
2018-04-20T12:02:10.947+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-04-20T12:02:10.999+0530 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
Also when I run sudo service mongod start, nothing happens. But when after that, I run sudo service mongod status, I get the following error:-
â mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset:
Active: failed (Result: exit-code) since Fri 2018-04-20 12:04:50 IST; 37s ago
Docs: https://docs.mongodb.org/manual
Process: 28034 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exite
Main PID: 28034 (code=exited, status=217/USER)
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: Started High-performance, schema-free
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Main process exited,
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Unit entered failed s
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Failed with result 'e
lines 1-11/11 (END)
Can anyone help in resolving this issue?
server database mongodb
I was following the (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/) instructions to install MongoDB.
After completing till 4th step, i.e., after running the following command:-
sudo apt-get install -y mongodb-org
when I run mongo command to get the CLI, I am getting the following error:-
MongoDB shell version v3.6.4
connecting to: mongodb://127.0.0.1:27017
2018-04-20T12:02:10.947+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-04-20T12:02:10.999+0530 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
Also when I run sudo service mongod start, nothing happens. But when after that, I run sudo service mongod status, I get the following error:-
â mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset:
Active: failed (Result: exit-code) since Fri 2018-04-20 12:04:50 IST; 37s ago
Docs: https://docs.mongodb.org/manual
Process: 28034 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exite
Main PID: 28034 (code=exited, status=217/USER)
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: Started High-performance, schema-free
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Main process exited,
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Unit entered failed s
Apr 20 12:04:50 Inspiron-N5010 systemd[1]: mongod.service: Failed with result 'e
lines 1-11/11 (END)
Can anyone help in resolving this issue?
server database mongodb
asked Apr 20 at 6:59
user8817816
206
206
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
It seems that the package is broken or package installation was interrupted.
Run:
sudo dpkg --configure -a
It will repair the package.
Also you first have to start the mongod server to use its cli.
So first run:
sudo service mongod start
and then run
mongo
This will open the mongodb cli.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
It seems that the package is broken or package installation was interrupted.
Run:
sudo dpkg --configure -a
It will repair the package.
Also you first have to start the mongod server to use its cli.
So first run:
sudo service mongod start
and then run
mongo
This will open the mongodb cli.
add a comment |Â
up vote
2
down vote
accepted
It seems that the package is broken or package installation was interrupted.
Run:
sudo dpkg --configure -a
It will repair the package.
Also you first have to start the mongod server to use its cli.
So first run:
sudo service mongod start
and then run
mongo
This will open the mongodb cli.
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
It seems that the package is broken or package installation was interrupted.
Run:
sudo dpkg --configure -a
It will repair the package.
Also you first have to start the mongod server to use its cli.
So first run:
sudo service mongod start
and then run
mongo
This will open the mongodb cli.
It seems that the package is broken or package installation was interrupted.
Run:
sudo dpkg --configure -a
It will repair the package.
Also you first have to start the mongod server to use its cli.
So first run:
sudo service mongod start
and then run
mongo
This will open the mongodb cli.
edited Jun 3 at 20:15
Stephen Rauch
1,1546716
1,1546716
answered Jun 3 at 20:07
Agent-J
865
865
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026606%2fmongodb-after-installation-error-couldnt-connect-to-server%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password