Dynamic port mapping makes my task unavailable





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have basic ecs configuration with cluster EC2 Linux + Networking with 1 EC2 Instance.



Also i have simple docker image https://github.com/mattes/rotating-proxy .



This image organize http tor proxy.



I want to configure dynamic port mapping to allow service scale tasks on one EC2 instance. But when i configure dynamic port mapping and try to run task (not even service, only task) instance doesn't respond.
I already tried to create service with application load balancer but this didn't help. So i'm sure the problem is related to task configuration.



But when i deploy task to cluster it writes "RUNNING" in it's status.



Here's task's definition JSON.



{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
"hostPort": 0,
"protocol": "tcp",
"containerPort": 5566
}
],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "tors",
"value": "5"
}
],
"ulimits": null,
"dnsServers": null,
"mountPoints": ,
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": 200,
"memoryReservation": null,
"volumesFrom": ,
"image": "305605212.dkr.ecr.us-east-2.amazonaws.com/rotating-proxy",
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "container"
}
],
"placementConstraints": ,
"memory": null,
"taskRoleArn": null,
"compatibilities": [
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:us-east-2:3056095212:task-definition/test-task:4",
"family": "test-task",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth"
}
],
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": null,
"cpu": null,
"revision": 4,
"status": "ACTIVE",
"volumes":
}









share|improve this question




















  • 1





    Can you post the ecs-logs errors or event logs in case of service ?

    – Mohit Kumar
    Nov 24 '18 at 9:18











  • There is nothing about it. 'service registered 1 targets in target-group' service has started 1 tasks'.

    – Vitali Skripka
    Nov 26 '18 at 14:01











  • from load balancer i get '504 Gateway Time-out'

    – Vitali Skripka
    Nov 26 '18 at 14:02


















0















I have basic ecs configuration with cluster EC2 Linux + Networking with 1 EC2 Instance.



Also i have simple docker image https://github.com/mattes/rotating-proxy .



This image organize http tor proxy.



I want to configure dynamic port mapping to allow service scale tasks on one EC2 instance. But when i configure dynamic port mapping and try to run task (not even service, only task) instance doesn't respond.
I already tried to create service with application load balancer but this didn't help. So i'm sure the problem is related to task configuration.



But when i deploy task to cluster it writes "RUNNING" in it's status.



Here's task's definition JSON.



{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
"hostPort": 0,
"protocol": "tcp",
"containerPort": 5566
}
],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "tors",
"value": "5"
}
],
"ulimits": null,
"dnsServers": null,
"mountPoints": ,
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": 200,
"memoryReservation": null,
"volumesFrom": ,
"image": "305605212.dkr.ecr.us-east-2.amazonaws.com/rotating-proxy",
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "container"
}
],
"placementConstraints": ,
"memory": null,
"taskRoleArn": null,
"compatibilities": [
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:us-east-2:3056095212:task-definition/test-task:4",
"family": "test-task",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth"
}
],
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": null,
"cpu": null,
"revision": 4,
"status": "ACTIVE",
"volumes":
}









share|improve this question




















  • 1





    Can you post the ecs-logs errors or event logs in case of service ?

    – Mohit Kumar
    Nov 24 '18 at 9:18











  • There is nothing about it. 'service registered 1 targets in target-group' service has started 1 tasks'.

    – Vitali Skripka
    Nov 26 '18 at 14:01











  • from load balancer i get '504 Gateway Time-out'

    – Vitali Skripka
    Nov 26 '18 at 14:02














0












0








0








I have basic ecs configuration with cluster EC2 Linux + Networking with 1 EC2 Instance.



Also i have simple docker image https://github.com/mattes/rotating-proxy .



This image organize http tor proxy.



I want to configure dynamic port mapping to allow service scale tasks on one EC2 instance. But when i configure dynamic port mapping and try to run task (not even service, only task) instance doesn't respond.
I already tried to create service with application load balancer but this didn't help. So i'm sure the problem is related to task configuration.



But when i deploy task to cluster it writes "RUNNING" in it's status.



Here's task's definition JSON.



{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
"hostPort": 0,
"protocol": "tcp",
"containerPort": 5566
}
],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "tors",
"value": "5"
}
],
"ulimits": null,
"dnsServers": null,
"mountPoints": ,
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": 200,
"memoryReservation": null,
"volumesFrom": ,
"image": "305605212.dkr.ecr.us-east-2.amazonaws.com/rotating-proxy",
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "container"
}
],
"placementConstraints": ,
"memory": null,
"taskRoleArn": null,
"compatibilities": [
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:us-east-2:3056095212:task-definition/test-task:4",
"family": "test-task",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth"
}
],
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": null,
"cpu": null,
"revision": 4,
"status": "ACTIVE",
"volumes":
}









share|improve this question
















I have basic ecs configuration with cluster EC2 Linux + Networking with 1 EC2 Instance.



Also i have simple docker image https://github.com/mattes/rotating-proxy .



This image organize http tor proxy.



I want to configure dynamic port mapping to allow service scale tasks on one EC2 instance. But when i configure dynamic port mapping and try to run task (not even service, only task) instance doesn't respond.
I already tried to create service with application load balancer but this didn't help. So i'm sure the problem is related to task configuration.



But when i deploy task to cluster it writes "RUNNING" in it's status.



Here's task's definition JSON.



{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
"hostPort": 0,
"protocol": "tcp",
"containerPort": 5566
}
],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "tors",
"value": "5"
}
],
"ulimits": null,
"dnsServers": null,
"mountPoints": ,
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": 200,
"memoryReservation": null,
"volumesFrom": ,
"image": "305605212.dkr.ecr.us-east-2.amazonaws.com/rotating-proxy",
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "container"
}
],
"placementConstraints": ,
"memory": null,
"taskRoleArn": null,
"compatibilities": [
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:us-east-2:3056095212:task-definition/test-task:4",
"family": "test-task",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.ecr-auth"
}
],
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": null,
"cpu": null,
"revision": 4,
"status": "ACTIVE",
"volumes":
}






amazon-web-services amazon-ec2 amazon-ecs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 21:34









John Rotenstein

78.4k789139




78.4k789139










asked Nov 23 '18 at 16:03









Vitali SkripkaVitali Skripka

487




487








  • 1





    Can you post the ecs-logs errors or event logs in case of service ?

    – Mohit Kumar
    Nov 24 '18 at 9:18











  • There is nothing about it. 'service registered 1 targets in target-group' service has started 1 tasks'.

    – Vitali Skripka
    Nov 26 '18 at 14:01











  • from load balancer i get '504 Gateway Time-out'

    – Vitali Skripka
    Nov 26 '18 at 14:02














  • 1





    Can you post the ecs-logs errors or event logs in case of service ?

    – Mohit Kumar
    Nov 24 '18 at 9:18











  • There is nothing about it. 'service registered 1 targets in target-group' service has started 1 tasks'.

    – Vitali Skripka
    Nov 26 '18 at 14:01











  • from load balancer i get '504 Gateway Time-out'

    – Vitali Skripka
    Nov 26 '18 at 14:02








1




1





Can you post the ecs-logs errors or event logs in case of service ?

– Mohit Kumar
Nov 24 '18 at 9:18





Can you post the ecs-logs errors or event logs in case of service ?

– Mohit Kumar
Nov 24 '18 at 9:18













There is nothing about it. 'service registered 1 targets in target-group' service has started 1 tasks'.

– Vitali Skripka
Nov 26 '18 at 14:01





There is nothing about it. 'service registered 1 targets in target-group' service has started 1 tasks'.

– Vitali Skripka
Nov 26 '18 at 14:01













from load balancer i get '504 Gateway Time-out'

– Vitali Skripka
Nov 26 '18 at 14:02





from load balancer i get '504 Gateway Time-out'

– Vitali Skripka
Nov 26 '18 at 14:02












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%2f53449795%2fdynamic-port-mapping-makes-my-task-unavailable%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%2f53449795%2fdynamic-port-mapping-makes-my-task-unavailable%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







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini