saltstack / saltstack/salt

[Bug]: API call /events show only python exception in 3008.2

Open
#69,958 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

What happened?

Observed in 3008.2 but not in 3006.x/3007.x. 3008.0/3008.1/3008.1-1/3008.1-2 are too broken to even investigate.

API: http://localhost2:45852/events?token=78f34d0801440907eded4a0b3f42b1a2035e6a12
This uses a valid token. But the result is the same when using an invalid session token.

Unrecoverable error in the server.
Traceback (most recent call last):
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 236, in __init__
    self.run()
    ~~~~~~~~^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 338, in run
    request.run(meth, path, qs, rproto, headers, rfile)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cprequest.py", line 622, in run
    self.respond(pi)
    ~~~~~~~~~~~~^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cprequest.py", line 659, in respond
    self._do_respond(path_info)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cprequest.py", line 698, in _do_respond
    self.hooks.run('on_start_resource')
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cprequest.py", line 95, in run
    self.run_hooks(iter(sorted(self[point])))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cprequest.py", line 117, in run_hooks
    hook()
    ~~~~^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cprequest.py", line 66, in __call__
    return self.callback(**self.kwargs)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/netapi/rest_cherrypy/app.py", line 674, in html_override_tool
    raise cherrypy.InternalRedirect(apiopts.get("app_path", "/app"))
cherrypy._cperror.InternalRedirect: ('/app', '')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 185, in trap
    return func(*args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 106, in __call__
    return self.nextapp(environ, start_response)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 431, in tail
    return self.response_class(environ, start_response, self.cpapp)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 270, in __init__
    self.close()
    ~~~~~~~~~~^^
  File "/opt/saltstack/salt/lib/python3.14/site-packages/cherrypy/_cpwsgi.py", line 291, in close
    if streaming and is_closable_iterator(self.iter_response):
                                          ^^^^^^^^^^^^^^^^^^
AttributeError: 'AppResponse' object has no attribute 'iter_response'

FYI: salt-run state.event pretty=True works fine

Type of salt install

Official deb

Major version

3008.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

debian-13

salt --versions-report output
Salt Version:
          Salt: 3008.2
 
Python Version:
        Python: 3.14.6 (main, Jun 11 2026, 02:19:05) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 2.0.0
      cherrypy: 18.10.0
  cryptography: 48.0.0
      dateutil: 2.9.0.post0
     docker-py: Not Installed
         gitdb: 4.0.12
     gitpython: 3.1.50
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.1.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 3.00
      pycrypto: Not Installed
  pycryptodome: 3.23.0
        pygit2: Not Installed
  python-gnupg: 0.5.6
        PyYAML: 6.0.3
         PyZMQ: 27.1.0
        relenv: 0.22.14
         smmap: 5.0.2
       timelib: 0.3.0
       Tornado: 6.5.7
           ZMQ: 4.3.5
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: debian 13.6 trixie
        locale: utf-8
       machine: x86_64
       release: 6.12.96+deb13-amd64
        system: Linux
       version: Debian GNU/Linux 13.6 trixie

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in salt/netapi/rest_cherrypy/app.py at html_override_tool, then reproduce the /events request with valid and invalid session tokens on Salt 3008.2. Compare the result with salt-run state.event pretty=True; done means the /events API no longer produces the shown AppResponse/iter_response AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.