st2: Ports for api and authentication services can't be changed

Hi, I’m trying to change the port for authentication module with no luck, the port remains on ‘9100’ . After the change I did also st2ctl restart.

I tried to edit this section, with new port 9109

[auth]
port = 9109
host = 0.0.0.0
use_ssl = True

Stackstrom process still listens on 9100 port

tcp        0      0 127.0.0.1:9100          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:9101          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:9102          0.0.0.0:*               LISTEN

I checked also the api and it’s the same issue.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

It’s possible to use systemd generators to create the .socket file contents dynamically from st2.conf.

An update to st2ctl service restarts would be required to perform a systemctl daemon-reload. This is needed to execute the generators to read any potential changes made to st2.conf.

This solution would mean st2.conf becomes authoritative for st2api, st2auth and st2stream for the bind and port configuration. This would make configuration more intuitive for users. I expect it would resolve this issue as well as #686 and #2676, since all supported OS’ are now based on systemd.

I was having this issue with CentOS 7 and fixed it this way:

  1. Edit /usr/lib/systemd/system/st2api.socket Change ListenStream=127.0.0.1:9101 to ListenStream=0.0.0.0:9101

  2. Reload systemd # systemctl daemon-reload

  3. Reload st2api # st2ctl restart-component st2api

  4. Check to see if it’s re-bound

# ss -lnt | grep 9101
LISTEN     0      128          *:9101                     *:*