# Pups error on rebuild 🐕

**URL:** https://meta.discourse.org/t/pups-error-on-rebuild/255025
**Category:** Self-hosting
**Created:** [February 13, 2023, 7:58pm UTC](https://meta.discourse.org/t/pups-error-on-rebuild/255025 "2023-02-13T19:58:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [February 13, 2023, 7:58pm UTC](https://meta.discourse.org/t/pups-error-on-rebuild/255025/1 "2023-02-13T19:58:08Z")

</div>

I’ve been having an issue rebuilding for at least a week now.

> **Complete rebuild log**
>
> ```plaintext
> x86_64 arch detected.
> Ensuring launcher is up to date
> Fetching origin
> Launcher is up-to-date
> Stopping old container
> + /usr/bin/docker stop -t 60 app
> app
> 2.0.20230116-0051: Pulling from discourse/base
> Digest: sha256:9e75876adb52427902a6d76dab731c4888af811d7e5ad9ee6efcec4ce6db986f
> Status: Image is up to date for discourse/base:2.0.20230116-0051
> docker.io/discourse/base:2.0.20230116-0051
> /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups.rb
> /usr/local/bin/pups --stdin
> I, [2023-02-13T17:50:00.813459 #1] INFO -- : Reading from stdin
> I, [2023-02-13T17:50:00.827169 #1] INFO -- : > locale-gen $LANG && update-locale
> I, [2023-02-13T17:50:00.950559 #1] INFO -- : Generating locales (this might take a while)...
> Generation complete.
> 
> I, [2023-02-13T17:50:00.951251 #1] INFO -- : > mkdir -p /shared/postgres_run
> I, [2023-02-13T17:50:00.970572 #1] INFO -- : 
> I, [2023-02-13T17:50:00.974304 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
> I, [2023-02-13T17:50:00.986406 #1] INFO -- : 
> I, [2023-02-13T17:50:00.986769 #1] INFO -- : > chmod 775 /shared/postgres_run
> I, [2023-02-13T17:50:00.999333 #1] INFO -- : 
> I, [2023-02-13T17:50:00.999788 #1] INFO -- : > rm -fr /var/run/postgresql
> I, [2023-02-13T17:50:01.011253 #1] INFO -- : 
> I, [2023-02-13T17:50:01.012019 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
> I, [2023-02-13T17:50:01.019445 #1] INFO -- : 
> I, [2023-02-13T17:50:01.019851 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
> 2023/02/13 17:50:01 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
> I, [2023-02-13T17:50:01.063290 #1] INFO -- : 
> I, [2023-02-13T17:50:01.063642 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
> I, [2023-02-13T17:50:01.072201 #1] INFO -- : 
> I, [2023-02-13T17:50:01.072963 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
> I, [2023-02-13T17:50:01.090513 #1] INFO -- : 
> I, [2023-02-13T17:50:01.091340 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
> I, [2023-02-13T17:50:01.096692 #1] INFO -- : 
> I, [2023-02-13T17:50:01.097243 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
> I, [2023-02-13T17:50:01.101503 #1] INFO -- : 
> I, [2023-02-13T17:50:01.111838 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown: 
> I, [2023-02-13T17:50:01.122076 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown: 
> I, [2023-02-13T17:50:01.134139 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown: 
> I, [2023-02-13T17:50:01.145426 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown: 
> I, [2023-02-13T17:50:01.146129 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
> I, [2023-02-13T17:50:06.402537 #1] INFO -- : 
> I, [2023-02-13T17:50:06.402853 #1] INFO -- : > [! -e /shared/postgres_data] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
> I, [2023-02-13T17:50:06.406558 #1] INFO -- : 
> I, [2023-02-13T17:50:06.406917 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
> I, [2023-02-13T17:50:06.518172 #1] INFO -- : 
> I, [2023-02-13T17:50:06.518562 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
> I, [2023-02-13T17:50:06.524559 #1] INFO -- : 
> I, [2023-02-13T17:50:06.524938 #1] INFO -- : > /root/upgrade_postgres
> I, [2023-02-13T17:50:06.547187 #1] INFO -- : 
> I, [2023-02-13T17:50:06.547920 #1] INFO -- : > rm /root/upgrade_postgres
> I, [2023-02-13T17:50:06.555659 #1] INFO -- : 
> I, [2023-02-13T17:50:06.558880 #1] INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.564150 #1] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.565972 #1] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.566801 #1] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.567795 #1] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.568742 #1] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.573059 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
> I, [2023-02-13T17:50:06.584147 #1] INFO -- : 
> I, [2023-02-13T17:50:06.584797 #1] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.586376 #1] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.587889 #1] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
> I, [2023-02-13T17:50:06.589865 #1] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/13/main/pg_hba.conf
> I, [2023-02-13T17:50:06.590448 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
> I, [2023-02-13T17:50:06.591100 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
> I, [2023-02-13T17:50:06.591819 #1] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
> I, [2023-02-13T17:50:06.597699 #1] INFO -- : > sleep 5
> 2023-02-13 17:50:06.819 UTC [42] LOG: starting PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
> 2023-02-13 17:50:06.820 UTC [42] LOG: listening on IPv4 address "0.0.0.0", port 5432
> 2023-02-13 17:50:06.820 UTC [42] LOG: listening on IPv6 address "::", port 5432
> 2023-02-13 17:50:06.850 UTC [42] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
> 2023-02-13 17:50:06.885 UTC [45] LOG: database system was shut down at 2023-02-13 17:49:46 UTC
> 2023-02-13 17:50:06.921 UTC [42] LOG: database system is ready to accept connections
> I, [2023-02-13T17:50:11.605091 #1] INFO -- : 
> I, [2023-02-13T17:50:11.605519 #1] INFO -- : > su postgres -c 'createdb discourse' || true
> 2023-02-13 17:50:11.744 UTC [55] postgres@postgres ERROR: database "discourse" already exists
> 2023-02-13 17:50:11.744 UTC [55] postgres@postgres STATEMENT: CREATE DATABASE discourse;
> createdb: error: database creation failed: ERROR: database "discourse" already exists
> I, [2023-02-13T17:50:11.746953 #1] INFO -- : 
> I, [2023-02-13T17:50:11.747689 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
> 2023-02-13 17:50:11.848 UTC [59] postgres@discourse ERROR: role "discourse" already exists
> 2023-02-13 17:50:11.848 UTC [59] postgres@discourse STATEMENT: create user discourse;
> ERROR: role "discourse" already exists
> I, [2023-02-13T17:50:11.852893 #1] INFO -- : 
> I, [2023-02-13T17:50:11.853159 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
> I, [2023-02-13T17:50:11.948397 #1] INFO -- : GRANT
> 
> I, [2023-02-13T17:50:11.948722 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
> I, [2023-02-13T17:50:12.019061 #1] INFO -- : ALTER SCHEMA
> 
> I, [2023-02-13T17:50:12.019790 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
> NOTICE: extension "hstore" already exists, skipping
> I, [2023-02-13T17:50:12.116755 #1] INFO -- : CREATE EXTENSION
> 
> I, [2023-02-13T17:50:12.117327 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
> NOTICE: extension "pg_trgm" already exists, skipping
> I, [2023-02-13T17:50:12.185526 #1] INFO -- : CREATE EXTENSION
> 
> I, [2023-02-13T17:50:12.186170 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
> NOTICE: extension "hstore" already exists, skipping
> I, [2023-02-13T17:50:12.262112 #1] INFO -- : CREATE EXTENSION
> 
> I, [2023-02-13T17:50:12.262787 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
> NOTICE: extension "pg_trgm" already exists, skipping
> I, [2023-02-13T17:50:12.337318 #1] INFO -- : CREATE EXTENSION
> 
> I, [2023-02-13T17:50:12.337781 #1] INFO -- : > sudo -u postgres psql discourse
> I, [2023-02-13T17:50:12.342814 #1] INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');
> 
> I, [2023-02-13T17:50:12.451160 #1] INFO -- : File > /var/lib/postgresql/take-database-backup chmod: +x chown: postgres:postgres
> I, [2023-02-13T17:50:12.459133 #1] INFO -- : File > /var/spool/cron/crontabs/postgres chmod: chown: 
> I, [2023-02-13T17:50:12.459321 #1] INFO -- : > echo postgres installed!
> I, [2023-02-13T17:50:12.463417 #1] INFO -- : postgres installed!
> 
> I, [2023-02-13T17:50:12.473178 #1] INFO -- : File > /etc/service/redis/run chmod: +x chown: 
> I, [2023-02-13T17:50:12.481643 #1] INFO -- : File > /etc/service/redis/log/run chmod: +x chown: 
> I, [2023-02-13T17:50:12.488688 #1] INFO -- : File > /etc/runit/3.d/10-redis chmod: +x chown: 
> I, [2023-02-13T17:50:12.490063 #1] INFO -- : Replacing daemonize yes with in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.491076 #1] INFO -- : Replacing (?-mix:^pidfile.*$) with in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.493151 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
> I, [2023-02-13T17:50:12.500018 #1] INFO -- : 
> I, [2023-02-13T17:50:12.501170 #1] INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.501975 #1] INFO -- : Replacing (?-mix:^bind .*$) with in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.504166 #1] INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.505578 #1] INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.508144 #1] INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.509510 #1] INFO -- : > echo redis installed
> I, [2023-02-13T17:50:12.514424 #1] INFO -- : redis installed
> 
> I, [2023-02-13T17:50:12.514846 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
> I, [2023-02-13T17:50:12.526866 #1] INFO -- : logfile ""
> 
> I, [2023-02-13T17:50:12.527642 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
> I, [2023-02-13T17:50:12.530513 #1] INFO -- : > sleep 10
> 103:C 13 Feb 2023 17:50:12.553 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
> 103:C 13 Feb 2023 17:50:12.553 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=103, just started
> 103:C 13 Feb 2023 17:50:12.553 # Configuration loaded
> 103:M 13 Feb 2023 17:50:12.554 * monotonic clock: POSIX clock_gettime
> 103:M 13 Feb 2023 17:50:12.556 * Running mode=standalone, port=6379.
> 103:M 13 Feb 2023 17:50:12.556 # Server initialized
> 103:M 13 Feb 2023 17:50:12.556 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
> 103:M 13 Feb 2023 17:50:12.557 * Loading RDB produced by version 7.0.7
> 103:M 13 Feb 2023 17:50:12.557 * RDB age 28 seconds
> 103:M 13 Feb 2023 17:50:12.557 * RDB memory usage when created 132.80 Mb
> 103:M 13 Feb 2023 17:50:13.097 * Done loading RDB, keys loaded: 12521, keys expired: 105.
> 103:M 13 Feb 2023 17:50:13.097 * DB loaded from disk: 0.540 seconds
> 103:M 13 Feb 2023 17:50:13.097 * Ready to accept connections
> I, [2023-02-13T17:50:22.534815 #1] INFO -- : 
> I, [2023-02-13T17:50:22.535251 #1] INFO -- : > thpoff echo "thpoff is installed!"
> I, [2023-02-13T17:50:22.543298 #1] INFO -- : thpoff is installed!
> 
> I, [2023-02-13T17:50:22.544616 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
> I, [2023-02-13T17:50:22.714530 #1] INFO -- : 
> I, [2023-02-13T17:50:22.715359 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
> I, [2023-02-13T17:50:22.886718 #1] INFO -- : 
> I, [2023-02-13T17:50:22.888488 #1] INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
> I, [2023-02-13T17:50:23.038153 #1] INFO -- : 
> I, [2023-02-13T17:50:23.038621 #1] INFO -- : > rm -f /etc/cron.d/anacron
> I, [2023-02-13T17:50:23.045035 #1] INFO -- : 
> I, [2023-02-13T17:50:23.049680 #1] INFO -- : File > /etc/cron.d/anacron chmod: chown: 
> I, [2023-02-13T17:50:23.060597 #1] INFO -- : File > /etc/runit/1.d/copy-env chmod: +x chown: 
> I, [2023-02-13T17:50:23.075869 #1] INFO -- : File > /etc/service/unicorn/run chmod: +x chown: 
> I, [2023-02-13T17:50:23.087959 #1] INFO -- : File > /etc/service/nginx/run chmod: +x chown: 
> I, [2023-02-13T17:50:23.099865 #1] INFO -- : File > /etc/runit/3.d/01-nginx chmod: +x chown: 
> I, [2023-02-13T17:50:23.110493 #1] INFO -- : File > /etc/runit/3.d/02-unicorn chmod: +x chown: 
> I, [2023-02-13T17:50:23.111429 #1] INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
> I, [2023-02-13T17:50:23.111903 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
> I, [2023-02-13T17:50:23.116175 #1] INFO -- : > apt-get update
> 130:C 13 Feb 2023 17:50:23.127 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
> 130:C 13 Feb 2023 17:50:23.127 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=130, just started
> 130:C 13 Feb 2023 17:50:23.127 # Configuration loaded
> 130:M 13 Feb 2023 17:50:23.127 * monotonic clock: POSIX clock_gettime
> 130:M 13 Feb 2023 17:50:23.128 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
> 130:M 13 Feb 2023 17:50:23.128 # Failed listening on port 6379 (TCP), aborting.
> W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
> E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
> I, [2023-02-13T17:50:27.097726 #1] INFO -- : Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
> Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
> Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
> Get:4 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB]
> Get:5 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [91.7 kB]
> Get:6 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
> Get:7 https://deb.nodesource.com/node_18.x bullseye InRelease [4,586 B]
> Get:8 http://deb.debian.org/debian bullseye/main amd64 Packages [8,183 kB]
> Get:9 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [222 kB]
> Get:10 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB]
> Get:11 http://deb.debian.org/debian bullseye-backports/main amd64 Packages [395 kB]
> Err:6 https://dl.yarnpkg.com/debian stable InRelease
> The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
> Get:12 https://deb.nodesource.com/node_18.x bullseye/main amd64 Packages [774 B]
> Get:13 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 Packages [268 kB]
> Reading package lists...
> 
> I, [2023-02-13T17:50:27.098511 #1] INFO -- : Terminating async processes
> I, [2023-02-13T17:50:27.098575 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
> 2023-02-13 17:50:27.098 UTC [42] LOG: received fast shutdown request
> I, [2023-02-13T17:50:27.099690 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
> 103:signal-handler (1676310627) Received SIGTERM scheduling shutdown...
> 2023-02-13 17:50:27.101 UTC [42] LOG: aborting any active transactions
> 2023-02-13 17:50:27.105 UTC [42] LOG: background worker "logical replication launcher" (PID 51) exited with exit code 1
> 103:M 13 Feb 2023 17:50:27.106 # User requested shutdown...
> 103:M 13 Feb 2023 17:50:27.106 * Saving the final RDB snapshot before exiting.
> 2023-02-13 17:50:27.110 UTC [46] LOG: shutting down
> 2023-02-13 17:50:27.210 UTC [42] LOG: database system is shut down
> 103:M 13 Feb 2023 17:50:28.091 * DB saved on disk
> 103:M 13 Feb 2023 17:50:28.091 # Redis is now ready to exit, bye bye...
> 
> ```

```plaintext
FAILED
--------------------
Pups::ExecError: apt-get update failed with return #<Process::Status: pid 132 exit 100>
Location of failure: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cmd"=>["apt-get update", "apt-get install -y libsodium-dev"]}
bootstrap failed with exit code 100
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
7170699862bb22327b957f56aeb8baaadc4563e521d05c5004fb9d50d6a30953

```

The logs seem to be pointing to this part of my app.yml file:

```plaintext
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  before_code:
    - exec:
        cmd:
          - apt-get update
          - apt-get install -y libsodium-dev
  after_code:
    - exec:
        cd: $home/plugins
        cmd:

```

I removed the “before\_code” part and got this message on rebuild:

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 791 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

Any tips would be appreciated!

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [February 13, 2023, 11:44pm UTC](https://meta.discourse.org/t/pups-error-on-rebuild/255025/2 "2023-02-13T23:44:01Z")

</div>

I found the problem it seems. It’s probably very specific to me. One of my plugins used `rbnacl` as a dependency (hence the libsodium)

I don’t actually use this dependency though. Removing it entirely fixed the problem

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 15, 2023, 11:44pm UTC](https://meta.discourse.org/t/pups-error-on-rebuild/255025/3 "2023-03-15T23:44:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
