Re: marathon issue in running a docker container.

2016-04-13 Thread nirmalendu swain
Thanks Haosdent for identifying the issue. If I remove the port from 
configuration, then instances are correctly spinning up.Thanks a ton for timely 
help.
Best Regards,Nirmal

On Tuesday, 12 April 2016 11:01 PM, haosdent  wrote:
 

 >Server running at: http://0.0.0.0:7683
And according to your log, your service is running on 7683 while your 
configuration use 8080 in portMapping.
On Wed, Apr 13, 2016 at 1:25 AM, haosdent  wrote:

>If I do telnet or curl, it does not show me any reponse.Looks wired here, 
>could you find the status of task is running or other status in mesos webui or 
>marathon webui?
And is it possible for you to use `docker ps` to find out the container and use 
`docker exec` to enter container and check whether service is running?
On Tue, Apr 12, 2016 at 7:13 PM, nirmalendu swain  
wrote:

I might be wrong here. But I am using marathon-lb package of DCOS which already 
has haproxy.
 

On Tuesday, 12 April 2016 2:14 PM, Rad Gruchalski  
wrote:
 

  Do you have anything like haproxy for port mappings installed on your Mesos 
cluster? When using BRIDGE network, your process inside of the container, say 
SSH, is running on a standard port 22. Marathon allocates a random port in the 
default range of 31000 to 32000. However, it is your task to map the 
:31xxx to :22.
The simplest is to use 
this:https://github.com/mesosphere/marathon/blob/master/examples/haproxy-marathon-bridge
The haproxy-marathon-bridge needs to run as a cron job on every agent. Because 
it runs as a cron job every minute, your ports become accessible after up to 
one minute from going into RUNNING state.
There are obviously moe advanced ways of getting this done - 
haproxy-marathon-bridge is the simplest one.Best regards,

RadekGruchalski

ra...@gruchalski.com

de.linkedin.com/in/radgruchalski/

Confidentiality:
Thiscommunication is intended for the above-named person and may beconfidential 
and/or legally privileged.
If it has come to you inerror you must take no action based on it, nor must you 
copy or showit to anyone; please delete/destroy and inform the 
senderimmediately. On Tuesday, 12 April 2016 at 10:19, nirmalendu swain wrote: 
 From the stderr log, nothing can be figure out. From stout log, it says server 
running at host:port. But If I do telnet or curl, it does not show me any 
reponse.output of stderr log :
I0412 08:16:12.842341  9909 exec.cpp:134] Version: 0.27.1I0412 08:16:12.844701  
9934 exec.cpp:208] Executor registered on slave 
87849fd2-fda9-4d6a-870f-de101a5bdc59-S3js-bson: Failed to load c++ bson 
extension, using pure JS version 

On Tuesday, 12 April 2016 1:39 PM, Abhishek Amralkar 
 wrote:
 

 anything is sandbox logs, why the tasks are getting killed? `stderr` and 
`stdout`?

On 12-Apr-2016, at 1:35 PM, haosdent  wrote:
>Its frequently changing the deployment status to Staged
Do you find any related log in mesos when marathon lauch the task?
On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain  
wrote:

Changing the network type to HOST does not work. Its frequently changing the 
deployment status to Staged and then to no task.

On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:


How about change the network type from BRIDGE to HOST?
On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain  
wrote:

Hi Mesos user,I am running mesos marathon using dcos for spinning up AWS 
instances. I have successfully built the mongodb as a docker container, but 
when I try to deploy my dockerized app, it does n't deploy. My App is dependent 
upon mongo which is passed as environment variable in the json file to be run 
by dcos command. If a i do a telnet/curl, it does n't receive at the desired 
host:port. from the mesos logs, it does not seem to throw any error/exception. 
Doing a copy-past of my backend-app.json file which falis to deploy.

{    "id": "/todo-with-backend",    "instances": 2,    "container": {        
"type": "DOCKER",        "docker": {            "image": "tldr/todo-backend",   
         "network": "BRIDGE",            "portMappings": [                {     
               "containerPort": 8080,                    "hostPort": 0,         
           "protocol": "tcp"                }            ]        }    
},"env":{       "MONGO_URL":"10.0.2.252:5530" },    "healthChecks": [{        
"protocol": "HTTP",        "portIndex": 0    }],    "labels":{        
"HAPROXY_GROUP":"external",        ""    },    "cpus": 0.25,    "mem": 256.0}
I have gone inside the host and checked that env value is reflecting 
correctly.Please help me out in analyzing the issue.
Regards,Nirmal





-- 
Best Regards,
Haosdent Huang





-- 
Best Regards,
Haosdent Huang




  
 

   



-- 
Best Regards,
Haosdent Huang



-- 
Best Regards,
Haosdent Huang

  

Re: marathon issue in running a docker container.

2016-04-12 Thread haosdent
>Server running at: http://0.0.0.0:7683
And according to your log, your service is running on 7683 while your
configuration use 8080 in portMapping.

On Wed, Apr 13, 2016 at 1:25 AM, haosdent  wrote:

> >If I do telnet or curl, it does not show me any reponse.
> Looks wired here, could you find the status of task is running or other
> status in mesos webui or marathon webui?
>
> And is it possible for you to use `docker ps` to find out the container
> and use `docker exec` to enter container and check whether service is
> running?
>
> On Tue, Apr 12, 2016 at 7:13 PM, nirmalendu swain <
> nirmalendu_sw...@yahoo.com> wrote:
>
>> I might be wrong here. But I am using marathon-lb package of DCOS which
>> already has haproxy.
>>
>>
>>
>> On Tuesday, 12 April 2016 2:14 PM, Rad Gruchalski 
>> wrote:
>>
>>
>> Do you have anything like haproxy for port mappings installed on your
>> Mesos cluster?
>> When using BRIDGE network, your process inside of the container, say SSH,
>> is running on a standard port 22. Marathon allocates a random port in the
>> default range of 31000 to 32000. However, it is your task to map the
>> :31xxx to :22.
>>
>> The simplest is to use this:
>>
>> https://github.com/mesosphere/marathon/blob/master/examples/haproxy-marathon-bridge
>>
>> The haproxy-marathon-bridge needs to run as a cron job on every agent.
>> Because it runs as a cron job every minute, your ports become accessible
>> after up to one minute from going into RUNNING state.
>>
>> There are obviously moe advanced ways of getting this done -
>> haproxy-marathon-bridge is the simplest one.
>> Best regards,
>> Radek Gruchalski
>> ra...@gruchalski.com 
>> de.linkedin.com/in/radgruchalski/
>>
>>
>> *Confidentiality:*This communication is intended for the above-named
>> person and may be confidential and/or legally privileged.
>> If it has come to you in error you must take no action based on it, nor
>> must you copy or show it to anyone; please delete/destroy and inform the
>> sender immediately.
>> On Tuesday, 12 April 2016 at 10:19, nirmalendu swain wrote:
>>
>> From the stderr log, nothing can be figure out. From stout log, it says
>> server running at host:port. But If I do telnet or curl, it does not show
>> me any reponse.
>> output of stderr log :
>>
>> *I0412 08:16:12.842341  9909 exec.cpp:134] Version: 0.27.1*
>> *I0412 08:16:12.844701  9934 exec.cpp:208] Executor registered on slave
>> 87849fd2-fda9-4d6a-870f-de101a5bdc59-S3*
>> *js-bson: Failed to load c++ bson extension, using pure JS version*
>>
>>
>> On Tuesday, 12 April 2016 1:39 PM, Abhishek Amralkar <
>> abhishek.amral...@talentica.com> wrote:
>>
>>
>> anything is sandbox logs, why the tasks are getting killed? `stderr` and
>> `stdout`?
>>
>> On 12-Apr-2016, at 1:35 PM, haosdent  wrote:
>>
>> >Its frequently changing the deployment status to Staged
>>
>> Do you find any related log in mesos when marathon lauch the task?
>>
>> On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain <
>> nirmalendu_sw...@yahoo.com> wrote:
>>
>> Changing the network type to HOST does not work. Its frequently changing
>> the deployment status to Staged and then to no task.
>>
>>
>> On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:
>>
>>
>> How about change the network type from BRIDGE to HOST?
>>
>> On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain <
>> nirmalendu_sw...@yahoo.com> wrote:
>>
>> Hi Mesos user,
>> I am running mesos marathon using dcos for spinning up AWS instances.
>> I have successfully built the mongodb as a docker container, but when I
>> try to deploy my dockerized app, it does n't deploy. My App is dependent
>> upon mongo which is passed as environment variable in the json file to be
>> run by dcos command. If a i do a telnet/curl, it does n't receive at the
>> desired host:port. from the mesos logs, it does not seem to throw any
>> error/exception. Doing a copy-past of my backend-app.json file which falis
>> to deploy.
>>
>>
>> *{*
>> *"id": "/todo-with-backend",*
>> *"instances": 2,*
>> *"container": {*
>> *"type": "DOCKER",*
>> *"docker": {*
>> *"image": "tldr/todo-backend",*
>> *"network": "BRIDGE",*
>> *"portMappings": [*
>> *{*
>> *"containerPort": 8080,*
>> *"hostPort": 0,*
>> *"protocol": "tcp"*
>> *}*
>> *]*
>> *}*
>> *},*
>> *"env":{*
>> *   "MONGO_URL":"10.0.2.252:5530 "*
>> * },*
>> *"healthChecks": [{*
>> *"protocol": "HTTP",*
>> *"portIndex": 0*
>> *}],*
>> *"labels":{*
>> *"HAPROXY_GROUP":"external",*
>> *""*
>> *},*
>> *"cpus": 0.25,*
>> *"mem": 256.0*
>> *}*
>>
>> I have gone inside the host and checked that env value is reflecting
>> correctly.
>> Please help me out in analyzing the 

Re: marathon issue in running a docker container.

2016-04-12 Thread haosdent
>If I do telnet or curl, it does not show me any reponse.
Looks wired here, could you find the status of task is running or other
status in mesos webui or marathon webui?

And is it possible for you to use `docker ps` to find out the container and
use `docker exec` to enter container and check whether service is running?

On Tue, Apr 12, 2016 at 7:13 PM, nirmalendu swain <
nirmalendu_sw...@yahoo.com> wrote:

> I might be wrong here. But I am using marathon-lb package of DCOS which
> already has haproxy.
>
>
>
> On Tuesday, 12 April 2016 2:14 PM, Rad Gruchalski 
> wrote:
>
>
> Do you have anything like haproxy for port mappings installed on your
> Mesos cluster?
> When using BRIDGE network, your process inside of the container, say SSH,
> is running on a standard port 22. Marathon allocates a random port in the
> default range of 31000 to 32000. However, it is your task to map the
> :31xxx to :22.
>
> The simplest is to use this:
>
> https://github.com/mesosphere/marathon/blob/master/examples/haproxy-marathon-bridge
>
> The haproxy-marathon-bridge needs to run as a cron job on every agent.
> Because it runs as a cron job every minute, your ports become accessible
> after up to one minute from going into RUNNING state.
>
> There are obviously moe advanced ways of getting this done -
> haproxy-marathon-bridge is the simplest one.
> Best regards,
> Radek Gruchalski
> ra...@gruchalski.com 
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
> On Tuesday, 12 April 2016 at 10:19, nirmalendu swain wrote:
>
> From the stderr log, nothing can be figure out. From stout log, it says
> server running at host:port. But If I do telnet or curl, it does not show
> me any reponse.
> output of stderr log :
>
> *I0412 08:16:12.842341  9909 exec.cpp:134] Version: 0.27.1*
> *I0412 08:16:12.844701  9934 exec.cpp:208] Executor registered on slave
> 87849fd2-fda9-4d6a-870f-de101a5bdc59-S3*
> *js-bson: Failed to load c++ bson extension, using pure JS version*
>
>
> On Tuesday, 12 April 2016 1:39 PM, Abhishek Amralkar <
> abhishek.amral...@talentica.com> wrote:
>
>
> anything is sandbox logs, why the tasks are getting killed? `stderr` and
> `stdout`?
>
> On 12-Apr-2016, at 1:35 PM, haosdent  wrote:
>
> >Its frequently changing the deployment status to Staged
>
> Do you find any related log in mesos when marathon lauch the task?
>
> On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain <
> nirmalendu_sw...@yahoo.com> wrote:
>
> Changing the network type to HOST does not work. Its frequently changing
> the deployment status to Staged and then to no task.
>
>
> On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:
>
>
> How about change the network type from BRIDGE to HOST?
>
> On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain <
> nirmalendu_sw...@yahoo.com> wrote:
>
> Hi Mesos user,
> I am running mesos marathon using dcos for spinning up AWS instances.
> I have successfully built the mongodb as a docker container, but when I
> try to deploy my dockerized app, it does n't deploy. My App is dependent
> upon mongo which is passed as environment variable in the json file to be
> run by dcos command. If a i do a telnet/curl, it does n't receive at the
> desired host:port. from the mesos logs, it does not seem to throw any
> error/exception. Doing a copy-past of my backend-app.json file which falis
> to deploy.
>
>
> *{*
> *"id": "/todo-with-backend",*
> *"instances": 2,*
> *"container": {*
> *"type": "DOCKER",*
> *"docker": {*
> *"image": "tldr/todo-backend",*
> *"network": "BRIDGE",*
> *"portMappings": [*
> *{*
> *"containerPort": 8080,*
> *"hostPort": 0,*
> *"protocol": "tcp"*
> *}*
> *]*
> *}*
> *},*
> *"env":{*
> *   "MONGO_URL":"10.0.2.252:5530 "*
> * },*
> *"healthChecks": [{*
> *"protocol": "HTTP",*
> *"portIndex": 0*
> *}],*
> *"labels":{*
> *"HAPROXY_GROUP":"external",*
> *""*
> *},*
> *"cpus": 0.25,*
> *"mem": 256.0*
> *}*
>
> I have gone inside the host and checked that env value is reflecting
> correctly.
> Please help me out in analyzing the issue.
>
> Regards,
> Nirmal
>
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>
>
>
>
>
>


-- 
Best Regards,
Haosdent Huang


Re: marathon issue in running a docker container.

2016-04-12 Thread nirmalendu swain
I might be wrong here. But I am using marathon-lb package of DCOS which already 
has haproxy.
 

On Tuesday, 12 April 2016 2:14 PM, Rad Gruchalski  
wrote:
 

  Do you have anything like haproxy for port mappings installed on your Mesos 
cluster? When using BRIDGE network, your process inside of the container, say 
SSH, is running on a standard port 22. Marathon allocates a random port in the 
default range of 31000 to 32000. However, it is your task to map the 
:31xxx to :22.
The simplest is to use 
this:https://github.com/mesosphere/marathon/blob/master/examples/haproxy-marathon-bridge
The haproxy-marathon-bridge needs to run as a cron job on every agent. Because 
it runs as a cron job every minute, your ports become accessible after up to 
one minute from going into RUNNING state.
There are obviously moe advanced ways of getting this done - 
haproxy-marathon-bridge is the simplest one.Best regards,

RadekGruchalski

ra...@gruchalski.com

de.linkedin.com/in/radgruchalski/

Confidentiality:
Thiscommunication is intended for the above-named person and may beconfidential 
and/or legally privileged.
If it has come to you inerror you must take no action based on it, nor must you 
copy or showit to anyone; please delete/destroy and inform the 
senderimmediately. On Tuesday, 12 April 2016 at 10:19, nirmalendu swain wrote: 
 From the stderr log, nothing can be figure out. From stout log, it says server 
running at host:port. But If I do telnet or curl, it does not show me any 
reponse.output of stderr log :
I0412 08:16:12.842341  9909 exec.cpp:134] Version: 0.27.1I0412 08:16:12.844701  
9934 exec.cpp:208] Executor registered on slave 
87849fd2-fda9-4d6a-870f-de101a5bdc59-S3js-bson: Failed to load c++ bson 
extension, using pure JS version 

On Tuesday, 12 April 2016 1:39 PM, Abhishek Amralkar 
 wrote:
 

 anything is sandbox logs, why the tasks are getting killed? `stderr` and 
`stdout`?

On 12-Apr-2016, at 1:35 PM, haosdent  wrote:
>Its frequently changing the deployment status to Staged
Do you find any related log in mesos when marathon lauch the task?
On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain  
wrote:

Changing the network type to HOST does not work. Its frequently changing the 
deployment status to Staged and then to no task.

On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:


How about change the network type from BRIDGE to HOST?
On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain  
wrote:

Hi Mesos user,I am running mesos marathon using dcos for spinning up AWS 
instances. I have successfully built the mongodb as a docker container, but 
when I try to deploy my dockerized app, it does n't deploy. My App is dependent 
upon mongo which is passed as environment variable in the json file to be run 
by dcos command. If a i do a telnet/curl, it does n't receive at the desired 
host:port. from the mesos logs, it does not seem to throw any error/exception. 
Doing a copy-past of my backend-app.json file which falis to deploy.

{    "id": "/todo-with-backend",    "instances": 2,    "container": {        
"type": "DOCKER",        "docker": {            "image": "tldr/todo-backend",   
         "network": "BRIDGE",            "portMappings": [                {     
               "containerPort": 8080,                    "hostPort": 0,         
           "protocol": "tcp"                }            ]        }    
},"env":{       "MONGO_URL":"10.0.2.252:5530" },    "healthChecks": [{        
"protocol": "HTTP",        "portIndex": 0    }],    "labels":{        
"HAPROXY_GROUP":"external",        ""    },    "cpus": 0.25,    "mem": 256.0}
I have gone inside the host and checked that env value is reflecting 
correctly.Please help me out in analyzing the issue.
Regards,Nirmal





-- 
Best Regards,
Haosdent Huang





-- 
Best Regards,
Haosdent Huang




  
 

  

Re: marathon issue in running a docker container.

2016-04-12 Thread Rad Gruchalski
Do you have anything like haproxy for port mappings installed on your Mesos 
cluster?  
When using BRIDGE network, your process inside of the container, say SSH, is 
running on a standard port 22. Marathon allocates a random port in the default 
range of 31000 to 32000. However, it is your task to map the :31xxx to 
:22.

The simplest is to use this:
https://github.com/mesosphere/marathon/blob/master/examples/haproxy-marathon-bridge

The haproxy-marathon-bridge needs to run as a cron job on every agent. Because 
it runs as a cron job every minute, your ports become accessible after up to 
one minute from going into RUNNING state.

There are obviously moe advanced ways of getting this done - 
haproxy-marathon-bridge is the simplest one.










Best regards,

Radek Gruchalski

ra...@gruchalski.com (mailto:ra...@gruchalski.com)
 
(mailto:ra...@gruchalski.com)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)

Confidentiality:
This communication is intended for the above-named person and may be 
confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must 
you copy or show it to anyone; please delete/destroy and inform the sender 
immediately.



On Tuesday, 12 April 2016 at 10:19, nirmalendu swain wrote:

> From the stderr log, nothing can be figure out. From stout log, it says 
> server running at host:port. But If I do telnet or curl, it does not show me 
> any reponse.
> output of stderr log :
>  
> I0412 08:16:12.842341  9909 exec.cpp:134] Version: 0.27.1
> I0412 08:16:12.844701  9934 exec.cpp:208] Executor registered on slave 
> 87849fd2-fda9-4d6a-870f-de101a5bdc59-S3
> js-bson: Failed to load c++ bson extension, using pure JS version
>  
>  
> On Tuesday, 12 April 2016 1:39 PM, Abhishek Amralkar 
>  
> wrote:
>  
>  
> anything is sandbox logs, why the tasks are getting killed? `stderr` and 
> `stdout`?
> > On 12-Apr-2016, at 1:35 PM, haosdent  > (mailto:haosd...@gmail.com)> wrote:  
> > >Its frequently changing the deployment status to Staged  
> >  
> > Do you find any related log in mesos when marathon lauch the task?  
> >  
> > On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain 
> >  wrote:
> > > Changing the network type to HOST does not work. Its frequently changing 
> > > the deployment status to Staged and then to no task.  
> > >  
> > >  
> > > On Tuesday, 12 April 2016 11:49 AM, haosdent  > > (mailto:haosd...@gmail.com)> wrote:
> > >  
> > >  
> > > How about change the network type from BRIDGE to HOST?  
> > >  
> > > On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain 
> > >  wrote:
> > > > Hi Mesos user,  
> > > > I am running mesos marathon using dcos for spinning up AWS instances.  
> > > > I have successfully built the mongodb as a docker container, but when I 
> > > > try to deploy my dockerized app, it does n't deploy. My App is 
> > > > dependent upon mongo which is passed as environment variable in the 
> > > > json file to be run by dcos command. If a i do a telnet/curl, it does 
> > > > n't receive at the desired host:port. from the mesos logs, it does not 
> > > > seem to throw any error/exception. Doing a copy-past of my 
> > > > backend-app.json file which falis to deploy.
> > > >  
> > > >  
> > > > {  
> > > > "id": "/todo-with-backend",
> > > > "instances": 2,
> > > > "container": {
> > > > "type": "DOCKER",
> > > > "docker": {
> > > > "image": "tldr/todo-backend",
> > > > "network": "BRIDGE",
> > > > "portMappings": [
> > > > {
> > > > "containerPort": 8080,
> > > > "hostPort": 0,
> > > > "protocol": "tcp"
> > > > }
> > > > ]
> > > > }
> > > > },
> > > > "env":{
> > > >"MONGO_URL":"10.0.2.252:5530 (http://10.0.2.252:5530/)"
> > > >  },
> > > > "healthChecks": [{
> > > > "protocol": "HTTP",
> > > > "portIndex": 0
> > > > }],
> > > > "labels":{
> > > > "HAPROXY_GROUP":"external",
> > > > ""
> > > > },
> > > >  
> > > > "cpus": 0.25,
> > > > "mem": 256.0
> > > > }
> > > >  
> > > > I have gone inside the host and checked that env value is reflecting 
> > > > correctly.  
> > > > Please help me out in analyzing the issue.
> > > >  
> > > > Regards,  
> > > > Nirmal
> > > >  
> > > >  
> > >  
> > >  
> > >  
> > > --  
> > > Best Regards,
> > > Haosdent Huang  
> > >  
> >  
> >  
> >  
> > --  
> > Best Regards,
> > Haosdent Huang  
>  
>  



Re: marathon issue in running a docker container.

2016-04-12 Thread nirmalendu swain
>From the stderr log, nothing can be figure out. From stout log, it says server 
>running at host:port. But If I do telnet or curl, it does not show me any 
>reponse.output of stderr log :
I0412 08:16:12.842341  9909 exec.cpp:134] Version: 0.27.1I0412 08:16:12.844701  
9934 exec.cpp:208] Executor registered on slave 
87849fd2-fda9-4d6a-870f-de101a5bdc59-S3js-bson: Failed to load c++ bson 
extension, using pure JS version 

On Tuesday, 12 April 2016 1:39 PM, Abhishek Amralkar 
 wrote:
 

 anything is sandbox logs, why the tasks are getting killed? `stderr` and 
`stdout`?

On 12-Apr-2016, at 1:35 PM, haosdent  wrote:
>Its frequently changing the deployment status to Staged
Do you find any related log in mesos when marathon lauch the task?
On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain  
wrote:

Changing the network type to HOST does not work. Its frequently changing the 
deployment status to Staged and then to no task.

On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:


How about change the network type from BRIDGE to HOST?
On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain  
wrote:

Hi Mesos user,I am running mesos marathon using dcos for spinning up AWS 
instances. I have successfully built the mongodb as a docker container, but 
when I try to deploy my dockerized app, it does n't deploy. My App is dependent 
upon mongo which is passed as environment variable in the json file to be run 
by dcos command. If a i do a telnet/curl, it does n't receive at the desired 
host:port. from the mesos logs, it does not seem to throw any error/exception. 
Doing a copy-past of my backend-app.json file which falis to deploy.

{    "id": "/todo-with-backend",    "instances": 2,    "container": {        
"type": "DOCKER",        "docker": {            "image": "tldr/todo-backend",   
         "network": "BRIDGE",            "portMappings": [                {     
               "containerPort": 8080,                    "hostPort": 0,         
           "protocol": "tcp"                }            ]        }    
},"env":{       "MONGO_URL":"10.0.2.252:5530" },    "healthChecks": [{        
"protocol": "HTTP",        "portIndex": 0    }],    "labels":{        
"HAPROXY_GROUP":"external",        ""    },    "cpus": 0.25,    "mem": 256.0}
I have gone inside the host and checked that env value is reflecting 
correctly.Please help me out in analyzing the issue.
Regards,Nirmal





-- 
Best Regards,
Haosdent Huang





-- 
Best Regards,
Haosdent Huang



  

Re: marathon issue in running a docker container.

2016-04-12 Thread nirmalendu swain
When marathon launches the task while network : "BRIDGE", I can see from the 
mesos log that its listening to some host:port Even I can do an ssh to that 
instance, also saw MONGO_URL as env value over there. Pasting the log below -- 
--container="mesos-87849fd2-fda9-4d6a-870f-de101a5bdc59-S1.864e0bbb-02b5-4634-a6e5-a840993d181d"
 --docker="docker" --docker_socket="/var/run/docker.sock" --help="false" 
--initialize_driver_logging="true" 
--launcher_dir="/opt/mesosphere/packages/mesos--b012cc908778011b3c6b09b1ebaa06f5e0a93ccd/libexec/mesos"
 --logbufsecs="0" --logging_level="INFO" 
--mapped_directory="/mnt/mesos/sandbox" --quiet="false" 
--sandbox_directory="/var/lib/mesos/slave/slaves/87849fd2-fda9-4d6a-870f-de101a5bdc59-S1/frameworks/87849fd2-fda9-4d6a-870f-de101a5bdc59-/executors/todo-with-backend.031a8d1c-fd79-11e5-afa9-024212f8e488/runs/864e0bbb-02b5-4634-a6e5-a840993d181d"
 
--stop_timeout="0ns"--container="mesos-87849fd2-fda9-4d6a-870f-de101a5bdc59-S1.864e0bbb-02b5-4634-a6e5-a840993d181d"
 --docker="docker" --docker_socket="/var/run/docker.sock" --help="false" 
--initialize_driver_logging="true" 
--launcher_dir="/opt/mesosphere/packages/mesos--b012cc908778011b3c6b09b1ebaa06f5e0a93ccd/libexec/mesos"
 --logbufsecs="0" --logging_level="INFO" 
--mapped_directory="/mnt/mesos/sandbox" --quiet="false" 
--sandbox_directory="/var/lib/mesos/slave/slaves/87849fd2-fda9-4d6a-870f-de101a5bdc59-S1/frameworks/87849fd2-fda9-4d6a-870f-de101a5bdc59-/executors/todo-with-backend.031a8d1c-fd79-11e5-afa9-024212f8e488/runs/864e0bbb-02b5-4634-a6e5-a840993d181d"
 --stop_timeout="0ns"Registered docker executor on 10.0.2.253Starting task 
todo-with-backend.031a8d1c-fd79-11e5-afa9-024212f8e488Waiting for Mongo to 
become available. Will try for 60 seconds.Starting service.{ [Error: Cannot 
find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' 
}[33m   !!! 
MONGOOSE WARNING !!!##   This is an UNSTABLE release of Mongoose.#   Unstable 
releases are available for preview/testing only.#   DO NOT run this in 
production.###[0mServer
 running at: http://0.0.0.0:7683


 

On Tuesday, 12 April 2016 1:35 PM, haosdent  wrote:
 

 >Its frequently changing the deployment status to Staged
Do you find any related log in mesos when marathon lauch the task?
On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain  
wrote:

Changing the network type to HOST does not work. Its frequently changing the 
deployment status to Staged and then to no task. 

On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:
 

 How about change the network type from BRIDGE to HOST?
On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain  
wrote:

Hi Mesos user,I am running mesos marathon using dcos for spinning up AWS 
instances. I have successfully built the mongodb as a docker container, but 
when I try to deploy my dockerized app, it does n't deploy. My App is dependent 
upon mongo which is passed as environment variable in the json file to be run 
by dcos command. If a i do a telnet/curl, it does n't receive at the desired 
host:port. from the mesos logs, it does not seem to throw any error/exception. 
Doing a copy-past of my backend-app.json file which falis to deploy.

{    "id": "/todo-with-backend",    "instances": 2,    "container": {        
"type": "DOCKER",        "docker": {            "image": "tldr/todo-backend",   
         "network": "BRIDGE",            "portMappings": [                {     
               "containerPort": 8080,                    "hostPort": 0,         
           "protocol": "tcp"                }            ]        }    }, 
"env":{       "MONGO_URL":"10.0.2.252:5530"   },    "healthChecks": [{        
"protocol": "HTTP",        "portIndex": 0    }],    "labels":{        
"HAPROXY_GROUP":"external",        ""    },     "cpus": 0.25,    "mem": 256.0}
I have gone inside the host and checked that env value is reflecting 
correctly.Please help me out in analyzing the issue.
Regards,Nirmal





-- 
Best Regards,
Haosdent Huang

   



-- 
Best Regards,
Haosdent Huang

  

Re: marathon issue in running a docker container.

2016-04-12 Thread Abhishek Amralkar



anything is sandbox logs, why the tasks are getting killed? `stderr` and `stdout`?


On 12-Apr-2016, at 1:35 PM, haosdent  wrote:


>Its frequently changing the deployment status to Staged


Do you find any related log in mesos when marathon lauch the task?


On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain 
 wrote:



Changing the network type to HOST does not work. Its frequently changing the deployment status to Staged and then to no task.








On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:






How about change the network type from BRIDGE to HOST?


On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain 
 wrote:



Hi Mesos user,
I am running mesos marathon using dcos for spinning up AWS instances. 
I have successfully built the mongodb as a docker container, but when I try to deploy my dockerized app, it does n't deploy. My App is dependent upon mongo which is passed as environment variable in the json file to be run by dcos command.
 If a i do a telnet/curl, it does n't receive at the desired host:port. from the mesos logs, it does not seem to throw any error/exception. Doing a copy-past of my backend-app.json file which falis to deploy.




{
    "id": "/todo-with-backend",
    "instances": 2,
    "container": {
        "type": "DOCKER",
        "docker": {
            "image": "tldr/todo-backend",
            "network": "BRIDGE",
            "portMappings": [
                {
                    "containerPort": 8080,
                    "hostPort": 0,
                    "protocol": "tcp"
                }
            ]
        }
    },
"env":{
       "MONGO_URL":"10.0.2.252:5530"
 },
    "healthChecks": [{
        "protocol": "HTTP",
        "portIndex": 0
    }],
    "labels":{
        "HAPROXY_GROUP":"external",
        ""
    },

    "cpus": 0.25,
    "mem": 256.0
}


I have gone inside the host and checked that env value is reflecting correctly.
Please help me out in analyzing the issue.


Regards,
Nirmal













-- 
Best Regards,
Haosdent Huang




















-- 
Best Regards,
Haosdent Huang










Re: marathon issue in running a docker container.

2016-04-12 Thread haosdent
>Its frequently changing the deployment status to Staged

Do you find any related log in mesos when marathon lauch the task?

On Tue, Apr 12, 2016 at 3:55 PM, nirmalendu swain <
nirmalendu_sw...@yahoo.com> wrote:

> Changing the network type to HOST does not work. Its frequently changing
> the deployment status to Staged and then to no task.
>
>
> On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:
>
>
> How about change the network type from BRIDGE to HOST?
>
> On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain <
> nirmalendu_sw...@yahoo.com> wrote:
>
> Hi Mesos user,
> I am running mesos marathon using dcos for spinning up AWS instances.
> I have successfully built the mongodb as a docker container, but when I
> try to deploy my dockerized app, it does n't deploy. My App is dependent
> upon mongo which is passed as environment variable in the json file to be
> run by dcos command. If a i do a telnet/curl, it does n't receive at the
> desired host:port. from the mesos logs, it does not seem to throw any
> error/exception. Doing a copy-past of my backend-app.json file which falis
> to deploy.
>
>
> *{*
> *"id": "/todo-with-backend",*
> *"instances": 2,*
> *"container": {*
> *"type": "DOCKER",*
> *"docker": {*
> *"image": "tldr/todo-backend",*
> *"network": "BRIDGE",*
> *"portMappings": [*
> *{*
> *"containerPort": 8080,*
> *"hostPort": 0,*
> *"protocol": "tcp"*
> *}*
> *]*
> *}*
> *},*
> * "env":{*
> *   "MONGO_URL":"10.0.2.252:5530 "*
> *  },*
> *"healthChecks": [{*
> *"protocol": "HTTP",*
> *"portIndex": 0*
> *}],*
> *"labels":{*
> *"HAPROXY_GROUP":"external",*
> *""*
> *},*
> *"cpus": 0.25,*
> *"mem": 256.0*
> *}*
>
> I have gone inside the host and checked that env value is reflecting
> correctly.
> Please help me out in analyzing the issue.
>
> Regards,
> Nirmal
>
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>


-- 
Best Regards,
Haosdent Huang


Re: marathon issue in running a docker container.

2016-04-12 Thread nirmalendu swain
Changing the network type to HOST does not work. Its frequently changing the 
deployment status to Staged and then to no task. 

On Tuesday, 12 April 2016 11:49 AM, haosdent  wrote:
 

 How about change the network type from BRIDGE to HOST?
On Tue, Apr 12, 2016 at 2:13 PM, nirmalendu swain  
wrote:

Hi Mesos user,I am running mesos marathon using dcos for spinning up AWS 
instances. I have successfully built the mongodb as a docker container, but 
when I try to deploy my dockerized app, it does n't deploy. My App is dependent 
upon mongo which is passed as environment variable in the json file to be run 
by dcos command. If a i do a telnet/curl, it does n't receive at the desired 
host:port. from the mesos logs, it does not seem to throw any error/exception. 
Doing a copy-past of my backend-app.json file which falis to deploy.

{    "id": "/todo-with-backend",    "instances": 2,    "container": {        
"type": "DOCKER",        "docker": {            "image": "tldr/todo-backend",   
         "network": "BRIDGE",            "portMappings": [                {     
               "containerPort": 8080,                    "hostPort": 0,         
           "protocol": "tcp"                }            ]        }    }, 
"env":{       "MONGO_URL":"10.0.2.252:5530"   },    "healthChecks": [{        
"protocol": "HTTP",        "portIndex": 0    }],    "labels":{        
"HAPROXY_GROUP":"external",        ""    },     "cpus": 0.25,    "mem": 256.0}
I have gone inside the host and checked that env value is reflecting 
correctly.Please help me out in analyzing the issue.
Regards,Nirmal





-- 
Best Regards,
Haosdent Huang