You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hrachya Mughnetsyan <hm...@egencia.com> on 2011/09/20 19:48:00 UTC

RE: Tomcat running under OSGI is accessible only via 'localhost'

Hi
We have a web-service which used to run under tomcat. Recently we converted it into OSGI bundle. Almost all existing functionaly runs fine with 1 exception:
Can access web-service ONLY through http://localhost/... and port 8080. These settings are embedded in catalina.start.osgi-6.0.16-SNAPSHOT.jar\conf\embedded-server-defaults.properties. It is possible to manually change the 'host' property in this file from 'localhost' to a machine name, for example. After this the service is accessible only through http://machinename/... I hope to find a solution that will make service accessible via localhost, machinename, fully qualified name, etc.- as in case with 'usual' tomcat installation.
I'd very appreciate assistance to find solution to these issues.
Thank you



Re: Tomcat running under OSGI is accessible only via 'localhost'

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hrachya,

On 9/20/2011 1:48 PM, Hrachya Mughnetsyan wrote:
> Almost all existing [functionality] runs fine with 1 exception:
> Can access web-service ONLY through http://localhost/... and port
> 8080.

That should be fixable.

> These settings are embedded in 
> catalina.start.osgi-6.0.16-SNAPSHOT.jar\conf\embedded-server-defaults.properties.
>
> 
It is possible to manually change the 'host' property in this file
> from 'localhost' to a machine name, for example. After this the 
> service is accessible only through http://machinename/... I hope
> to find a solution that will make service accessible via
> localhost, machinename, fully qualified name, etc.- as in case with
> 'usual' tomcat installation. I'd very appreciate assistance to find
> solution to these issues. Thank you

It might help if you told us how the file
catalina.start.osgi-6.0.16-SNAPSHOT.jar\conf\embedded-server-defaults.properties
comes into play.

If this were a vanilla Tomcat configuration, you'd just make sure that
you had <Engine defaultHost="localhost"> and make sure your webapps
were all deployed into <Host name="localhost"> (note that the use of
"localhost" as the <Host>'s name is just a convention, and really has
nothing to do with a hostname per se).

I suspect you should be able to poke around in your OSGi bundle and
figure out how to modify things such that you don't restrict yourself
only to "localhost".

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk54+14ACgkQ9CaO5/Lv0PCZDwCfdhC75RBobFDbkYHc3RtRvzCU
aoMAn3akWKtXNGAqaniOwPWeJInKyqsL
=M/Gx
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org