You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run systemctl daemon-reload, then stop Jenkins with systemctl stop jenkins.service and start the socket with systemctl start jenkins.socket. Confirm that Java is not running, then visit http://127.0.0.1 in your web browser.
Expected results
systemd should start jenkins.service, after which Java should be listening on port 80 and the browser's request should be satisfied, even though the service does not have the CAP_NET_BIND_SERVICE capability.
Actual results
The service does not consume the socket provided by systemd and cannot be reached on port 80.
Evaluation
Jetty supports this use case via ServerConnector#setInheritChannel(boolean), which delegates to System#inheritedChannel; however, Winstone provides no way to enable this Jetty functionality. If Winstone provided a command-line interface (CLI) to enable this functionality, plumbing through the user's choice to ServerConnector (e.g. in winstone.ServerConnectorBuilder), this use case could be supported.
What feature do you want to see added?
Steps to reproduce
Install Jenkins 2.335 or later, then create
/etc/systemd/system/jenkins.service.d/override.conf
withbut not
AmbientCapabilities=CAP_NET_BIND_SERVICE
. Also create the corresponding socket in/etc/systemd/system/jenkins.socket
withRun
systemctl daemon-reload
, then stop Jenkins withsystemctl stop jenkins.service
and start the socket withsystemctl start jenkins.socket
. Confirm that Java is not running, then visit http://127.0.0.1 in your web browser.Expected results
systemd
should startjenkins.service
, after which Java should be listening on port 80 and the browser's request should be satisfied, even though the service does not have theCAP_NET_BIND_SERVICE
capability.Actual results
The service does not consume the socket provided by
systemd
and cannot be reached on port 80.Evaluation
Jetty supports this use case via
ServerConnector#setInheritChannel(boolean)
, which delegates toSystem#inheritedChannel
; however, Winstone provides no way to enable this Jetty functionality. If Winstone provided a command-line interface (CLI) to enable this functionality, plumbing through the user's choice toServerConnector
(e.g. inwinstone.ServerConnectorBuilder
), this use case could be supported.Upstream changes
JETTY-496
The text was updated successfully, but these errors were encountered: