You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aurora.apache.org by "Gogineni, Tarun" <go...@frib.msu.edu> on 2016/07/25 16:32:45 UTC

revised post to avoid mail system warning

Hello!


I have been attempting to run a persistent Tomcat webserver/webapp inside of a Docker container generated by Aurora, all inside Vagrant. The docker image is preloaded with the Tomcat software and webapp, such that it only requires a run command in order to start the Tomcat webapp. I wanted to be able to see my webapp in browser so I attempted to publish the Docker port onto a port on the Vagrant environment, using the following code as part of the Service description in the .aurora:


container = Docker(image = 'tomcatimage', parameters = [Parameter(name = 'publish', value = '8080:8080')])


The docker image executes the Dockerfile command "EXPOSE 8080", which I can safely assume accomplishes what it promises. The publish parameter is used to map the 8080 port inside docker to the host port 8080. So, the webapp should be visible at http:\\localhost:8080 , where localhost is designated by the Vagrantfile.


However, this does not successfully publish onto the 8080 host port.



When I run the docker container independently of Aurora, without any input parameters, and type 'docker ps' into the CLI, the output shows "8080/tcp" under "PORTS".


 If I run the container with the flag "-p 8080:8080", the 'docker ps' output shows "0.0.0.0:8080->8080/tcp": this mapping results in a webpage I can access by navigating a browser to http:\\localhost:8080 , with localhost defined in the Vagrantfile.


However, when aurora generates the docker container (using the same docker image), it has nothing at all listed in the "PORTS" output of 'docker ps', and cannot be accessed by navigating to a web page.


Has anyone experienced this (fairly specific) problem? Suggestions? Any additional details required to diagnose?


Thanks!


Re: revised post to avoid mail system warning

Posted by Zameer Manji <zm...@apache.org>.
Hey,

I'm not an expert on the Docker integration and could be wrong but I
believe you cannot rely on the 'EXPOSE' directive to manage ports when
using Mesos to launch containers via Docker. Instead you must use Aurora to
request port 8080 through Mesos's resources system.

I would ask on the Mesos's users list and ask if the Docker integration
supports the EXPOSE directive.

On Mon, Jul 25, 2016 at 9:32 AM, Gogineni, Tarun <go...@frib.msu.edu>
wrote:

> Hello!
>
>
> I have been attempting to run a persistent Tomcat webserver/webapp inside
> of a Docker container generated by Aurora, all inside Vagrant. The docker
> image is preloaded with the Tomcat software and webapp, such that it only
> requires a run command in order to start the Tomcat webapp. I wanted to be
> able to see my webapp in browser so I attempted to publish the Docker port
> onto a port on the Vagrant environment, using the following code as part of
> the Service description in the .aurora:
>
> container = Docker(image = 'tomcatimage', parameters = [Parameter(name =
> 'publish', value = '8080:8080')])
>
>
> The docker image executes the Dockerfile command "EXPOSE 8080", which I
> can safely assume accomplishes what it promises. The publish parameter is
> used to map the 8080 port inside docker to the host port 8080. So, the
> webapp should be visible at http:\\localhost:8080 , where localhost is
> designated by the Vagrantfile.
>
> However, this does not successfully publish onto the 8080 host port.
>
>
>
> When I run the docker container independently of Aurora, without any input
> parameters, and type 'docker ps' into the CLI, the output shows "8080/tcp"
> under "PORTS".
>
>
>  If I run the container with the flag "-p 8080:8080", the 'docker ps'
> output shows "0.0.0.0:8080->8080/tcp": this mapping results in a webpage
> I can access by navigating a browser to http:\\localhost:8080 , with
> localhost defined in the Vagrantfile.
>
>
> However, when aurora generates the docker container (using the same docker
> image), it has nothing at all listed in the "PORTS" output of 'docker ps',
> and cannot be accessed by navigating to a web page.
>
>
> Has anyone experienced this (fairly specific) problem? Suggestions? Any
> additional details required to diagnose?
>
>
> Thanks!
>
>
>

Re: revised post to avoid mail system warning

Posted by Rogier Dikkes <ro...@surfsara.nl>.
Hi,


Haven't been playing around with Docker on Aurora for a while due to its 
current limitations, but could you try (works with Aurora 0.14):


   Parameter(name='publish', value='8080'),


Directly exposing ports shouldn't require you to give the source and 
destination ports, as stated in the Docker reference guide 
https://docs.docker.com/engine/reference/commandline/run/.


Do you have any error output in the logs from Aurora that give an 
indication of whats going on?





On 7/25/16 6:32 PM, Gogineni, Tarun wrote:
>
> Hello!
>
>
> I have been attempting to run a persistent Tomcat webserver/webapp 
> inside of a Docker container generated by Aurora, all inside 
> Vagrant. The docker image is preloaded with the Tomcat software 
> and webapp, such that it only requires a run command in order to start 
> the Tomcat webapp. I wanted to be able to see my webapp in browser so 
> I attempted to publish the Docker port onto a port on the Vagrant 
> environment, using the following code as part of the Service 
> description in the .aurora:
>
> container = Docker(image = 'tomcatimage', parameters = [Parameter(name 
> = 'publish', value = '8080:8080')])
>
>
> The docker image executes the Dockerfile command "EXPOSE 8080", which 
> I can safely assume accomplishes what it promises. The publish 
> parameter is used to map the 8080 port inside docker to the host port 
> 8080. So, the webapp should be visible at http:\\localhost:8080 , 
> where localhost is designated by the Vagrantfile.
>
> However, this does not successfully publish onto the 8080 host port.
>
>
> When I run the docker container independently of Aurora, without any 
> input parameters, and type 'docker ps' into the CLI, the output shows 
> "8080/tcp" under "PORTS".
>
>
>  If I run the container with the flag "-p 8080:8080", the 'docker ps' 
> output shows "0.0.0.0:8080->8080/tcp": this mapping results in a 
> webpage I can access by navigating a browser to http:\\localhost:8080 
> , with localhost defined in the Vagrantfile.
>
>
> However, when aurora generates the docker container (using the same 
> docker image), it has nothing at all listed in the "PORTS" output of 
> 'docker ps', and cannot be accessed by navigating to a web page.
>
>
> Has anyone experienced this (fairly specific) problem? Suggestions? 
> Any additional details required to diagnose?
>
>
> Thanks!
>
>

-- 
Rogier Dikkes
System Programmer Scalable Data Analytics & HPC Cloud
SURFsara | Science Park 140 | 1098 XG Amsterdam


Re: revised post to avoid mail system warning

Posted by "Gogineni, Tarun" <go...@frib.msu.edu>.
Hi,


That name/value pair doesn't work for me. In fact, now the Tomcat server immediately exits instead of running. Here's a pastebin of the stderr (which is all just .catalina.sh output, the Tomcat bash script):

http://pastebin.com/L4652H71


However, Parameter(name = 'publish', value = '192.168.33.7:8080:8080')  seems to have done the trick for me.

________________________________
From: Rogier Dikkes <ro...@surfsara.nl>
Sent: Tuesday, July 26, 2016 9:56 AM
To: user@aurora.apache.org
Subject: Re: revised post to avoid mail system warning


Hi,


Haven't been playing around with Docker on Aurora for a while due to its current limitations, but could you try (works with Aurora 0.14):


  Parameter(name='publish', value='8080'),


Directly exposing ports shouldn't require you to give the source and destination ports, as stated in the Docker reference guide https://docs.docker.com/engine/reference/commandline/run/.

Do you have any error output in the logs from Aurora that give an indication of whats going on?





On 7/25/16 6:32 PM, Gogineni, Tarun wrote:

Hello!


I have been attempting to run a persistent Tomcat webserver/webapp inside of a Docker container generated by Aurora, all inside Vagrant. The docker image is preloaded with the Tomcat software and webapp, such that it only requires a run command in order to start the Tomcat webapp. I wanted to be able to see my webapp in browser so I attempted to publish the Docker port onto a port on the Vagrant environment, using the following code as part of the Service description in the .aurora:


container = Docker(image = 'tomcatimage', parameters = [Parameter(name = 'publish', value = '8080:8080')])


The docker image executes the Dockerfile command "EXPOSE 8080", which I can safely assume accomplishes what it promises. The publish parameter is used to map the 8080 port inside docker to the host port 8080. So, the webapp should be visible at http:\\localhost:8080 , where localhost is designated by the Vagrantfile.


However, this does not successfully publish onto the 8080 host port.



When I run the docker container independently of Aurora, without any input parameters, and type 'docker ps' into the CLI, the output shows "8080/tcp" under "PORTS".


 If I run the container with the flag "-p 8080:8080", the 'docker ps' output shows "0.0.0.0:8080->8080/tcp": this mapping results in a webpage I can access by navigating a browser to http:\\localhost:8080 , with localhost defined in the Vagrantfile.


However, when aurora generates the docker container (using the same docker image), it has nothing at all listed in the "PORTS" output of 'docker ps', and cannot be accessed by navigating to a web page.


Has anyone experienced this (fairly specific) problem? Suggestions? Any additional details required to diagnose?


Thanks!



--
Rogier Dikkes
System Programmer Scalable Data Analytics & HPC Cloud
SURFsara | Science Park 140 | 1098 XG Amsterdam