I had some hiccups during my backup restoration due to the macOS .tar download but got it to work. Site is live at forum.imaginerio.org with the old posts and all, but I can’t login neither with the admin account I configured during deploy nor with my old forum credentials. In my browser I’m currently getting
Oops
The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience.
Detailed information about the error was logged, and an automatic notification generated. We'll take a look at it.
No further action is necessary. However, if the error condition persists, you can provide additional detail, including steps to reproduce the error, by posting a discussion topic in the site's feedback category.
but it loads on a private window. Connecting with Google gives Something went wrong, maybe this email has already been used, connecting with Github gives the error above. Tried the forgot password link but no email arrives, whereas the test email sent by discourse-doctor arrives successfully.
Are there any logs I can check or other operations to perform in the running container?
This was previously a hosted instance from which I downloaded a backup and am now hosting it myself, not sure if it could be related.
After using my brain for a bit I came to the conclusion it is because I never configured Google/Github login on my self-hosted instance, can anyone confirm? If so, is this doable via console?
Thanks Michael. I can get to the same point you did, but if you actually try to create an account it will tell you something went wrong and maybe this email is already registered (which is not the case). I tried the backdoor login and although it says ‘email sent’ nothing arrives in my inbox (again, discourse-doctor’s test email does). I remember I had emails turned off for non-team members for some reason, but the email I’m using is definitely team.
I haven’t cancelled my subscription yet. If this can be solved with a new/different admin account and configs, do you think customer support could help me out?
This forum was restored from a hosted site, for which the subscription is still active. The hosted one isn’t publicly accessible since I’m using the same domain, but I suppose it is still running? I’m suggesting this based on the feeling I’m locked out due to a bad config that could be reverted, then exporting and restoring a new backup.
This feels like it almost worked. I was able to create the admin account, but trying to log in gives ‘unknown error’ (and 500 on the console). I tried asking for a login link and the email arrived succesfully, but then again:
Parameters: {"slug"=>"en-narratives-about", "topic_id"=>"96"}
Completed 500 Internal Server Error in 23ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started GET "/t/en-narratives-about/96.json" for 34.127.96.150 at 2025-01-24 19:47:25 +0000
Processing by TopicsController#show as JSON
This slug shows up in the nginx/access.log as well:
Not much noteworthy other than that, except maybe the confirmation for my admin:create in /log/var-log:
2025-01-24T19:20:57.703680+00:00 ip-172-26-4-15-app sudo: root : TTY=pts/1 ; PWD=/var/www/discourse ; USER=discourse ; COMMAND=/usr/local/bin/bundle exec bin/rake admin:create
2025-01-24T19:20:57.704316+00:00 ip-172-26-4-15-app sudo: pam_limits(sudo:session): Could not set limit for 'core' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
2025-01-24T19:20:57.704421+00:00 ip-172-26-4-15-app sudo: pam_unix(sudo:session): session opened for user discourse(uid=1000) by (uid=0)
2025-01-24T19:21:59.096268+00:00 ip-172-26-4-15-app sudo: pam_unix(sudo:session): session closed for user discourse
2025-01-24T19:25:01.326841+00:00 ip-172-26-4-15-app CRON[116983]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
2025-01-24T19:25:01.340674+00:00 ip-172-26-4-15-app CRON[116983]: pam_unix(cron:session): session closed for user root
{
"errors": [
"A URL ou recurso pedido não pôde ser encontrada."
],
"error_type": "not_found",
"extras": {
"title": "Página não encontrada",
"html": "\n\n\n\n\u003Cdiv class=\"page-not-found\"\u003E\n \u003Ch1 class=\"title\"\u003EOops! Essa página não existe ou é privada.\u003C/h1\u003E\n\n \u003Ca href=\"/login\" class='btn btn-primary'\u003E\u003Csvg class=\"fa d-icon svg-icon svg-node\" aria-hidden=\"true\"\u003E\u003Csvg id=\"user\" viewBox=\"0 0 448 512\"\u003E\n \u003Cpath d=\"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z\"/\u003E\n\u003C/svg\u003E\u003C/svg\u003E\nEntrar\u003C/a\u003E\n\n\u003C/div\u003E\n\n\n\n\u003Cdiv class=\"row page-not-found-topics\"\u003E\n \u003Cdiv class=\"recent-topics\"\u003E\n \u003Ch2 class=\"recent-topics-title\"\u003ERecente\u003C/h2\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/topografia-do-rio-antigo-heightmap/152\"\u003ETopografia do Rio antigo (Heightmap)\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/imaginerio/9'\u003E\u003Cspan data-category-id='9' style='--category-badge-color: #25AAE2; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Aqui você pode conversar sobre o imagineRio.'\u003E\u003Cspan class='badge-category__name'\u003EimagineRio\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/titulo-e-localizacao-nao-correspondem/149\"\u003ETítulo e Localização não correspondem\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/imaginerio/9'\u003E\u003Cspan data-category-id='9' style='--category-badge-color: #25AAE2; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Aqui você pode conversar sobre o imagineRio.'\u003E\u003Cspan class='badge-category__name'\u003EimagineRio\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/imagens-que-nao-correspondem-a-localizacao-no-mapa/148\"\u003EImagens que não correspondem a localização no mapa\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/features/12'\u003E\u003Cspan data-category-id='12' style='--category-badge-color: #0088CC; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você gostaria de mais opções no nosso mapa? Crie um novo tópico e preencha os dados solicitados para sugerir uma melhoria.'\u003E\u003Cspan class='badge-category__name'\u003ESugerir melhoria\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/problema-no-login/143\"\u003EProblema no Login\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/bugs/10'\u003E\u003Cspan data-category-id='10' style='--category-badge-color: #0E76BD; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você encontrou algum problema no nosso mapa? Crie um novo tópico e preencha os dados solicitados para relatar um problema.'\u003E\u003Cspan class='badge-category__name'\u003EReportar problema\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/add-the-complete-collection-of-jean-baptiste-debret/134\"\u003EAdd the complete collection of Jean-Baptiste Debret\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/features/12'\u003E\u003Cspan data-category-id='12' style='--category-badge-color: #0088CC; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você gostaria de mais opções no nosso mapa? Crie um novo tópico e preencha os dados solicitados para sugerir uma melhoria.'\u003E\u003Cspan class='badge-category__name'\u003ESugerir melhoria\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/publicacao-de-conteudo-do-youtube/131\"\u003EPublicação de conteúdo do Youtube\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/features/12'\u003E\u003Cspan data-category-id='12' style='--category-badge-color: #0088CC; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você gostaria de mais opções no nosso mapa? Crie um novo tópico e preencha os dados solicitados para sugerir uma melhoria.'\u003E\u003Cspan class='badge-category__name'\u003ESugerir melhoria\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/bug-na-marcacao-nos-mapas/130\"\u003EBug na marcação nos mapas\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/bugs/10'\u003E\u003Cspan data-category-id='10' style='--category-badge-color: #0E76BD; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você encontrou algum problema no nosso mapa? Crie um novo tópico e preencha os dados solicitados para relatar um problema.'\u003E\u003Cspan class='badge-category__name'\u003EReportar problema\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/copiar-colar-a-posicao-do-mapa/129\"\u003ECopiar/colar a posição do mapa\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/features/12'\u003E\u003Cspan data-category-id='12' style='--category-badge-color: #0088CC; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você gostaria de mais opções no nosso mapa? Crie um novo tópico e preencha os dados solicitados para sugerir uma melhoria.'\u003E\u003Cspan class='badge-category__name'\u003ESugerir melhoria\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/technical-issue-with-image-server/128\"\u003ETechnical issue with image server\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/bugs/10'\u003E\u003Cspan data-category-id='10' style='--category-badge-color: #0E76BD; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você encontrou algum problema no nosso mapa? Crie um novo tópico e preencha os dados solicitados para relatar um problema.'\u003E\u003Cspan class='badge-category__name'\u003EReportar problema\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Cdiv class='not-found-topic'\u003E\n \u003Ca href=\"/t/narrativas-problemas-de-acesso-a-plataforma/125\"\u003ENarrativas: Problemas de acesso à plataforma\u003C/a\u003E\u003Ca class='badge-category__wrapper ' href='/c/bugs/10'\u003E\u003Cspan data-category-id='10' style='--category-badge-color: #0E76BD; --category-badge-text-color: #FFFFFF;' data-drop-close='true' class='badge-category ' title='Você encontrou algum problema no nosso mapa? Crie um novo tópico e preencha os dados solicitados para relatar um problema.'\u003E\u003Cspan class='badge-category__name'\u003EReportar problema\u003C/span\u003E\u003C/span\u003E\u003C/a\u003E\n \u003C/div\u003E\n \u003Ca href=\"/latest\" class=\"btn btn-default\"\u003EMais…\u003C/a\u003E\n \u003C/div\u003E\n\u003C/div\u003E\n\n\n \u003Cdiv class=\"row\"\u003E\n \u003Cdiv class=\"page-not-found-search\"\u003E\n \u003Cform action='/search' id='discourse-search'\u003E\n \u003Clabel for=\"search-input\"\u003EPesquisar neste site\u003C/label\u003E\n \u003Cinput type=\"text\" id=\"search-input\" name=\"q\" value=\"en narratives about\"\u003E\n \u003Cbutton class=\"btn btn-primary\"\u003EPesquisar\u003C/button\u003E\n \u003C/form\u003E\n \u003C/div\u003E\n \u003C/div\u003E\n\n \u003Cscript defer src=\"/assets/onpopstate-handler-1ea3e951679a33d36b6c5f2f8d98016e9908c4af9110736a24b159542c83a9b8.js\" data-discourse-entrypoint=\"onpopstate-handler\" nonce=\"bJfYSa08sEXVGC4MEMEU13WAq\"\u003E\u003C/script\u003E\n\n",
"group": null
}
}
Yeah. Something is definitely wrong with user creation. It looks like it’s going to be hard to figure out. But in those logs you want to look for the logs that happen when you try to log in. You’re looking for one that has the /login path rather than /t/en-narratives-about/96.json.
If you’d like paid support for your self-hosted site you can contact me directly, either PM or my contact info is in my profile.
Thanks for helping me navigate this. My login attempt after creating the admin user with rake admin:create looks like
Started GET "/session/passkey/challenge.json" for 179.210.195.226 at 2025-01-24 21:13:59 +0000
Processing by SessionController#passkey_challenge as JSON
Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 2.0ms)
Started GET "/t/en-narratives-about/96.json" for 34.127.96.150 at 2025-01-24 21:14:00 +0000
Processing by TopicsController#show as JSON
Parameters: {"slug"=>"en-narratives-about", "topic_id"=>"96"}
Completed 500 Internal Server Error in 35ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.7ms)
Started POST "/session" for 179.210.195.226 at 2025-01-24 21:14:05 +0000
Processing by SessionController#create as */*
Parameters: {"login"=>"martim", "password"=>"[FILTERED]", "second_factor_method"=>"1", "timezone"=>"America/Sao_Paulo"}
Started GET "/t/en-narratives-about/96.json" for 34.127.96.150 at 2025-01-24 21:14:06 +0000
Processing by TopicsController#show as JSON
Parameters: {"slug"=>"en-narratives-about", "topic_id"=>"96"}
Completed 200 OK in 195ms (Views: 0.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 4.3ms)
I can see your attempts too:
Started GET "/session/hp.json" for 174.50.213.142 at 2025-01-24 20:58:53 +0000
Processing by SessionController#get_honeypot_value as JSON
Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started GET "/u/check_username?username=Jay_Pfaffman&email=jay%40literatecomputing.com" for 174.50.213.142 at 2025-01-24 20:58:53 +0000
Processing by UsersController#check_username as JSON
Parameters: {"username"=>"Jay_Pfaffman", "email"=>"jay@literatecomputing.com"}
Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Before that, I see occurences of
Started GET "/session/email-login/36ac7e1c52851f1b5c76894b04fd3c4d.json" for 31.186.166.197 at 2025-01-24 20:23:25 +0000
Processing by SessionController#email_login_info as JSON
Parameters: {"token"=>"36ac7e1c52851f1b5c76894b04fd3c4d"}
Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
and
Started GET "/session/hp.json" for 174.50.213.142 at 2025-01-24 21:02:05 +0000
Processing by SessionController#get_honeypot_value as JSON
Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)```
Do you think a fresh install + some configuration could help here? I restored the backup as soon as the forum was online.
Not sure what this is about. Did you configure a passkey for your user? Do you have 2-factor on your account? Required?
I just don’t know. I suppose you could wipe your database and see if account creations and logins work on a clean install. That would let you know if it’s an issue with your install or your database.
I’ll probably try a fresh install tomorrow, now that I got the hang of it it should be fairly straightforward. I keep thinking about this though:
The only 500’s I found in the logs are related to the “/t/en-narratives-about/96.json” GETs. Is there no way they’re getting in the way? Maybe deleting this from the db so it doesn’t get called?
I understand user creation being broken, but the admin created with rake admin:createdoes seem to be ‘working’…
Try going to https://yoursitedomain/u/admin-login and turn on safe mode before sending the email. This will disable all plugins while also letting you login so you can fix your plugin. Works for oauth too.
Thanks, tried this and got the same 500 error popup as above… The logs for this attempt are
Started GET "/session/email-login/058db4bbc47396be096cf7bed508c23e?safe_mode=no_plugins,no_themes" for 179.210.195.226 at 2025-01-27 13:04:30 +0000
Processing by SessionController#email_login_info as HTML
Parameters: {"safe_mode"=>"no_plugins,no_themes", "token"=>"058db4bbc47396be096cf7bed508c23e"}
Rendered layout layouts/application.html.erb (Duration: 54.6ms | GC: 1.2ms)
Completed 200 OK in 62ms (Views: 56.0ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 1.2ms)
Started GET "/svg-sprite/forum.imaginerio.org/svg--ebd30ca654fdbd40604e7a7f5127b1bce16eb12b.js" for 179.210.195.226 at 2025-01-27 13:04:30 +0000
Processing by SvgSpriteController#show as */*
Parameters: {"hostname"=>"forum.imaginerio.org", "theme_id"=>"", "version"=>"ebd30ca654fdbd40604e7a7f5127b1bce16eb12b"}
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started GET "/session/email-login/058db4bbc47396be096cf7bed508c23e.json" for 179.210.195.226 at 2025-01-27 13:04:30 +0000
Processing by SessionController#email_login_info as JSON
Parameters: {"token"=>"058db4bbc47396be096cf7bed508c23e"}
Completed 200 OK in 253ms (Views: 0.2ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.7ms)
Started GET "/session/csrf" for 179.210.195.226 at 2025-01-27 13:04:34 +0000
Processing by SessionController#csrf as JSON
Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started POST "/session/email-login/058db4bbc47396be096cf7bed508c23e" for 179.210.195.226 at 2025-01-27 13:04:34 +0000
Processing by SessionController#email_login as */*
Parameters: {"second_factor_method"=>"1", "timezone"=>"America/Sao_Paulo", "token"=>"058db4bbc47396be096cf7bed508c23e"}
Completed 500 Internal Server Error in 182ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 1.4ms)
Looks like whats failing is the SessionController#email_login with “second_factor_method”=>“1”?
Just tried this and I can create new accounts successfully. Looks like the backup restore is what messed the login up, could my .tar->.tar.gz have corrupted something? Would setting OAuth up before restoring make any difference, or does it get overwritten by the restore?
The text is a bit confusing to me tbh. It says that this will require users to use two-factor auth, but also that users that have two-factor enabled will be prevented from logging in using external auth? So essentially it restricts log in to forum accounts and disables external ones?
Looks like I solved it. I had email disabled for non-team members, changing this via SiteSetting.disable_emails = "no" seems to have done the trick! Thanks everybody for the support, still not sure why this was causing all the havoc (I did get an email when creating an admin via console, and not sure why disabling emails would mess with a registered user login) but everything is good now