[Bug 60560] Support systemd/inetd style socket activation

2018-06-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

Remy Maucherat  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #9 from Remy Maucherat  ---
This will be available in 9.0.11+ and 8.5.33+. Thanks for the patch, ideas and
testing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2018-01-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

--- Comment #8 from Coty Sutherland  ---
And just individuals interested in testing this, you need the following new
socket descriptor and modification to the systemd service unit:

Create a socket in /etc/systemd/system/tomcat.socket (this one opens a socket
bound to localhost on port 80):

~~~
[Unit]
Description=Socket for Tomcat
PartOf=tomcat.service

[Socket]
ListenStream=127.0.0.1:80

[Install]
WantedBy=sockets.target
~~~

Then add `Requires=tomcat.socket` to the [Unit] section of your tomcat systemd
service unit and `StandardInput=socket` to the [Service] section.

After adding those, starting the service (systemctl start tomcat) will open the
socket and pass that through to tomcat. You can also start the tomcat service
on the first request to localhost:80, but you have to start the socket first
(systemctl start tomcat.socket).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2018-01-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

--- Comment #7 from Coty Sutherland  ---
Comments from a review of the latest provided patch:

* Your patch adds an unnecessary space before the TimeUnit import in
NioEndpoint
* There is a typo, 'automatically', in http.xml
* The useInheritedChannel documentation addition in http.xml specifies type
(boolean) which is inconsistent with other (bool) attrs
* If you specify useInheritedChannel on a Connector it shouldn't fall back to
the default behavior when starting without an OS provided socket. If you
specifically designate that tomcat should use an OS socket, then it should fail
to start the Connector (like the behavior that causes an SSL Connector to fail
to start when it can't find the keystore).
* If you're borrowing a socket from the OS for tomcat to use (by skipping the
bind), then you shouldn't be closing the socket in NioEndpoint.unbind().

After applying this patch the behavior seems to work (mostly, systemd is
behaving a bit odd, but that's not tomcat's fault), but there's something that
may be confusing for users: the thread name (i.e. Starting ProtocolHandler
["http-nio-8080"]). If you specify useInheritedChannel on the Connector then
you're no longer using the specified port. We should probably address that
somehow.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-05-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

Thomas Meyer  changed:

   What|Removed |Added

  Attachment #34600|0   |1
is obsolete||
  Attachment #34844|0   |1
is obsolete||

--- Comment #6 from Thomas Meyer  ---
Created attachment 34982
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34982=edit
updated patch with documentation

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-03-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

--- Comment #5 from Thomas Meyer  ---
Created attachment 34844
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34844=edit
updated patch with documentation

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-03-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

--- Comment #4 from Mark Thomas  ---
Documentation is in trunk/webapps/docs

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-02-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

--- Comment #3 from Thomas Meyer  ---
Updated patch here: http://static.217.14.99.88.clients.your-server.de/401

Where can I find the source of the documentation. It seems to be in an
different repository?!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-02-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

Jeff Turner  changed:

   What|Removed |Added

 CC||j...@redradishtech.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-01-31 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

--- Comment #2 from Remy Maucherat  ---
About NIO2, this doesn't work as the code in System.inheritableChannel uses the
NIO API directly, but the API itself is "compatible" (an
AsynchronousServerSocketChannel will implement Channel). Odd that this was
never added (as a separate equivalent method). I think they forgot about this
stuff (I had no idea it existed personally).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60560] Support systemd/inetd style socket activation

2017-01-31 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60560

Mark Thomas  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Mark Thomas  ---
The patch assumes that there is only a single NIO endpoint. That assumption is
not valid. The patch needs to handle the multiple end-point case. That in turn
raises the question of how useful this feature is since it appears only to be
able to handle a single channel.

This feature is not compatible with NIO2. Nor is it compatible with APR/native.

The patch needs to be extended to enable configuration to be used to specify
which connector should use the inherited channel. I'd suggest either a new
configuration option called "useInheritedChannel" or a special value for
"address". My preference would be for a new option. It should be specific to
NIO.

Documentation is also required.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org