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

Etherum on the Move...

Artwork by Steven Grundy What, more Crypto talk? Yes, sorry, more crypto talk, but I'll try to keep it short. Back on July 16th I said that I thought the bear market had ended that day and we were starting a new bull market. Only time will tell if I was right because we haven't had enough time to call it a bear market. But, in that time, Ethereum, the bellwether coin that we measure with, is already more than 50% from that date and 120%+ since June 16th (2022). There are a lot of coins that did better than that, but for a "safe" bet like Ethereum, that's a really nice move. But, it's not too late. Ethereum makes a change on September 26th that will dramatically improve it's capabilities. I think we are going to fairly quickly see ETH return it, and pass it's all time high of $4891.70, maybe even before the end of the year. Now there is always the chance that ETH, and all coins, will turn around and head back down for a test of the low of $876.54....

Antiminer S7 Issues and Diagnostics steps

Note, the instructions below are how I diagnosed the problem I describe.  I'm providing it here in case these steps help you narrow down your issue somewhere along the way. I have an Antminer S7 (batch 8) unit that has been giving me problems.  It worked fine for a week or so then started slowing down.  I could hear the fan slowing down and speeding up and if I checked the web GUI of the unit I could see that “chains” 1 and 3 often had very cool temperatures, as if they weren’t even running. It would then try to get those engaged again and it would speed up and then the cycle would repeat.  Eventually, over time, I’d get a high piercing alarm sound and at that point if I checked the GUI I’d see Xs in the ASIC display instead of Os (image below). Above is how it was typically running.  After a while an alarm would sound and it would look like below: PSU: The first things I tried were to swap power supplies with a working unit.  It’s...