You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Mark Bradley <ma...@tera.teralink.com> on 2006/10/12 16:33:10 UTC
Webapps exposed on distinct ports
Greetings all,
I am trying to figure out how to solve this exact same problem as
described by Rick (below) where I need to deploy different apps to
different tomcat connectors on different ports (already available).
David says this capability became available in 1.1. Does anyone
know how to do this?
Thanks,
-Mark
------
On Jun 13, 2006, at 9:34 AM, Rick Sears wrote:
Hello everyone,
I've been trolling the web the past couple days looking for
examples/information on how to accomplish something that is
currently
being done in an application we are looking at porting to run under
Geronimo. We would like to be able to expose one webapp on a
non-ssl
port, say 12345, while having another webapp also running in
Geronimo
running on a different ssl-enabled port, say 54321. The webapp
running on the ssl-enabled port should not be accessible from
the non
ssl-enabled port.
I've looked at a bunch of the Geronimo documentation, but all the
things i've tried have come up short using Geronimo 1.0. There
seems
to be an example of doing something similar using Geronimo 1.1
(http://opensource.atlassian.com/confluence/oss/display/
GERONIMO/ Exposing+Web+Applications+on+distinct+ports),
but I am just wondering if i'm missing something that is also
available on Geronimo 1.0. The references to the <web-app> tag
under
the <module> tag are problematic in Geronimo 1.0, but I can't
see any
other way of tying a given deployed webapp to a particular Tomcat
container (that is exposed on one set of ports but not the other).
If anyone has any examples/information on how to tie a deployed
Tomcat
webapp to a particular container with a distinct set of exposed
ports,
please let me know.
This capability is new in 1.1. In 1.0, you might possibly be able to
get something to work by using virtual hosts, but I'm not enough of
an expert on that to give you good advice. In particular I don't know
how reliable it would be.
One other thing you might be able to use to prevent access from the
non-ssl port is use j2ee web security to require the CONFIDENTIAL
transport guarantee for the secured app. This probably wouldn't hide
the existence of the secured app but would prevent access: I think
you'd get a "forbidden" error rather than a "not found"
thanks
david jencks
Re: Webapps exposed on distinct ports
Posted by Mark Bradley <ma...@tera.teralink.com>.
Well, I thought that I might be able to take the example in wiki
(http://cwiki.apache.org/GMOxDOC11/exposing-web-applications-on-
distinct-ports.html) and whittle it down to what I need, but I can't
even deploy the example .ear( appPerPort.ear). I get this error:
geronimo-1.1.1% java -jar bin/deployer.jar deploy appPerPort.ear
Error: Unable to distribute appPerPort.ear: Cannot deploy the
requested application module because no deployer is able to handle
it. This can happen if you have omitted the J2EE deployment
descriptor, disabled a deployer module, or if, for example, you are
trying to deploy an EJB module on a minimal Geronimo server that
does not have EJB support installed.
(moduleFile=/Users/mark/Programs/geronimo-1.1.1/var/temp/
geronimo-deployer4506.tmpdir/appPerPort.ear)
and here is the stack trace in the log:
Deployer operation failed: Cannot deploy the requested application
module because no deployer is able to handle it. This can happen if
you have omitted the J2EE deployment descriptor, disabled a deployer
module, or if, for example, you are trying to deploy an EJB module on
a minimal Geronimo server that does not have EJB support installed.
(moduleFile=/Users/mark/Programs/geronimo-1.1.1/var/temp/geronimo-
deployer4504.tmpdir/appperport.ear)
org.apache.geronimo.common.DeploymentException: Cannot deploy the
requested application module because no deployer is able to handle
it. This can happen if you have omitted the J2EE deployment
descriptor, disabled a deployer module, or if, for example, you are
trying to deploy an EJB module on a minimal Geronimo server that does
not have EJB support installed. (moduleFile=/Users/mark/Programs/
geronimo-1.1.1/var/temp/geronimo-deployer4504.tmpdir/appperport.ear)
at org.apache.geronimo.deployment.Deployer.deploy
(Deployer.java:239)
at org.apache.geronimo.deployment.Deployer.deploy
(Deployer.java:124)
at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$
$734a235d.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
(GBeanInstance.java:852)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke
(BasicKernel.java:239)
at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDepl
oy(AbstractDeployCommand.java:106)
at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run
(DistributeCommand.java:60)
at java.lang.Thread.run(Thread.java:613)
Any ideas?
Thanks,
-Mark
Re: Webapps exposed on distinct ports
Posted by Mark Bradley <ma...@tera.teralink.com>.
Hi David,
Yes, I can give a specific example.
I have two tomcat connectors available in Geronimo (1.1.1):
1) TomcatWebConnector (port 8080)
2) Tomcat2 (port 8081)
My application.xml currently looks like this:
<application
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
version="1.4">
<module>
<web>
<web-uri>app.war</web-uri>
<context-root>/app</context-root>
</web>
</module>
<module>
<connector>ge-activemq-rar-1.1.1.rar</connector>
</module>
</application>
I want to deploy this so that the application is available on the
tomcat connector I defined on port 8081 (named Tomcat2). The wiki
shows a 'web-app' section under the 'module' element, but it doesn't
seem to be valid (parse errors if I try to use it). When I deploy it
the way it is now, my application becomes available on both ports,
whereas I only want it available on one of the connectors (and the
specific one I specify somewhere!).
Any help is greatly appreciated, and thanks for looking at this!
-Mark
On Oct 12, 2006, at 1:54 PM, David Jencks wrote:
>
> On Oct 12, 2006, at 9:33 AM, Mark Bradley wrote:
>
>> Greetings all,
>>
>> I am trying to figure out how to solve this exact same problem as
>> described by Rick (below) where I need to deploy different apps to
>> different tomcat connectors on different ports (already available).
>>
>> David says this capability became available in 1.1. Does anyone
>> know how to do this?
>
> the wiki page has an example and discussion, can you be specific
> about what more you need?
>
> thanks
> david jencks
>
>>
>> Thanks,
>>
>> -Mark
>>
>> ------
>>
>> On Jun 13, 2006, at 9:34 AM, Rick Sears wrote:
>>
>>
>> Hello everyone,
>>
>> I've been trolling the web the past couple days looking for
>> examples/information on how to accomplish something that is
>> currently
>> being done in an application we are looking at porting to run
>> under
>> Geronimo. We would like to be able to expose one webapp on a
>> non-ssl
>> port, say 12345, while having another webapp also running in
>> Geronimo
>> running on a different ssl-enabled port, say 54321. The webapp
>> running on the ssl-enabled port should not be accessible from
>> the non
>> ssl-enabled port.
>>
>> I've looked at a bunch of the Geronimo documentation, but all the
>> things i've tried have come up short using Geronimo 1.0.
>> There seems
>> to be an example of doing something similar using Geronimo 1.1
>>
>> (http://opensource.atlassian.com/confluence/oss/display/
>> GERONIMO/ Exposing+Web+Applications+on+distinct+ports),
>>
>> but I am just wondering if i'm missing something that is also
>> available on Geronimo 1.0. The references to the <web-app>
>> tag under
>> the <module> tag are problematic in Geronimo 1.0, but I can't
>> see any
>> other way of tying a given deployed webapp to a particular Tomcat
>> container (that is exposed on one set of ports but not the
>> other).
>>
>> If anyone has any examples/information on how to tie a
>> deployed Tomcat
>> webapp to a particular container with a distinct set of
>> exposed ports,
>> please let me know.
>>
>> This capability is new in 1.1. In 1.0, you might possibly be able
>> to get something to work by using virtual hosts, but I'm not
>> enough of an expert on that to give you good advice. In particular
>> I don't know how reliable it would be.
>>
>> One other thing you might be able to use to prevent access from
>> the non-ssl port is use j2ee web security to require the
>> CONFIDENTIAL transport guarantee for the secured app. This
>> probably wouldn't hide the existence of the secured app but would
>> prevent access: I think you'd get a "forbidden" error rather than
>> a "not found"
>>
>> thanks
>> david jencks
>>
>>
Re: Webapps exposed on distinct ports
Posted by David Jencks <da...@yahoo.com>.
On Oct 12, 2006, at 9:33 AM, Mark Bradley wrote:
> Greetings all,
>
> I am trying to figure out how to solve this exact same problem as
> described by Rick (below) where I need to deploy different apps to
> different tomcat connectors on different ports (already available).
>
> David says this capability became available in 1.1. Does anyone
> know how to do this?
the wiki page has an example and discussion, can you be specific
about what more you need?
thanks
david jencks
>
> Thanks,
>
> -Mark
>
> ------
>
> On Jun 13, 2006, at 9:34 AM, Rick Sears wrote:
>
>
> Hello everyone,
>
> I've been trolling the web the past couple days looking for
> examples/information on how to accomplish something that is
> currently
> being done in an application we are looking at porting to run
> under
> Geronimo. We would like to be able to expose one webapp on a
> non-ssl
> port, say 12345, while having another webapp also running in
> Geronimo
> running on a different ssl-enabled port, say 54321. The webapp
> running on the ssl-enabled port should not be accessible from
> the non
> ssl-enabled port.
>
> I've looked at a bunch of the Geronimo documentation, but all the
> things i've tried have come up short using Geronimo 1.0. There
> seems
> to be an example of doing something similar using Geronimo 1.1
>
> (http://opensource.atlassian.com/confluence/oss/display/
> GERONIMO/ Exposing+Web+Applications+on+distinct+ports),
>
> but I am just wondering if i'm missing something that is also
> available on Geronimo 1.0. The references to the <web-app> tag
> under
> the <module> tag are problematic in Geronimo 1.0, but I can't
> see any
> other way of tying a given deployed webapp to a particular Tomcat
> container (that is exposed on one set of ports but not the other).
>
> If anyone has any examples/information on how to tie a deployed
> Tomcat
> webapp to a particular container with a distinct set of exposed
> ports,
> please let me know.
>
> This capability is new in 1.1. In 1.0, you might possibly be able
> to get something to work by using virtual hosts, but I'm not enough
> of an expert on that to give you good advice. In particular I don't
> know how reliable it would be.
>
> One other thing you might be able to use to prevent access from the
> non-ssl port is use j2ee web security to require the CONFIDENTIAL
> transport guarantee for the secured app. This probably wouldn't
> hide the existence of the secured app but would prevent access: I
> think you'd get a "forbidden" error rather than a "not found"
>
> thanks
> david jencks
>
>