jparyani / GhostSS

Just a blogging platform
https://ghost.org
MIT License
15 stars 7 forks source link

Public-facing site isn't being regenerated #13

Open azirbel opened 8 years ago

azirbel commented 8 years ago

I'm afraid I don't have good reproduction steps for this.

At some point, my public-facing site got stuck and has stopped reflecting new updates. It still shows an old version of my blog, but since then I have edited the blog's title, edited one of my original posts, and added new posts, and none of this has caused the live site to change.

I see a referance to a "Regenerate public site" button at https://docs.sandstorm.io/en/latest/guided-tour, which sounds like what I need, but I haven't found any button like that yet.

It's very possible I have something misconfigured, since I'm running my own sandstorm server. That said, the blog used to work, and I'm using the public URL provided by Sandstorm (so there shouldn't be unrelated DNS/caching problems). I think Sandstorm updated since the last time it worked, not sure if that is related.

Any troubleshooting advice is very welcome!

jparyani commented 8 years ago

Can you take a look at the debug log (the console looking icon in the Sandstorm topbar while the grain is open) and report any suspicious errors right after publishing?

Also, if you don't have any private data stored in the grain, a backup would be very helpful for debugging (again click the corresponding icon in the topbar to make one). You can send it to jparyani@sandstorm.io if it's semi-private.

azirbel commented 8 years ago

Whoops, I had my github notifications misconfigured and forgot about this thread. Sorry!

There is indeed a suspicious line or two in the console, exec error: Error: Command failed. Here's a snippet:

exec error: Error: Command failed: 
PUT /ghost/api/v0.1/posts/6/?include=tags 200 100.144 ms - 498
GET / 200 37.797 ms - 4376
GET /robots.txt 200 3.233 ms - 99
GET /favicon.ico 200 1.166 ms - 1086
GET /assets/css/screen.css?v=baf4b1db64 200 2.337 ms - 37163
GET /test-2/ 200 39.487 ms - 5184
GET /author/azirbel/ 200 39.185 ms - 4420
GET /test/ 200 33.295 ms - 5096
GET /blogging-on-sandstorm-and-ghost/ 200 41.771 ms - 8203
GET /tag/sandstorm/ 200 34.834 ms - 3264
GET /tag/ghost-tag/ 200 52.648 ms - 3252
GET /public/jquery.js?v=baf4b1db64 200 4.105 ms - 282944
GET /assets/js/jquery.fitvids.js?v=baf4b1db64 200 7.847 ms - 2698
GET /assets/js/index.js?v=baf4b1db64 200 4.935 ms - 3075
GET /assets/fonts/casper-icons.eot 200 4.846 ms - 3272
GET /assets/fonts/casper-icons.eot? 200 5.648 ms - 3272
GET /assets/fonts/casper-icons.woff 200 4.546 ms - 2260
GET /assets/fonts/casper-icons.ttf 200 7.760 ms - 3108
GET /assets/fonts/casper-icons.svg 200 6.305 ms - 5840
GET /author/azirbel/rss/ 200 55.155 ms - 3769
GET /blogging-on-sandstorm-and-ghost/apps.alexzirbel.com 301 3.487 ms - -
GET /blogging-on-sandstorm-and-ghost/apps.alexzirbel.com/ 404 43.875 ms - 1876
exec error: Error: Command failed: 
PUT /ghost/api/v0.1/posts/6/?include=tags 200 81.733 ms - 521
GET / 200 37.488 ms - 4927
GET /robots.txt 200 1.972 ms - 99
GET /favicon.ico 200 0.776 ms - 1086
GET /assets/css/screen.css?v=baf4b1db64 200 2.388 ms - 37163
GET /test-new-post/ 200 30.423 ms - 5257
GET /author/azirbel/ 200 83.567 ms - 4971
GET /test-2/ 200 50.518 ms - 5184
GET /test/ 200 62.668 ms - 5096
GET /blogging-on-sandstorm-and-ghost/ 200 51.140 ms - 8203
GET /tag/sandstorm/ 200 67.011 ms - 3264
GET /tag/ghost-tag/ 200 62.907 ms - 3252
GET /public/jquery.js?v=baf4b1db64 200 7.949 ms - 282944
GET /assets/js/jquery.fitvids.js?v=baf4b1db64 200 5.648 ms - 2698
GET /assets/js/index.js?v=baf4b1db64 200 5.782 ms - 3075
GET /assets/fonts/casper-icons.eot 200 3.784 ms - 3272
GET /assets/fonts/casper-icons.eot? 200 3.389 ms - 3272
GET /assets/fonts/casper-icons.woff 200 4.442 ms - 2260
GET /assets/fonts/casper-icons.ttf 200 4.833 ms - 3108
GET /assets/fonts/casper-icons.svg 200 3.471 ms - 5840
GET /author/azirbel/rss/ 200 38.075 ms - 4125
GET /blogging-on-sandstorm-and-ghost/apps.alexzirbel.com 301 3.991 ms - -
GET /blogging-on-sandstorm-and-ghost/apps.alexzirbel.com/ 404 40.444 ms - 1876
exec error: Error: Command failed: 
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.

I'll send you the backup file as well. Thanks so much for your help!

jparyani commented 8 years ago

Ok so this is because your link to apps.alexzirbel.com didn't contain the protocol (it should be http://apps.alexzirbel.com). The static site generator bails out on any error, so your site doesn't get published.

I'm going to leave this issue open as a reminder to fix the static site generator to just keep running on errors. Really what I want is a message informing the user on errors, but that's going to require some deeper integration with ghost.

azirbel commented 8 years ago

It works again! Thanks @jparyani!

For anyone reading this later: the problem was that I had linked to apps.alexzirbel.com in one of my blog posts, instead of linking to http://apps.alexzirbel.com. That broke the static site generator, so no changes after that were reflected in the public site.

frigginglorious commented 7 years ago

I'm getting a 301 :( GET /live-sandstorm/ 301 4.581 ms - 176 when I try to pull up from the static pub URL: http://lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io:6080/

paulproteus commented 7 years ago

@frigginglorious I'm not getting a 301, fwiw:

paulproteus@slittingmill:/tmp$ wget http://lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io:6080/
--2016-07-27 16:03:43--  http://lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io:6080/
Resolving lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io (lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io)... 104.131.194.78
Connecting to lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io (lh8aaapfl5ird4fwp1ik.frigginglorious.sandcats.io)|104.131.194.78|:6080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2998 (2.9K) [text/html]
Saving to: ‘index.html’

index.html                        100%[===============================================================>]   2.93K  --.-KB/s   in 0.07s  

2016-07-27 16:03:44 (39.3 KB/s) - ‘index.html’ saved [2998/2998]
frigginglorious commented 7 years ago

Oh, for sure. The page loads with the default settings of the grain, yes.

I should have mentioned that the 301 error only appears in the grain's debug log. I could be mistaken on whether it's actually relevant. I guess the static content doesn't even display on that debug log when it is pulled up directly

After I try to publish a post on ghost, I do get an error, in the debug log, that is entirely unhelpful. Here it is, in full: "exec error: Error: Command failed: "