Getting the sites running again: App not loading inside Docuss in BTM

@WebDevelopers

The apps weren’t working due to a 503 connection error, which @carlos resolved over the weekend.

Not able to get the sites running again i’m afraid. Its a little strange, as our apps should behave the same. You can see them here:

https://fl-maps.brightertomorrowmap.com (not loading)
https://fl-maps.publichappinessmovement.com (loading fine)

Brightertomorrowmap.com we thought it was something simple like an authentication referral error or misconfiguration, but the logs didn’t show anything. I’m still exploring the set up, but it was working before.

run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/01-cleanup-web-pids
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/letsencrypt
[Mon 14 Jun 2021 04:26:39 PM UTC] Domains not changed.
[Mon 14 Jun 2021 04:26:39 PM UTC] Skip, Next renewal time is: Mon Jun 21 00:16:09 UTC 2021
[Mon 14 Jun 2021 04:26:39 PM UTC] Add '--force' to force to renew.
[Mon 14 Jun 2021 04:26:39 PM UTC] Installing key to:/shared/ssl/publichappinessmovement.com.key
[Mon 14 Jun 2021 04:26:39 PM UTC] Installing full chain to:/shared/ssl/publichappinessmovement.com.cer
[Mon 14 Jun 2021 04:26:39 PM UTC] Run reload cmd: sv reload nginx
warning: nginx: unable to open supervise/ok: file does not exist
[Mon 14 Jun 2021 04:26:39 PM UTC] Reload error for :
[Mon 14 Jun 2021 04:26:40 PM UTC] Domains not changed.
[Mon 14 Jun 2021 04:26:40 PM UTC] Skip, Next renewal time is: Wed Jul  7 00:24:06 UTC 2021
[Mon 14 Jun 2021 04:26:40 PM UTC] Add '--force' to force to renew.
[Mon 14 Jun 2021 04:26:40 PM UTC] Installing key to:/shared/ssl/publichappinessmovement.com_ecc.key
[Mon 14 Jun 2021 04:26:40 PM UTC] Installing full chain to:/shared/ssl/publichappinessmovement.com_ecc.cer
[Mon 14 Jun 2021 04:26:40 PM UTC] Run reload cmd: sv reload nginx
warning: nginx: unable to open supervise/ok: file does not exist
[Mon 14 Jun 2021 04:26:40 PM UTC] Reload error for :
Started runsvdir, PID is 543
ok: run: redis: (pid 552) 0s
chgrp: invalid group: 'syslog'
ok: run: postgres: (pid 555) 0s
supervisor pid: 553 unicorn pid: 582
(553) Reopening logs

I suspect the issue with publichappinessmovement.com is that the plugin which loads our app in an iframe in Discourse isn’t working with the new version of Discourse, so i’ll have to find someone to join the team and fix the bugs. That issue was likely and will take a few weeks to resolve.

Here’s the console error message when loading brightertomorrowmap.com:

Access to fetch at 'https://fl-maps.brightertomorrowmap.com/dcs-website.json' from origin 'https://brightertomorrowmap.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
chrome-error://chromewebdata/:1 Failed to load resource: the server responded with a status of 502 ()
chrome-error://chromewebdata/:1 Refused to display 'https://fl-maps.brightertomorrowmap.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

@syl can you see anything there?

Brightertomorrowmap.com is a head scratcher.

@zofrex any ideas? @tmcnulty can’t decrypt the secrets file in BTM so i’m wondering if maybe they were set up slightly different?

The strange thing is that it worked perfectly before the database switch

Hey @AndyatFocallocal , can you explain to me exactly what’s working and what’s not? I’m a bit lost with all the urls…

I believe https://fl-maps.publichappinessmovement.com is working and the only issue is with https://fl-maps.brightertomorrowmap.com. Is that correct?

If there are more than one URL with issues - we should treat each issue separately and not in the same thread as it will be very difficult to track.
I’m available on Friday to do some debugging if that helps, but I really need access to the hosts where this is being served from so I can have a look around and try out a few things.

1 Like

I may have messaged you a little too soon. Tom thinks he knows the answer and it’s something to do with updating URLs in the encrypted secrets file.

Yes the app seems to work on PHM and so it’s likely the database issue is fixed. We can’t be sure until one of the platforms is live again though

@carlos I’ve updated this thread to be for PHM and created another for what i suspect is the issue with our Meta site:

You’re welcome to have a look at the error code in the console and see if it looks database related. The code only shows up when i turn on the app to import our React app into this website.

Hi @AndyatFocallocal - yeah it doesn’t look like an issue with the database but I think I might be able to help still if I have the admin access to the systems. If I can’t reproduce the issue there’s not much I can do I’m afraid…

1 Like

thanks @AndyatFocallocal for making me an admin here - how can I reproduce the issue in publichappinessmovement.com?
can you also make me admin at brightertomorrowmap.com and explain how to reproduce the error there?
cheers

1 Like

Here I’ll need to turn on our DCS app which will crash the site. I suggest we pick a specific time to do that, like 19:00 till 19:15.

On BTM it’s already active, but not crashing the site as we haven’t updated Discourse there.

I see a 502 page missing error, here: https://fl-maps.brightertomorrowmap.com/

Which Tom thinks is down to an issue in our secrets file which were waiting on keys to decrypt

Sure, I won’t turn it on on my own - but can you tell me the steps you take to enable that?

1 Like

502 usually means that the webserver is down - has anyone validated that the server behind https://fl-maps.brightertomorrowmap.com is fully operational?

1 Like

I’m not able to give you access to turn it on yourself, and you can’t turn it off as the site is broken.

On BTM you can by going: burger menu > admin > plugins > Docuss

I think Tom would have checked the server as he’s been looking into it, but i’m not totally sure.

@carlos I’m happy to turn the plugin on any time you need, then just send me an email when you want it back off. I’ll wait here as i’ve got plenty of work to get to :slight_smile:

you can turn it on now - then turn it back off in 10 min

1 Like

ok, coming up. It takes 8mins to turn rebuild and turn back on i believe.

ok, i’m rebuilding the app now. the site will go down for about 8mins and then be rebuilt with the error we’re facing.

@carlos We’re back!

ok, that didn’t help me as I couldn’t see any specific error apart from “the website is down” generic one…
I’m heading away on holiday for a couple of weeks tomorrow so I won’t be able to do anything for a while - I’ll check back in when I’m back - hope you guys can sort it out soon!

Thanks Carlos. I hope you have a great holiday :slightly_smiling_face::slightly_smiling_face: