tomcat-only, linux, non-root
Peter Schober
peter.schober at univie.ac.at
Thu Aug 11 07:07:24 EDT 2016
* Etienne Dysli-Metref <etienne.dysli-metref at switch.ch> [2016-08-11 11:38]:
> I've searched a bit further and wondered whether Tomcat could benefit
> from systemd's socket activation: systemd creates the socket on a low
> port then hands it to Tomcat, no root required. After a bit of reading,
> I doubt this will ever happen with Java programs because you need to use
> systemd's API... (For example Twisted seems to support this [1].)
I didn't really look into this but it sounded like the most elegant
method and also that it's not possible with Java at this time.
> But I stumbled upon an interesting solution: systemd-socket-proxyd [2]:
> [...]
> The man page [2] also contains an example for nginx. Since
> systemd-socket-proxyd is part of systemd, there is nothing else to
> install and only two unit files to configure. :D
Thanks for the pointers, systemd growing ever more functionality can
certainly help here, as long as it works properly and doesn't
introduce too many new bugs/holes. (Any one remember the Unix
Philosophy?)
I actually thought about using netcat or some other lightweight proxy
for that, but that seemed too hackish. Now systemd includes that out
of the box. :)
The "Namespace example" from the systemd-socket-proxyd documentation
sounds like it should work with Tomcat etc out of the box. Did you
actally try that? If so feel free to add this to the wiki, otherwise
I'll give it a shot in a couple of hours.
Thanks for sharing!
-peter
More information about the users
mailing list