HTTP stats - unable to get uWSGI statistics
EffectShapiro opened this issue · comments
Cyril commented
OS : Debian 11 ( bullseye )
uWSGI version : 2.0.19.1-7.1
app configuration
[uwsgi]
module = test:create_app()
master = true
enable-threads = true
processes = 1
listen = 800
thunder-lock = true
lazy-apps = true
no-orphans = true
die-on-term = true
stats = 127.0.0.1:9191
plugin = python3
socket = /run/uwsgi/app/test/socket
chmod-socket = 600
uid = www-data
gid = www-data
vacuum = true
log-4xx = True
log-5xx = True
py-tracebacker = /tmp/tbsocket
Then when trying to use uwsgitop
$ uwsgitop http://127.0.0.1:9191
Traceback (most recent call last):
File "/usr/local/bin/uwsgitop", line 162, in main
r = urllib2.urlopen(addr)
File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/usr/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/lib/python3.9/urllib/request.py", line 1375, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.9/urllib/request.py", line 1350, in do_open
r = h.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 289, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: {
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/uwsgitop", line 331, in <module>
main()
File "/usr/local/bin/uwsgitop", line 179, in main
raise Exception("unable to get uWSGI statistics")
Exception: unable to get uWSGI statistics
Riccardo Magliocchetti commented
@EffectShapiro please read the README
Ryan Bagwell commented
You're trying to connect to the stats server over http without stats-http = true
in your ini file.
Also I believe stats = 127.0.0.1:9191
should just have the port, i.e. stats = :9191
according to the readme, but I'm not sure if that matters