Unable to Login / Register Under 4.3.3

Hi there,

I’m currently unsure is there an issue with my Ghost or with the recent update to 4.3.3. Currently, this current version of Ghost, I am unable to Sign in to an existing account or register for a new free account. Hope someone can assist. Thank you so much!

And

  • How was Ghost installed and configured? - Ubuntu > Ghost-CLI > Ghost 4.3.3
  • What Node version, database, OS & browser are you using?
  • Node v14.16.1
  • MySQL Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64
  • OS macOS Catalina 10.15.7
  • Chrome 90.0.4430.93 (Official Build) (x86_64)

Hi there,

Was wondering if anyone can further assist me on this issue as 4 days had passed and the problem still persist. Hope someone can help. Thank you!

Below is a screen shot of me trying to Sign up but was faced with the error, same goes to trying to login. Please help!

I was able to solve this by setting up Mailgun following this

But you still need to add the host key to your /var/www/ghost/config.production.json to make everything work

"mail": {
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "host": "smtp.eu.mailgun.org",
    "auth": {
      "user": "postmaster@example.mailgun.org",
      "pass": "1234567890"
    }
  }
},

You can find the correct host in your Mailgun Dashboard

After this is done, head over to the settings in your ghost admin interface to set the correct API


Make sure you use the Private API key from Mailgun

Please let me know if this helped

Hi @waterslide ,

My apologies it took me so long to reply as there wasn’t any notification received in my email regarding the update.

I have made time to try the solution out. Sadly, I am still faced with the same issue, even though I have updated Ghost to 4.5.0 and the entire setup. I’ve also restarted the entire server.

Thankfully, currently, sending emails to the newsletters does work.

Kinda lost at what to do next. Any side tips?

1 Like

If newsletters are working but signup isn’t then your transactional email config in config.production.json is likely incorrect. There may be more clues as to what exactly is wrong in your site’s logs.

Hi @Kevin ,

May I enquire which parameters I should be looking to alter / change for config.production.json as I have look through Configuration - Adapt your publication to suit your needs , and my current file contains the following parameters:

  • url
  • server
  • database
  • storage
  • mail
  • logging
  • process
  • paths

Just to provide additional context, my “Mail” setting is as follows:

"mail": {
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "host": "smtp.mailgun.org",
    "port": 587,
    "secureConnection": true,
    "auth": {
      "user": "***", // Taken from Mailgun SMTP > Username
      "pass": "***" // Taken from Mailgun SMTP > Default Password
  }
}

},

My current logging code is as such, so I’m unsure how to access my logs to review the issue as well:

"logging": {
    "transports": [
      "file",
      "stdout"
    ]
},

Hope you can help shed some light on where I can relook into the matter. Thank you!

I have the same Mailgun config as yours. However with two differences:

"host": "smtp.eu.mailgun.org",
"secureConnection": false

It works for me only when secureConnection is false (hosting on Digital Ocean, using Cloudflare if it matters).

1 Like

Hi guys,

Just a current update. Took me a long while to find a way into accessing the logs.

Here are two of the latest errors I can find:
1.

  • “code”:“ECONNREFUSED”
  • “message”:“connect ECONNREFUSED 127.0.0.1:3306”
  • “stack”:“Error: connect ECONNREFUSED 127.0.0.1:3306\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)\n --------------------\n at Protocol._enqueue (/var/www/ghost/versions/4.5.0/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at Protocol.handshake (/var/www/ghost/versions/4.5.0/node_modules/mysql/lib/protocol/Protocol.js:51:23)\n at Connection.connect (/var/www/ghost/versions/4.5.0/node_modules/mysql/lib/Connection.js:116:18)\n at /var/www/ghost/versions/4.5.0/node_modules/knex/lib/dialects/mysql/index.js:68:18\n at new Promise ()\n at Client_MySQL.acquireRawConnection (/var/www/ghost/versions/4.5.0/node_modules/knex/lib/dialects/mysql/index.js:63:12)\n at create (/var/www/ghost/versions/4.5.0/node_modules/knex/lib/client.js:290:39)”}
  • “msg”:“connect ECONNREFUSED 127.0.0.1:3306”

2.

  • “code”:“ERR_SSL_WRONG_VERSION_NUMBER”
  • “name”:“EmailError”
  • “statusCode”:500
  • level":“normal”
  • “message”:“Failed to send email. Reason: 140026868381568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.”
  • “help”:"“Please see Configuration - Adapt your publication to suit your needs for instructions on configuring email.”"
  • “stack”:“EmailError: Failed to send email. Reason: 140026868381568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.\n at EmailError.GhostError (/var/www/ghost/versions/4.5.0/node_modules/@tryghost/errors/lib/errors.js:10:26)\n at new EmailError (/var/www/ghost/versions/4.5.0/node_modules/@tryghost/errors/lib/errors.js:34:20)\n at createMailError (/var/www/ghost/versions/4.5.0/core/server/services/mail/GhostMailer.js:52:12)\n at MailComposer.returnCallback (/var/www/ghost/versions/4.5.0/core/server/services/mail/GhostMailer.js:95:28)\n at SMTPConnectionPool._onConnectionError (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/pool.js:334:17)\n at SMTPClient.emit (events.js:315:20)\n at SMTPClient.EventEmitter.emit (domain.js:467:12)\n at SMTPClient._onError (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/client.js:373:10)\n at TLSSocket.emit (events.js:315:20)\n at TLSSocket.EventEmitter.emit (domain.js:467:12)\n at emitErrorNT (internal/streams/destroy.js:106:8)\n at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n at processTicksAndRejections (internal/process/task_queues.js:80:21)\n\nError: 140026868381568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n”}
  • “msg”:“Failed to send email. Reason: 140026868381568:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n.”

Not too sure if any of you might have some idea where I may head to next to fix this?

Do I need to do a forced-reinstall of my Ghost SSL?

Can you try changing secureConnection to false? That will let the initial connection occur then use the TLS handshake work out the SSL versions.

Hi @Kevin ,

I’ve just tried changing the secureConnection to false, and restarted Ghost. Sadly the problem still currently persists.

However, there is a new error shown:

  • “code”:null
  • “name”:“EmailError”
  • “statusCode”:500
  • “level”:“normal”
  • “message”:“Failed to send email. Reason: Data command failed - 421 Domain sandboxfed***.mailgun.org is not allowed to send: Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings…”
  • “help”:"“Please see Configuration - Adapt your publication to suit your needs for instructions on configuring email.”"
  • “stack”:“EmailError: Failed to send email. Reason: Data command failed - 421 Domain sandboxfed***.mailgun.org is not allowed to send: Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings…\n at EmailError.GhostError (/var/www/ghost/versions/4.5.0/node_modules/@tryghost/errors/lib/errors.js:10:26)\n at new EmailError (/var/www/ghost/versions/4.5.0/node_modules/@tryghost/errors/lib/errors.js:34:20)\n at createMailError (/var/www/ghost/versions/4.5.0/core/server/services/mail/GhostMailer.js:52:12)\n at MailComposer.returnCallback (/var/www/ghost/versions/4.5.0/core/server/services/mail/GhostMailer.js:95:28)\n at SMTPConnectionPool._onConnectionError (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/pool.js:334:17)\n at SMTPClient.emit (events.js:315:20)\n at SMTPClient.EventEmitter.emit (domain.js:467:12)\n at SMTPClient._onError (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/client.js:373:10)\n at SMTPClient._actionDATA (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/client.js:1075:14)\n at SMTPClient._onData (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/client.js:354:29)\n at TLSSocket.emit (events.js:315:20)\n at TLSSocket.EventEmitter.emit (domain.js:467:12)\n at addChunk (internal/streams/readable.js:309:12)\n at readableAddChunk (internal/streams/readable.js:284:9)\n at TLSSocket.Readable.push (internal/streams/readable.js:223:10)\n at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)\n\nError: Data command failed - 421 Domain sandboxfed***.mailgun.org is not allowed to send: Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings.\n at SMTPClient._actionDATA (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/client.js:1075:23)\n at SMTPClient._onData (/var/www/ghost/versions/4.5.0/node_modules/simplesmtp/lib/client.js:354:29)\n at TLSSocket.emit (events.js:315:20)\n at TLSSocket.EventEmitter.emit (domain.js:467:12)\n at addChunk (internal/streams/readable.js:309:12)\n at readableAddChunk (internal/streams/readable.js:284:9)\n at TLSSocket.Readable.push (internal/streams/readable.js:223:10)\n at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)”}
  • “msg”:“Failed to send email. Reason: Data command failed - 421 Domain sandboxfed***.mailgun.org is not allowed to send: Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings…”

Based on the error, it does looks like the likely solution is I have to pay for the upgraded plan. May I check is there no other alternative to setting up something that has low-to-zero fees at the moment? Given that the Mailgun system is expecting a monthly expenditure, which is really not something I am looking to pay more given that I had thought that the basic mailer should work just fine with the baseline installation of Ghost, and not needing me to spend more just to allow the basic “Subscription / Sign Up” system.

Hope this new error can help shed some light on which direction I may head to to solve this persistent problem. Thank you.

Mailgun is free for the fairly small number of transactional email that will be sent for small sites, you can add your domain to a free account to get out of a sandbox which is what the error refers too.

Otherwise you can use any transactional email provider you want, Mailgun is only required for sending bulk email to members. Mailgun can be free for that too if you don’t have tons of members and email infrequently.

Hi @Kevin ,

Apparently the current “Free” plan is a first 3-month Trial. There is no longer perm Free plans, sad to say. The “Free Trail” account currently only allows the creation of “Sandbox” emails, and not allow any attachment of domain-names related to the website, which may help curb this error issue.

Once the credit card details is in, the “Trial” account will immediately end to start charging for every email sent. Given that my website is still undergoing works, potential emails sent will potentially be chargeable and being a brand new site, these “additional costs” is unnecessary, especially Mailgun’s unclear price tag for its “Pay as You Go” package.

Oddly enough, I have found out from another thread (Which I have currently lost the link), that DigitalOcean does have problems allowing for “Direct” email sending, thus using the default Ghost email send function might be a problem and I would sadly have to rely on third-party providers.

Would hope there is a potential solution with SendGrid instead, as I have used them for a few years and their “Free” plans are a viable solution for new blog sites like mine where their first Free tier is a lifetime option. However, may I enquire is it a potential feasible option as compared to Mailgun?

Hope you can share some of your knowledge on that. Thank you!

The card requirement is to stop spammers which is why you need to enter one to be able to set up a domain. The “free” plan is a pay-per-use plan where for the first three months you get an additional 5000 emails/month on top of the basic 1250 allowance. After the three months you can send 1250 emails per month for free, if you go over the free allowance it will cost at minimum $1 for the month plus $0.0008/email for any additional emails sent. How does PAYG billing work? – Mailgun Help Center

For transactional emails - invite staff user, forgotten password, member sign-in/up, etc - sendgrid will work fine. For sending bulk email (newsletters) to members only Mailgun is supported.

DigitalOcean does have problems allowing for “Direct” email sending, thus using the default Ghost email send function might be a problem and I would sadly have to rely on third-party providers.

That’s the case for pretty much any hosting provider but especially when using a VPS. The default direct-mail fallback is a last-ditch attempt at being able to send email and is not really expected to work. Even if there is a local mail system set up for “direct mail” to use it’s very unlikely for emails from it to pass through spam checks.

Hi @Kevin ,

Thank you for the detailed clarifications! It really helped to move forward to “Upgrade” the Mailgun account to get an authenticated domain added.

Once that is done, now the Register + Login works perfectly fine. Probably I would suggest to include “the need to upgrade the account + register with a valid domain name”, into the config docs to help new people like myself get a better lead-way with their brand new Ghost setup!

Really appreciate the patience and help for this! Thank you everyone as well!

1 Like