No longer seeing .../finish-installation/register

AI-generated summary

tophee reported that after pausing a Discourse installation to set up WordPress, the /finish-installation/register page returned a “page doesn’t exist” error upon returning, though the wizard redirected to the welcome post. The issue was resolved after a server reboot. tophee confirmed the fix but sought an explanation.

ento provided a detailed theory supported by database logs, suggesting that a daily backup created a system message. This action updated the system user record, which inadvertently cleared the flag required to display the installation screen. Consequently, the controller returned an error because the flag was missing. The reboot likely reset this flag because the system user was the only admin present. codinghorror asked for validation, and eviltrout confirmed the analysis was likely correct and pointed to a fix implemented in the codebase to prevent this race condition.

I installed discourse yesterday but stopped the process at the …/finish-installation/register screen because I wanted to go ahead and install wordpress first. Today I wanted to come back to disourse and finish the installation but http://forum.mydomain.net/finish-installation/register now gives me “Oops! That page doesn’t exist or is private.” Should I just register via the “Signup” button or is that a different process?

I am assuming that this has nothing to do with the issue described here because I originally did see the finish-installation screen and because the issue has been fixed in december.

I also tried http://forum.mydomain.net/wizard but that brought me to the dafault welcome post.

Problem solved: the finish-installation page reappeared after I rebooted the droplet.

If someone can explain what happened, please do (always keen to understand).

This happened to me too. Here’s my theory:

  • Discourse performed its daily backup sometime before you came back to finish the installation.

  • A successful backup creates a system message.

  • Creating a system message updates the user record for the Discourse system user.

  • Updating a system user, who is an admin, clears the flag to show the installation screen.

  • If the flag is not set, /finish-installation/register displays an “Oops! That page doesn’t exist or is private” page.

  • Rebooting the server instance sets the flag again if there is only one admin user, which is the system user at this point.

Log of database sleuthing I did:

“The backup was successful” message:

discourse=> select created_at, updated_at, substring(raw, 0, 25) from posts order by id desc limit 1;
-[ RECORD 1 ]-------------------------
created_at | 2017-02-11 03:38:05.02299
updated_at | 2017-02-11 03:38:05.02299
substring  | The backup was successfu

System user’s last_posted_at and updated_at:

(not sure about the three-second gap)

discourse=> select created_at, updated_at, last_posted_at from users where id=-1;
-[ RECORD 1 ]--+---------------------------
created_at     | 2017-02-09 09:31:23.724877
updated_at     | 2017-02-11 03:38:08.296426
last_posted_at | 2017-02-11 03:38:05.02299

has_login_hint’s updated_at:

discourse=> select updated_at from site_settings where name='has_login_hint';
-[ RECORD 1 ]--------------------------
updated_at | 2017-02-11 03:38:08.304158

Is this plausible @eviltrout?

This is some great detective work and I think the likely cause of this issue.

This should fix it:

https://github.com/discourse/discourse/commit/e1d358ffbf8550686bd415604899ed35f82fb6a2