xrmx / uwsgitop

top-like app for monitoring uWSGI instances

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execute the command "uwsgitop uwsgi/uwsgi.status" and "ConnectionRefusedError: [Errno 111] Connection refused" appears.

sky-chy opened this issue · comments

Execute the command "uwsgitop uwsgi/uwsgi.status" to monitor my web performance status, the following problems occur:
"Traceback (most recent call last):
   File "/webSite/ProjectVenv/CHYBlog/bin/uwsgitop", line 331, in
     Main()
   File "/webSite/ProjectVenv/CHYBlog/bin/uwsgitop", line 166, in main
     S.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused

what should I do

uwsgitop version is 0.11

You should point uwsgitop to the right uwsgi stats socket

I also tried to point stats to 127.0.0.1:9000, but the same error still occurred.

However, when "uwsgi/uwsgi.status", I execute the command "uwsgi --connect-and-read uwsgi/uwsgi.status " on the server, or when "127.0.0.1:9000< /stats>", I executed the command "uwsgi --connect-and-read 127.0.0.1:9000" on the server, and the terminal prompts me "uwsgi_connect(): Connection refused [core/uwsgi.c line 4926]",Is this my server configuration is not set?

I changed the ".status" suffix of the file "uwsgi.status" to ".socket", then restarted the server and restarted the project. It miraculously executed "uwsgitop uwsgi/uwsgi. socket"....

For anyone else getting the Connection refused, the issue for me was that I had master = false in my .ini configuration. It must be true to enable the advanced logging features i.e. stats.

In my case, the extension of the socket file has to be .socket. Otherwise, it raises ConnectionRefusedError: [Errno 111] Connection refused.