Forgot password request : upsteam timeout error

Ghost-CLI version: 1.13.1
Ghost version: 3.19.2

I’m trying to reset admin password and it doesn’t let me do that.
The request times out with following error that I could trace in nginx

 upstream timed out (110: Connection timed out) while reading response header from upstream, server:, request: "POST /ghost/api/v3/admin/authentication/passwordreset/ HTTP/2.0", upstream: "", host: "", referrer: ""

This used to work earlier. I am using mailgun to send emails and there is no reset password email sent via mailgun. Thinking it could be error in mailgun credentials, I have tried changing it to new credentials, same issue.

I don’t get any other info than this in ghost log
INFO "POST /ghost/api/v3/admin/authentication/passwordreset/" 200

Hi @sharma, did you make sure to restart Ghost after updating the configuration using ghost restart in your CLI?

Yes, I did @DavidDarnes

How can I debug this issue?

Sharing some info for clues
  • I have tried running ghost run; no info there other than that /passwordreset call returns 200 OK status.
  • The setup was done as per instructions here
  • On loading the admin sign in page, I see following error in console
Failed to load resource: the server responded with a status of 403 ()


{"errors":[{"message":"Authorization failed","context":"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.","type":"NoPermissionError","details":null,"property":null,"help":null,"code":null,"id":"37db6250-af8f-11ea-a462-41b6368b5ac6"}]}

Please help! I’m stuck here and this is quite urgent

You can try running ghost doctor to log out any possible issues? You could also compare your configuration with our docs:

@DavidDarnes No issues in ghost doctor. Everything checks out. I don’t find anything missing in configuration.

No solution yet. Please help!

May be worth updating to the latest version of Ghost to ensure no legacy bugs are present. This will also cause a restart which may help too

I have done that. Problem, not solved.

Ghost-CLI version: 1.14.1
Ghost version: 3.22.1 (at /var/www/ghost)

Please help, I don’t have admin access for quite long and not able to operate the blog at all because of this

If you can’t fix your mail config, you might want to try something like this: Lost password on local install with no mail config

Thank you. You saved my day. :pray:

Now I just need to figure out why my mails are not working although the credentials are correct, I don’t see any request received by by my email service provider(mailgun)

Update: It was an email misconfiguration. mail.transport option inside config.production.json was set to Direct, rather it should have been SMTP.

Thanks @fabien for the help.

1 Like