Skip to main content

Troubleshooting a Discourse Update on DigitalOcean: Resolving Unresolvable Errors

For the past three years, I've maintained a Discourse server on a DigitalOcean Droplet. Recently, I decided to update it with some of the latest Discourse features. What I anticipated to be a straightforward update process turned into several days of frustrating setbacks.

The version of Discourse I was running was already three years old, so I assumed that running the built-in "Update" feature would suffice. However, after clicking the update button, the progress bar sluggishly crawled forward over the next half hour, only to display the dreaded message: "Error – Update Failed." The logs provided little to no help, but based on my experience with other software updates via GIT, I suspected that the failure might be due to the repository head still being called "Master."

In recent years, there has been a shift away from using "Master" as the repository head, with "Main" becoming the preferred term. Despite trying several methods to address this issue, including restarting the droplet and running the update again, I encountered the same error.

Turning to the traditional method of updating from the command line, I SSH'd into the server and ran the update command after some research. Once again, after another half hour, I faced the same result.

Seeking assistance, I contacted DigitalOcean tech support. Despite their relatively prompt response within 24 hours, their initial answer did not resolve my specific issue. After further communication, they confirmed that the 3-year-old version of Discourse was too outdated to update successfully. Their recommendation was to create a new droplet and perform a fresh install of the latest Discourse version available.

Over the next three days, I attempted this process at least ten times, encountering a myriad of errors each time. Despite addressing numerous errors, new ones continued to appear, halting progress. Eventually, after resolving all errors, the install script indicated success with the message "Discourse successfully Installed." However, this turned out to be false, as Discourse was not running, Docker was not operational, and the Discourse image was missing.

Feeling defeated, but refusing to admit it, I decided to try one last time, this time using a larger and more powerful droplet. Despite multiple attempts and several hours of effort, I made no progress.

At this point, I switched my focus to installing Discourse on a new image in my AWS DOC instead of DigitalOcean. While doing so, I just happened to stumbled upon the solution. While verifying the hardware and Ubuntu version I was using at DigitalOcean, I noticed something peculiar about the Droplet's name.

When creating a Droplet, the name field is pre-populated with a suggested name that includes abbreviations of various components of the Droplet's configuration. For example, the suggested name was "discourseonubuntu2204-s-1vcpu-2gb-70gb-nyc1". However, upon closer inspection, I realized that the actual name in the terminal window was longer, including the addition of "tow" at the end.

This discrepancy made me wonder if the long machine name was causing issues. I vaguely remembered seeing "sethostname" in the list of errors at one point. Despite my frustration, I decided to test my theory.

I edited the droplet's name to remove about 15 characters from the end and ran `/var/discourse/discourse-setup` again. To my surprise, it worked perfectly this time. The installation completed successfully, and when I opened a browser and pointed it at the new droplet, my brand new Discourse instance was up and running.

While this experience may be unique, I hope that sharing it will help others facing similar challenges save time and frustration.

Comments

Popular posts from this blog

Dride Zero - Dashcam on Steroids

I took part in a Kickstarter project to build "The ultimate Dashcam".  One with front and back cameras that would shoot in HD, was durable and low power, and would upload video clips to the cloud with the push of a button.  We'll after waiting more than a year, they did just that.  I received my Dride Zero a couple of days ago and, other than an initial rocky "Setup" process, it has been working fantastic. This post isn't so much to talk about the Dride, you can get that information from them at https://dride.io.   This is more for those people who might run into the same issues with Setup that I had.  Hopefully this will save them some of the time I wasted trying to figure it out. Dride Zero Getting Started 1) Unpack from the shipping box.   To get started all you need at first is the Dride Camera, the powercord that has the cigarette lighter connector, and a 16Gb type 10 Micro SD card. 2) Insert the 16Gb Micro SD card in the slot on th

IOTA - A Beginner's Guide to Why IOTA Matters

IOTA is not your typical cryptocurrency.  IOTA, which typically stands for the Internet Of Things is a completely new approach to managing a blockchain. Blockchain technology is what made coins like Bitcoin (BTC) possible.  BTC is just a coin that uses the blockchain technology.  As I've said many times before, the "real" invention here was coming up with a blockchain that works.  To show that it works they created BTC.  The success of BTC is a very good indication of how well blockchains can work. Blockchains are what provide the audit trail of each transaction.  It is what allows you to purchase a digital "product" and be assured that the product is authentic and that you are the only one who owns that particular product.  It is what allows us to use BTC as money because it protects against counterfeiting.  Blockchains do have their limitations, most notably transaction speed, and IOTA solves these limitations.  This is hugely important because almost

Sending SMS/MMS text messages via Twilio and ColdFusion in 5 minutes or less

Wow, almost exactly a year since my last post.   How some things change and other things don't. On the one hand my father has passed away almost a year ago and that has left a big hole in our lives.  On the other hand a year ago BitCoin was at it's peak and was days away from jumping off the cliff.  Well it fell from about $19,000 all the way to $6000 where it has held for many months...until yesterday when it jumped off the cliff again.  On to Twilio - I'm blown away with how easy it is to get communication components accomplished with Twilio.  We are using it for normal SMS text messages at TapCloud.  We also use it to send out our Authy based 2-Factor authentication tokens, and we are starting to use it for peer-to-peer and one-to-many video conferencing. One of the great things about Twilio is just how easy it is to use.  Here's an example of just a handful of code that will let you go from start to finish so you'll be sending out MMS messages in about 5 m