Yarn error

stuck on this for like 6 mins now while rebuilding

I just wanted a quick rebuild man :frowning: now its been near 20 mins, If I known I should’ve waited till 3am or something, I ended the ssh session and did rebuild again, lets see

edit: had was to do ./discourse-docter or whatever and its back online, I wanted my app.yml to update, I don’t even know if it did

See Error during the update ESOCKETTIMEDOUT registry.yarnpkg.com

1 Like

thanks, will try at 3am or something later

im really confuse, my line 159 as stated in the topic you posted is different…

but I searched for “yarn” and found this

Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 600 app
app
2.0.20240502-0021: Pulling from discourse/base
Digest: sha256:ca10543693caa0b52f7318105dea1d47a84991e7927330db1010e13e39777ba7
Status: Image is up to date for discourse/base:2.0.20240502-0021
docker.io/discourse/base:2.0.20240502-0021
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-05-09T03:58:42.050521 #1]  INFO -- : Reading from stdin
I, [2024-05-09T03:58:42.077104 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2024-05-09T03:58:42.095108 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2024-05-09T03:58:42.108229 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2024-05-09T03:58:42.126445 #1]  INFO -- : File > /root/install_postgres  chmod: +x  chown: 
I, [2024-05-09T03:58:42.145105 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2024-05-09T03:58:42.145716 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.147110 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.150337 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.180094 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.181568 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.182124 #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, [2024-05-09T03:58:42.183465 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.184221 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2024-05-09T03:58:42.198484 #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, [2024-05-09T03:58:42.209671 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2024-05-09T03:58:42.213239 #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, [2024-05-09T03:58:42.218935 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-05-09T03:58:42.221346 #1]  INFO -- : > [ -f /root/install_postgres ] && /root/install_postgres && rm -f /root/install_postgres
I, [2024-05-09T03:58:42.404926 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.
postgres already running stop container



FAILED
--------------------
Pups::ExecError: [ -f /root/install_postgres ] && /root/install_postgres && rm -f /root/install_postgres failed with return #<Process::Status: pid 16 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"tag"=>"db", "cmd"=>"[ -f /root/install_postgres ] && /root/install_postgres && rm -f /root/install_postgres"}
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.
902db7e2e5295f896eb00f8379d8507209ddc1844e335ecb403f0cd900502448```

please I need some help, I can’t even have rebuild, I just want the changes in my app.yml to change on the site, its not even using the full amount of ram it can use, I made some changes to the shared buffers and I want it to go live. now I can’t even rebuild, to get site back online I used discourse doctor or just restart the old app

Is there some other instance of postgres running (on the main host?) that is somehow communicating with the container as it’s trying to build?

no idea and id not think so, as I set it up on a fresh server. should I somehow stop.
I googled how to check if postgres is running and I ran this command, ‘service postgresql status’, returned Unit postgresql.service could not be found.

I even rebooted server, still didn’t work.

full console log before it sticks

That seems cut off at line 262

thats where it sticks, if I let it stay too long then it says this as I shown in my earlier messages.

Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"tag"=>"db", "cmd"=>"[ -f /root/install_postgres ] && /root/install_postgres && rm -f /root/install_postgres"}
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.
902db7e2e5295f896eb00f8379d8507209ddc1844e335ecb403f0cd900502448

I wanted to avoid long downtime so I stopped it and started back the app, also thank you for your response, idk what to do, I need to rebuild app

How much RAM + Swap do you have? Might not be enough for it to build.

more than enough, 40GB ram, 400GB storage


its not even using much ram, I made changes to app.yml to take more from ram and added 25 UNICORN_WORKERS (12 core cpu)

Is that identical to the new errors? The new logs seems to crash after those commands have already been run.

yes, that error was when I let it stay running without closing ssh session and start again, took like 14 mins for it to say fail and then bootstrap error, I don’t want to have a long down time

I, [2024-05-09T16:37:04.580910 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-05-09T16:37:04.581418 #1]  INFO -- : > [ -f /root/install_postgres ] && /root/install_postgres && rm -f /root/install_postgres
I, [2024-05-09T16:37:09.576908 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.
 
I, [2024-05-09T16:37:09.577359 #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, [2024-05-09T16:37:09.607719 #1]  INFO -- : File > /usr/local/bin/create_db  chmod: +x  chown: 
I, [2024-05-09T16:37:09.635201 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2024-05-09T16:37:09.648537 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2024-05-09T16:37:09.648840 #1]  INFO -- : > sleep 5
2024-05-09 16:37:10.726 UTC [34] LOG:  starting PostgreSQL 13.14 (Debian 13.14-1.pgdg110+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

Lines 31-41 out of your log file, which seems to have started postgres already.

The bootstrap error should have different lines here:

Since those lines seem to have executed successfully.

idk tbh, I just did rebuild command but after I failed yesterday I did discourse doctor command to get site back online, It still doesn’t rebuild, fails on rebuild at the same line each time I, [2024-05-09T16:37:44.902627 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"

1 Like

got it to work by adding this to the web template, I followed the tutorial on the first comment at first but im a newbie and I ended up figuring it out.

      cd: $home
      cmd:
        - "su discourse -c 'yarn config set network-timeout 600000 -g'"
  - exec:
      cd: $home
      hook: yarn
      cmd:
        - |-
          if [ "$version" != "tests-passed" ]; then
            rm -rf app/assets/javascripts/node_modules
          fi
        - su discourse -c 'yarn install --frozen-lockfile && yarn cache clean

thats what It should look like for anyone else having the issue.

also how do I make my instant use more ram? only using 4GB rn even after I made changes, is it fine? is it still being “used”?

2 Likes

I have the same issue (and also newbie) so trying your fix now. Thanks for posting it.

Hey sorry to be a pain but I can’t find yarn anywhere to run it. Which directory should it be in please?