Red Hat Bugzilla – Bug 1269928
Reccomended Method of Changing Cockpit Port Results in Two Instances
Last modified: 2015-10-19 05:39:31 EDT
Description of problem:
It is necessary for some users to be able to change the port cockpit listens on if it interferes with other running services. The recommended method of doing this is detailed within the documentation: http://files.cockpit-project.org/guide/latest/listen.html#listen-systemd
This method is mean't to override the behaviour of the default cockpit.socket service. However this method results in dual instances of cockpit i.e. cockpit listens on the default port 9090 and also the newly specified one.
It is possible to achieve the desired effect by modifying the packaged systemd file here: /usr/lib/systemd/system/cockpit.service - this works but is ofcourse overwritten by package updates, which is ofcourse very inconvenient.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. $ mkdir /etc/systemd/system/cockpit.socket.d/
$ cat << EOF > /etc/systemd/system/cockpit.socket.d/listen.conf
$ sudo systemctl daemon-reload
$ sudo systemctl restart cockpit.socket
2. Browse to http://localhost:9090 - Confirm cockpit loads
3. Browse to http://localhost:9095 - Confirm cockpit loads
As above cockpit is listening on both ports and subsequently does not help with clearing ports for other services.
Cockpit should listen only on 9095 (based on the steps above).
Additionally when updating cockpit no rpmsave files are generated if you modify the core service /usr/lib/systemd/system/cockpit.service
Fixed and new documentation uploaded.