How to fix your Ord server if you get a Broken pipe (os error 32) error
So your Ord server suddenly died. Maybe you were first tipped off when trying to mint and getting an error like this:
"error: wallet failed to synchronize with `ord server` after 20 attempts"
You might thing there's a problem with your wallet, but before you jump to conclusions, head over to your terminal window that's running Ord and see if you're seeing something like this:
"attempt to divide by zero note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error serving request: JSON-RPC error: transport error: Couldn't connect to host: Broken pipe (os error 32)"
The reason you're getting this error is most likely because you're running an older version of Ord and you need to upgrade to ord 0.18.3. So how do you do this? It's easy using Brew.
Note: even if you didn't install ord originally with brew, you can still use brew to save the day here.
Here's the steps you need to follow to get things back in order.
Step 1: Skip this step if you already installed brew previously. Install brew if you haven't installed it yet by simply copying and pasting the command below into your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If it asks you to enter your password or hit return during the install, that's normal, do it and proceed onward!
Step 2: Skip this step if you already installed brew previously. Set your path so your Mac knows where brew is. To do this, you'll see a message towards the end of the brew install that says something like:
==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/<your username>/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Copy everything from the first "(" to the last ")" including the parenthesis themselves.
Step 3: Now I'll split this step into two groups, those who installed ord with brew originally and those who didn't.
a) You originally installed ord with brew: If you already had brew installed and used it to install ord, then simply type the following command:
brew update ord
b) You did not originally install ord with brew: If you didn't already install brew with ord, then simply type the following command:
brew install ord
That should do it! Now try running your ord server using the command you originally used, for reference it should look something like this:
ord --cookie-file /Volumes/<your SSD drive name>/Bitcoin/.cookie --data-dir /Volumes/<your SSD drive name>/Ord server
Bingo! Everything should be rocking and rolling again. You're back to minting!