ECS app service doesn't seem to be able to connect to mongo service












0















I've got two services an app service and a mongodb service both on different task definitions. I want the app to be able to connect mongodb however it doesn't seem to be able to fine it.



When creating the mongodb service I've defined a service discovery name and I thought I could use this domain endpoint in the connection string in the app in order to connect to it.



I'm unsure what I'm doing wrong, any advice would be greatly appreciated!










share|improve this question























  • Can you elaborate on "service discovery name"? If you have "two different task definitions", then you need to assume, that each one can be deployed on a different node/cluster (i.e. connecting to mongodb for example won't work; i.e. "linking" can be done within the same task definition only). Apart from that, I'd check security group settings as the most likely candidate for connectivity issues.

    – Szymon Biliński
    Jan 2 at 10:36











  • Sure @SzymonBiliński what I mean it when I completed the setup for the service which runs the mongodb task definition I gave a service name of mongodb.local which has been created in route53 now I was thinking because its in the same vpc I could talk to the service by just having the hostname in the connection string as the declared service name, mongodb://mongodb.local:27017/database.

    – Jake Lacey
    Jan 2 at 17:38











  • Decided to go with the easier solution of having a database managed on RDS.

    – Jake Lacey
    Jan 7 at 14:40
















0















I've got two services an app service and a mongodb service both on different task definitions. I want the app to be able to connect mongodb however it doesn't seem to be able to fine it.



When creating the mongodb service I've defined a service discovery name and I thought I could use this domain endpoint in the connection string in the app in order to connect to it.



I'm unsure what I'm doing wrong, any advice would be greatly appreciated!










share|improve this question























  • Can you elaborate on "service discovery name"? If you have "two different task definitions", then you need to assume, that each one can be deployed on a different node/cluster (i.e. connecting to mongodb for example won't work; i.e. "linking" can be done within the same task definition only). Apart from that, I'd check security group settings as the most likely candidate for connectivity issues.

    – Szymon Biliński
    Jan 2 at 10:36











  • Sure @SzymonBiliński what I mean it when I completed the setup for the service which runs the mongodb task definition I gave a service name of mongodb.local which has been created in route53 now I was thinking because its in the same vpc I could talk to the service by just having the hostname in the connection string as the declared service name, mongodb://mongodb.local:27017/database.

    – Jake Lacey
    Jan 2 at 17:38











  • Decided to go with the easier solution of having a database managed on RDS.

    – Jake Lacey
    Jan 7 at 14:40














0












0








0








I've got two services an app service and a mongodb service both on different task definitions. I want the app to be able to connect mongodb however it doesn't seem to be able to fine it.



When creating the mongodb service I've defined a service discovery name and I thought I could use this domain endpoint in the connection string in the app in order to connect to it.



I'm unsure what I'm doing wrong, any advice would be greatly appreciated!










share|improve this question














I've got two services an app service and a mongodb service both on different task definitions. I want the app to be able to connect mongodb however it doesn't seem to be able to fine it.



When creating the mongodb service I've defined a service discovery name and I thought I could use this domain endpoint in the connection string in the app in order to connect to it.



I'm unsure what I'm doing wrong, any advice would be greatly appreciated!







amazon-web-services amazon-ecs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 22:38









Jake LaceyJake Lacey

195115




195115













  • Can you elaborate on "service discovery name"? If you have "two different task definitions", then you need to assume, that each one can be deployed on a different node/cluster (i.e. connecting to mongodb for example won't work; i.e. "linking" can be done within the same task definition only). Apart from that, I'd check security group settings as the most likely candidate for connectivity issues.

    – Szymon Biliński
    Jan 2 at 10:36











  • Sure @SzymonBiliński what I mean it when I completed the setup for the service which runs the mongodb task definition I gave a service name of mongodb.local which has been created in route53 now I was thinking because its in the same vpc I could talk to the service by just having the hostname in the connection string as the declared service name, mongodb://mongodb.local:27017/database.

    – Jake Lacey
    Jan 2 at 17:38











  • Decided to go with the easier solution of having a database managed on RDS.

    – Jake Lacey
    Jan 7 at 14:40



















  • Can you elaborate on "service discovery name"? If you have "two different task definitions", then you need to assume, that each one can be deployed on a different node/cluster (i.e. connecting to mongodb for example won't work; i.e. "linking" can be done within the same task definition only). Apart from that, I'd check security group settings as the most likely candidate for connectivity issues.

    – Szymon Biliński
    Jan 2 at 10:36











  • Sure @SzymonBiliński what I mean it when I completed the setup for the service which runs the mongodb task definition I gave a service name of mongodb.local which has been created in route53 now I was thinking because its in the same vpc I could talk to the service by just having the hostname in the connection string as the declared service name, mongodb://mongodb.local:27017/database.

    – Jake Lacey
    Jan 2 at 17:38











  • Decided to go with the easier solution of having a database managed on RDS.

    – Jake Lacey
    Jan 7 at 14:40

















Can you elaborate on "service discovery name"? If you have "two different task definitions", then you need to assume, that each one can be deployed on a different node/cluster (i.e. connecting to mongodb for example won't work; i.e. "linking" can be done within the same task definition only). Apart from that, I'd check security group settings as the most likely candidate for connectivity issues.

– Szymon Biliński
Jan 2 at 10:36





Can you elaborate on "service discovery name"? If you have "two different task definitions", then you need to assume, that each one can be deployed on a different node/cluster (i.e. connecting to mongodb for example won't work; i.e. "linking" can be done within the same task definition only). Apart from that, I'd check security group settings as the most likely candidate for connectivity issues.

– Szymon Biliński
Jan 2 at 10:36













Sure @SzymonBiliński what I mean it when I completed the setup for the service which runs the mongodb task definition I gave a service name of mongodb.local which has been created in route53 now I was thinking because its in the same vpc I could talk to the service by just having the hostname in the connection string as the declared service name, mongodb://mongodb.local:27017/database.

– Jake Lacey
Jan 2 at 17:38





Sure @SzymonBiliński what I mean it when I completed the setup for the service which runs the mongodb task definition I gave a service name of mongodb.local which has been created in route53 now I was thinking because its in the same vpc I could talk to the service by just having the hostname in the connection string as the declared service name, mongodb://mongodb.local:27017/database.

– Jake Lacey
Jan 2 at 17:38













Decided to go with the easier solution of having a database managed on RDS.

– Jake Lacey
Jan 7 at 14:40





Decided to go with the easier solution of having a database managed on RDS.

– Jake Lacey
Jan 7 at 14:40












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53999494%2fecs-app-service-doesnt-seem-to-be-able-to-connect-to-mongo-service%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53999494%2fecs-app-service-doesnt-seem-to-be-able-to-connect-to-mongo-service%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

'app-layout' is not a known element: how to share Component with different Modules

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement