MongoDB - Unit mongod.service can't found - Ubuntu 16.04
When I try to start MongoDB, I get this error:
# mongo
MongoDB shell version: 3.2.6
connecting to: test
2016-05-21T16:14:31.183+0300 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-05-21T16:14:31.183+0300 E QUERY [thread1] Error: couldn't connect $ to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
After that I do some research and learned that I firstly need to start MongoDB server with mongod
command. But when I try that, I get an error again:
try that, i get an error again:
# mongod
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] MongoDB starting : pid=32019 port=27017 dbpath=/data/db 64-bit host=ibrahim-Inspiron-3542
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] db version v3.2.6
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g-fips 1 Mar 2016
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] modules: none
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] build environment:
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distmod: ubuntu1404
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distarch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] target_arch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] options: {}
2016-05-21T16:19:15.451+0300 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2016-05-21T16:19:15.451+0300 I CONTROL [initandlisten] dbexit: rc: 100
I try start mongod service on console:
# service mongod start
Failed to start mongod.service: Unit mongod.service not found.
What I need to do?
My English is not so much good, please answer this question with a simple English.
16.04 mongodb
add a comment |
When I try to start MongoDB, I get this error:
# mongo
MongoDB shell version: 3.2.6
connecting to: test
2016-05-21T16:14:31.183+0300 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-05-21T16:14:31.183+0300 E QUERY [thread1] Error: couldn't connect $ to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
After that I do some research and learned that I firstly need to start MongoDB server with mongod
command. But when I try that, I get an error again:
try that, i get an error again:
# mongod
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] MongoDB starting : pid=32019 port=27017 dbpath=/data/db 64-bit host=ibrahim-Inspiron-3542
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] db version v3.2.6
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g-fips 1 Mar 2016
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] modules: none
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] build environment:
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distmod: ubuntu1404
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distarch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] target_arch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] options: {}
2016-05-21T16:19:15.451+0300 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2016-05-21T16:19:15.451+0300 I CONTROL [initandlisten] dbexit: rc: 100
I try start mongod service on console:
# service mongod start
Failed to start mongod.service: Unit mongod.service not found.
What I need to do?
My English is not so much good, please answer this question with a simple English.
16.04 mongodb
will someone help me?
– A. Ite
May 21 '16 at 14:11
have a look at this question: stackoverflow.com/questions/37096517/…
– DJCrashdummy
Jun 2 '16 at 12:39
askubuntu.com/questions/921753/…
– Siddharth Jain
Sep 27 '18 at 11:05
add a comment |
When I try to start MongoDB, I get this error:
# mongo
MongoDB shell version: 3.2.6
connecting to: test
2016-05-21T16:14:31.183+0300 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-05-21T16:14:31.183+0300 E QUERY [thread1] Error: couldn't connect $ to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
After that I do some research and learned that I firstly need to start MongoDB server with mongod
command. But when I try that, I get an error again:
try that, i get an error again:
# mongod
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] MongoDB starting : pid=32019 port=27017 dbpath=/data/db 64-bit host=ibrahim-Inspiron-3542
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] db version v3.2.6
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g-fips 1 Mar 2016
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] modules: none
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] build environment:
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distmod: ubuntu1404
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distarch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] target_arch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] options: {}
2016-05-21T16:19:15.451+0300 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2016-05-21T16:19:15.451+0300 I CONTROL [initandlisten] dbexit: rc: 100
I try start mongod service on console:
# service mongod start
Failed to start mongod.service: Unit mongod.service not found.
What I need to do?
My English is not so much good, please answer this question with a simple English.
16.04 mongodb
When I try to start MongoDB, I get this error:
# mongo
MongoDB shell version: 3.2.6
connecting to: test
2016-05-21T16:14:31.183+0300 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-05-21T16:14:31.183+0300 E QUERY [thread1] Error: couldn't connect $ to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
After that I do some research and learned that I firstly need to start MongoDB server with mongod
command. But when I try that, I get an error again:
try that, i get an error again:
# mongod
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] MongoDB starting : pid=32019 port=27017 dbpath=/data/db 64-bit host=ibrahim-Inspiron-3542
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] db version v3.2.6
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g-fips 1 Mar 2016
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] allocator: tcmalloc
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] modules: none
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] build environment:
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distmod: ubuntu1404
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] distarch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] target_arch: x86_64
2016-05-21T16:19:15.410+0300 I CONTROL [initandlisten] options: {}
2016-05-21T16:19:15.451+0300 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2016-05-21T16:19:15.451+0300 I CONTROL [initandlisten] dbexit: rc: 100
I try start mongod service on console:
# service mongod start
Failed to start mongod.service: Unit mongod.service not found.
What I need to do?
My English is not so much good, please answer this question with a simple English.
16.04 mongodb
16.04 mongodb
edited May 21 '16 at 16:19
muru
1
1
asked May 21 '16 at 13:31
A. IteA. Ite
38125
38125
will someone help me?
– A. Ite
May 21 '16 at 14:11
have a look at this question: stackoverflow.com/questions/37096517/…
– DJCrashdummy
Jun 2 '16 at 12:39
askubuntu.com/questions/921753/…
– Siddharth Jain
Sep 27 '18 at 11:05
add a comment |
will someone help me?
– A. Ite
May 21 '16 at 14:11
have a look at this question: stackoverflow.com/questions/37096517/…
– DJCrashdummy
Jun 2 '16 at 12:39
askubuntu.com/questions/921753/…
– Siddharth Jain
Sep 27 '18 at 11:05
will someone help me?
– A. Ite
May 21 '16 at 14:11
will someone help me?
– A. Ite
May 21 '16 at 14:11
have a look at this question: stackoverflow.com/questions/37096517/…
– DJCrashdummy
Jun 2 '16 at 12:39
have a look at this question: stackoverflow.com/questions/37096517/…
– DJCrashdummy
Jun 2 '16 at 12:39
askubuntu.com/questions/921753/…
– Siddharth Jain
Sep 27 '18 at 11:05
askubuntu.com/questions/921753/…
– Siddharth Jain
Sep 27 '18 at 11:05
add a comment |
1 Answer
1
active
oldest
votes
The next step for this is to make sure you have a unit file for the service.
Run this command:
ls /lib/systemd/system
If you see mongod.service, you should be good to go. If you need to know what that file should look like, take a look at this guide.
In theory, that should be the last thing you need to do to get it working.
Basically, this is just a file to tell the system how to put the service into various states, and the little house-cleaning tasks that need to be carried out.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f775570%2fmongodb-unit-mongod-service-cant-found-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The next step for this is to make sure you have a unit file for the service.
Run this command:
ls /lib/systemd/system
If you see mongod.service, you should be good to go. If you need to know what that file should look like, take a look at this guide.
In theory, that should be the last thing you need to do to get it working.
Basically, this is just a file to tell the system how to put the service into various states, and the little house-cleaning tasks that need to be carried out.
add a comment |
The next step for this is to make sure you have a unit file for the service.
Run this command:
ls /lib/systemd/system
If you see mongod.service, you should be good to go. If you need to know what that file should look like, take a look at this guide.
In theory, that should be the last thing you need to do to get it working.
Basically, this is just a file to tell the system how to put the service into various states, and the little house-cleaning tasks that need to be carried out.
add a comment |
The next step for this is to make sure you have a unit file for the service.
Run this command:
ls /lib/systemd/system
If you see mongod.service, you should be good to go. If you need to know what that file should look like, take a look at this guide.
In theory, that should be the last thing you need to do to get it working.
Basically, this is just a file to tell the system how to put the service into various states, and the little house-cleaning tasks that need to be carried out.
The next step for this is to make sure you have a unit file for the service.
Run this command:
ls /lib/systemd/system
If you see mongod.service, you should be good to go. If you need to know what that file should look like, take a look at this guide.
In theory, that should be the last thing you need to do to get it working.
Basically, this is just a file to tell the system how to put the service into various states, and the little house-cleaning tasks that need to be carried out.
answered Nov 14 '16 at 11:10
James BiederbeckJames Biederbeck
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f775570%2fmongodb-unit-mongod-service-cant-found-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
will someone help me?
– A. Ite
May 21 '16 at 14:11
have a look at this question: stackoverflow.com/questions/37096517/…
– DJCrashdummy
Jun 2 '16 at 12:39
askubuntu.com/questions/921753/…
– Siddharth Jain
Sep 27 '18 at 11:05