Bootstrap fails on updating gem bundler

Hey,
When I try to update or rebuild my instance, I always get this error:

I, [2019-04-16T12:12:42.262805 #14]  INFO -- : > cd /var/www/discourse && gem update bundler
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
too many connection resets (https://rubygems.org/specs.4.8.gz)
    I, [2019-04-16T12:16:51.525498 #14]  INFO -- : 
I, [2019-04-16T12:16:51.526197 #14]  INFO -- : Terminating async processes
I, [2019-04-16T12:16:51.526286 #14]  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/10/bin/postmaster -D /etc/postgresql/10/main pid: 68
I, [2019-04-16T12:16:51.526452 #14]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 184
2019-04-16 12:16:51.526 UTC [68] LOG:  received fast shutdown request
184:signal-handler (1555417011) Received SIGTERM scheduling shutdown...
2019-04-16 12:16:51.527 UTC [68] LOG:  aborting any active transactions
2019-04-16 12:16:51.529 UTC [68] LOG:  worker process: logical replication launcher (PID 77) exited with exit code 1
2019-04-16 12:16:51.531 UTC [72] LOG:  shutting down
184:M 16 Apr 2019 12:16:51.538 # User requested shutdown...
184:M 16 Apr 2019 12:16:51.538 * Saving the final RDB snapshot before exiting.
184:M 16 Apr 2019 12:16:51.594 * DB saved on disk
184:M 16 Apr 2019 12:16:51.594 # Redis is now ready to exit, bye bye...
2019-04-16 12:16:51.621 UTC [68] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 304 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "find $home ! -user discourse -exec chown discourse {} \\+"]}
cedd95abe84c2c7d955f8e173c272bcca6cdc9dc11d9b0ba9400f281bfaf7ff2
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

What is the problem and how can I solve it?

It looks like a networking problem.

Are you behind a firewall that would keep you from accessing rubygems.org?

2 Likes

I can sudo gem update --system on host system with no problem. Anyway, is there a way to use proxy (Tor http tunnel) for app rebuild?