erwindon/SaltGUI

Unable to start SaltGUI

phanos-engineer opened this issue · 4 comments

Describe the bug
I installed everything following the instruction. I can't access the web interface on the port

To Reproduce

  • Install salt-stack on Fedora 37.
  • Install SaltGUI from github
  • modify /etc/salt/master according to instructions
  • restart salt-master and salt-api

/etc/salt/master

auto_accept: True
external_auth:
  pam:
      saltadmin:
          - .*
          - '@runner'
          - '@wheel'
          - '@jobs'


rest_cherrypy:
  port: 3333
  host: 0.0.0.0
  disable_ssl: true
  app: /opt/SaltGUI-1.28.0/saltgui/index.html
  static: /opt/SaltGUI-1.28.0/saltgui/static
  static_path: /static

Expected behaviour
expected UI on http://my.ip.addr:3333

Additional context
When starting salt-master I get [ERROR ] ReqServer clients tcp://0.0.0.0:4506 but the minions are able to connect.

# salt-master --version
/usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
salt-master 3005.1
# systemctl status salt-api
● salt-api.service - The Salt API
     Loaded: loaded (/usr/lib/systemd/system/salt-api.service; enabled; preset: disabled)
     Active: active (running) since Tue 2023-01-17 15:33:01 EST; 5s ago
       Docs: man:salt-api(1)
             file:///usr/share/doc/salt/html/contents.html
             https://docs.saltproject.io/en/latest/contents.html
   Main PID: 6948 (salt-api)
      Tasks: 103 (limit: 4539)
     Memory: 84.0M
        CPU: 1.735s
     CGroup: /system.slice/salt-api.service
             ├─6948 /usr/bin/python3 -P /usr/bin/salt-api
             └─6953 /usr/bin/python3 -P /usr/bin/salt-api

Jan 17 15:33:01 testsrvr systemd[1]: Starting salt-api.service - The Salt API...
Jan 17 15:33:01 testsrvr salt-api[6948]: /usr/lib/python3.11/site-packages/_distutils_hack/__ini>
Jan 17 15:33:01 testsrvr salt-api[6948]:   warnings.warn("Setuptools is replacing distutils.")
Jan 17 15:33:01 testsrvr systemd[1]: Started salt-api.service - The Salt API.
# systemctl status salt-master
● salt-master.service - The Salt Master Server
     Loaded: loaded (/usr/lib/systemd/system/salt-master.service; enabled; preset: disabled)
     Active: active (running) since Tue 2023-01-17 15:24:20 EST; 10min ago
       Docs: man:salt-master(1)
             file:///usr/share/doc/salt/html/contents.html
             https://docs.saltproject.io/en/latest/contents.html
   Main PID: 5734 (salt-master)
      Tasks: 31 (limit: 4539)
     Memory: 370.1M
        CPU: 13.057s
     CGroup: /system.slice/salt-master.service
             ├─5734 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5867 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5868 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5871 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5872 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5873 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5874 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5875 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5882 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5884 /usr/bin/python3 -P /usr/bin/salt-master
             ├─5886 /usr/bin/python3 -P /usr/bin/salt-master
             └─7115 /usr/bin/python3 -P /usr/bin/salt-master

Jan 17 15:24:19 testsrvr systemd[1]: Starting salt-master.service - The Salt Master Server...
Jan 17 15:24:20 testsrvr salt-master[5734]: /usr/lib/python3.11/site-packages/_distutils_hack/__>
Jan 17 15:24:20 testsrvr salt-master[5734]:   warnings.warn("Setuptools is replacing distutils.")
Jan 17 15:24:20 testsrvr systemd[1]: Started salt-master.service - The Salt Master Server.
Jan 17 15:24:24 testsrvr salt-master[5873]: [ERROR   ] ReqServer clients tcp://0.0.0.0:4506
Jan 17 15:24:24 testsrvr salt-master[5873]: [ERROR   ] ReqServer workers ipc:///var/run/salt/mas>

The error from salt-master seems common as it is in my logfile too:

2023-01-08 03:04:12,600 [salt.transport.zeromq:328 ][ERROR ][356634] ReqServer clients tcp://0.0.0.0:4506
2023-01-08 03:04:12,600 [salt.transport.zeromq:330 ][ERROR ][356634] ReqServer workers ipc:///var/run/salt/master/workers.ipc

are you able to use regular salt commands?

Yes, I'm able to connect to the minions.

Here is the detailed debug log of the salt-master

salt-master.log

And here is the config for master /etc/salt/master

auto_accept: True

external_auth:
  pam:
      saltadmin:
          - .*
          - '@runner'
          - '@wheel'
          - '@jobs'


rest_cherrypy:
  port: 8000
  host: 10.52.94.11
  disable_ssl: true
  app: /opt/SaltGUI-1.28.0/saltgui/index.html
  static: /opt/SaltGUI-1.28.0/saltgui/static
  static_path: /static

saltgui_templates:
    template1:
        description: First template
        target: "*"
        command: test.fib num=10
        category: cat1
    template2:
        description: Second template
        targettype: glob
        target: dev*
        command: test.version
        categories:
            - cat1
            - cat2
saltgui_hide_jobs:
    - test.ping

the rest_cherry port has changed between the original request and the latest comment. earlier it was 3333, now it is 8000. I assume you reinstalled with some different values?

is 'saltadmin' a regular user that you can also use to login normally?

what happens when you connect to the rest_cherry address+port with a browser?

  • does any kind of content show?
  • does any error show? not found? unreachable? timeout? etc...
  • does the login page become visible?
  • does the login process fail? if so how?
    in short: how far in the connect/login process do you actually get?

@phanos-engineer
closing this question after 2 weeks without response
feel free to re-open this issue when there are further questions