(2023-01-01) Can't Reset FluxGarden password

A user alerted me that he can't reset his FluxGarden password - he gets 502-Bad-Gateway. I try myself, get same issue. (It happens instantly, so there's not a timeout issue.)

Confirm db has records.

check logs in /var/log/nginx - error.log has

2023/01/01 19:36:58 [error] 1181616#1181616: *101968 upstream prematurely closed connection while reading response header from upstream, client: 107.140.56.189, server: flux.garden, request: "POST /user/forgot-password HTTP/1.1", upstream: "uwsgi://unix:///home/bill/uwsgi_sockets/wikiweb.socket:", host: "flux.garden"
2023/01/01 19:38:31 [error] 1181616#1181616: *101973 upstream prematurely closed connection while reading response header from upstream, client: 107.140.56.189, server: flux.garden, request: "POST /user/forgot-password HTTP/1.1", upstream: "uwsgi://unix:///home/bill/uwsgi_sockets/wikiweb.socket:", host: "flux.garden"

But all the logs in /var/log/uwsgi/wikiweb.log.* are empty

Checking this approach

  • my /etc/nginx/uwsgi_params has all generic stuff in it
  • don't see anything weird in the site config files

New idea: try work around the email. Is the hash for each user sticky?

Moving-forward options

  • keep pushing on 502 issue (ask friend)
  • find way to generate/log user's reset-hash
  • ??

Saw some bits about file permissions, which has bit me before. And those 0-byte log files are suspicious.... I notice those files have owner bill:bill, while the nginx logs have www-data:adm

  • read this piece - find that I have /etc/systemd/system/wikiweb.service and ~/wikiweb/wikiweb.service which are identical, and both user user/group bill:bill - I also notice that the log lines are commented out:
#StandardOutput=append:/var/log/uwsgi/wikiweb.log
##StandardError=append:/var/log/uwsgi/wikiweb.error
  • but those aren't even the names of the log files - the names are access.log and error.log

Jan03

  • uwsgi wasn't logging, had to restart with systemd
  • then yes it turned out the issue is emailing - see old Jun04 notes at (2020-10-12) Building user management in WikiFlux
  • it looks like need to go back to using smtp.gmail.com
    • didn't help, changed back to smtp.googlemail.com
  • also think I changed my email password, and didn't update it here!
  • change it in envfile_service, but it still doesn't help
  • flask_mail.py is in /usr/local/lib/python3.8/dist-packages/
    • how did I log more last time?
  • ah maybe had to turn "less secure apps" back to On

Edited:    |       |    Search Twitter for discussion