# שגיאת עדכון/בנייה מחדש. איך לאבחן ולשקם?

**URL:** https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958
**Category:** Self-hosting
**Created:** [4 ביולי,‏ 2024,‏ 7:54am UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958 "2024-07-04T07:54:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [4 ביולי,‏ 2024,‏ 7:54am UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/1 "2024-07-04T07:54:08Z")

</div>

I just tried to update and there is a failure near the end:

```plaintext
I, [2024-07-04T07:17:18.714988 #807] INFO -- : Writing /var/www/discourse/public/assets/scripts/discourse-test-listen-boot-9b14a0fc65c689577e6a428dcfd680205516fe211700a71c7adb5cbcf4df2cc5.js
rake aborted!
Zlib::BufError: buffer error (Zlib::BufError)

...
< more stuff >
...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 805 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"precompile", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'SKIP_EMBER_CLI_COMPILE=1 bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 1
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.

```

I see the same error message was flagged here: ["Zlib::BufError: buffer error" - Discourse update fails](https://meta.discourse.org/t/zlib-buffer-error-discourse-update-fails/311347)

But I already have the maxmind account ID in the yaml file.

I guess I could enter the container and re-run this command again, but I wonder in general is there a way to recover from failed rebuilds or do people just try to run the whole thing again?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4 ביולי,‏ 2024,‏ 9:50am UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/2 "2024-07-04T09:50:46Z")

</div>

Yesterday i gave up and commented out maxmind. I then went into the container and added the values to discourse.conf and it pulled the database successfully (a rather complicated work around).

I don’t understand how this could be happening, but it does look like a bug.

I think the only solution now is to do without maxmind.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [4 ביולי,‏ 2024,‏ 10:36am UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/3 "2024-07-04T10:36:15Z")

</div>

So I had this issue today however, It was only once, I just issued rebuild again and it went well. so weird there is no consistent way to reproduce this. other containers with similar configuration built just fine.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [4 ביולי,‏ 2024,‏ 2:18pm UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/5 "2024-07-04T14:18:25Z")

</div>

I’ve rebuilt 3 sites today, and each one tripped up as above at the same time, which seemed to be just after updating the Theme Components.

Each time a 2nd rebuild ran just fine, with me changing nothing at all. I do wonder if Maxmind is a bit of a red herring (or simply a different issue).

I use a 2 container setup so a failed rebuild is no big deal.

---

<div class="post-metadata">

### Author: ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)
#### Post date: [5 ביולי,‏ 2024,‏ 8:55am UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/6 "2024-07-05T08:55:34Z")

</div>

I had the same experience. It seems to fail on the first run. Luckily I switched to a 2 container set-up so the site remains live while I run the rebuild twice.

---

<div class="post-metadata">

### Author: ![philh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/philh/32/532740_2.png) [@philh](https://meta.discourse.org/u/philh)
#### Post date: [21 ביולי,‏ 2024,‏ 10:20pm UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/7 "2024-07-21T22:20:30Z")

</div>

> [@pfaffman](#):
>
> I don’t understand how this could be happening, but it does look like a bug.

Hate to presume to report a bug but, if it looks like a duck and acts like a duck… 😉

Confirming issue with rebuilding with maxmind.  
Several forums all with identical plugins all of which are Official.

From command line: Rebuilding with maxmind fails, uncomment maxmind and rebuilding works fine.

From /admin Update Discourse: no changes to app.yml, updates fine with no issues.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [19 באפריל,‏ 2025,‏ 2:45pm UTC](https://meta.discourse.org/t/update-rebuild-error-how-to-diagnose-and-recover/314958/8 "2025-04-19T14:45:04Z")

</div>

6 posts were split to a new topic: [How to resolve Pups exec errors during Discourse bootstrap](https://meta.discourse.org/t/how-to-resolve-pups-exec-errors-during-discourse-bootstrap/362619)
