Gem Install SSL CONNECT ERROR


#1

Afternoon People,

I’ve having real be problems trying to rebuild.

Upon running the command it gets to

    Updating bundler
Successfully installed bundler-1.14.6
Gems updated: bundler

I, [2017-05-03T13:15:36.653121 #15]  INFO -- : > cd /var/www/discourse && chown -R discourse /var/www/discourse
I, [2017-05-03T13:15:40.774592 #15]  INFO -- :
I, [2017-05-03T13:15:40.775123 #15]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development'

Then it keeps chucking up an error installing gem file blah blah. It seems to be a different gem file every time and I install the gem file manually and it almost cycles round and then asks for the gem files I already installed. :frowning:

I’ve tried to change source to http rather than https to see if that helps.

But it seems the GEM installer within Discourse uses different settings so I can’t override.

Hope you can help.


(Sam Saffron) #2

My guess here is that either you have very poor connectivity or something is up with rubygems at the moment.


#3

I have 2x fibre connection and I even went to the stage of swapping it over to the other line.

I have been trying it all day. But you could be right and it’s a general problem rubygems are having at the moment.


(Sam Saffron) #4

Some stuff was reported yesterday but nothing today. https://status.rubygems.org/


#5
An error occurred while installing arel (6.0.4), and Bundler cannot continue.
Make sure that `gem install arel -v '6.0.4'` succeeds before bundling.

I, [2017-05-04T13:08:40.502902 #16]  INFO -- : Terminating async processes
I, [2017-05-04T13:08:40.503027 #16]  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/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 45
I, [2017-05-04T13:08:40.503119 #16]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 158
158:signal-handler (1493903320) Received SIGTERM scheduling shutdown...
158:M 04 May 13:08:40.506 # User requested shutdown...
158:M 04 May 13:08:40.506 * Saving the final RDB snapshot before exiting.
2017-05-04 13:08:40 UTC [45-2] LOG:  received fast shutdown request
2017-05-04 13:08:40 UTC [45-3] LOG:  aborting any active transactions
2017-05-04 13:08:40 UTC [52-2] LOG:  autovacuum launcher shutting down
158:M 04 May 13:08:40.510 * DB saved on disk
158:M 04 May 13:08:40.510 # Redis is now ready to exit, bye bye...
2017-05-04 13:08:40 UTC [49-1] LOG:  shutting down
2017-05-04 13:08:40 UTC [49-2] LOG:  database system is shut down

I’ve just gone back to a snapshot of before discourse being installed and followed the install guide. So it’s treated as a fresh unbuntu install.

I keep getting failed errors. I’m struggling to workout why.


#6

In order so far… After each rebuild fails :frowning:

gem install jwt -v '1.5.6'


Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/specs.4.8.gz)


gem install msgpack -v '1.1.0'


gem install mustache -v '1.0.5'


gem install rake -v '11.3.0'

It’s asked again for this.

An error occurred while installing rake (11.3.0), and Bundler cannot continue.
Make sure that `gem install rake -v '11.3.0'` succeeds before bundling.

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/specs.4.8.gz)

gem install i18n -v '0.8.1'


gem install diff-lcs -v '1.3'


gem install safe_yaml -v '1.0.4'



#7

Is there a way to force install / update all rubygems for Discourse and then rebuild app without it doing that section. As it looks like I’ve got to do it one by one. Rather confused :frowning:

It goes on!

gem install builder -v '3.2.3'


ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/specs.4.8.gz)

gem install thor -v '0.19.4'


gem install arel -v '6.0.4'


(Dean Taylor) #8

Is this a bare metal server (i.e no virtualisation)?

If not, where is the system hosted (provider) or what virtualisation system are you using?

Also it appears you have had rebuild / connectivity issues of the same / similar type previously:


Is this the same machine?
What did you do previously so solve your issue - does it need to be applied again?


#9

Same machine. it is a VM.

It used to work spot with zero problems.

Then I had the previous problem you noted. But I kept doing rebuild and it worked.

Now it’s doing it all the time. So I’m not sure what has changed to effect it. As the server has not been touched at all. It only because the SSL expired for the domain. That I am processing a rebuild.


(Dean Taylor) #10

Which operating system is the host, VM system version etc?


#11

ESXI 5.1.0 is the host.

the VM system;
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial


(Dean Taylor) #12

For me it looks like you are having network connectivity issues - possibly at the Network Virtualisation layer…

Consider checking the following:

  • Host OS is patched and up to date
  • Host VM system software is patched and up to date.
  • Restarting the Host.

#13

Thanks.

I shall give that ago and report back :slight_smile:


#14

Right update.

Rebooted host.

still didn’t work.

Did a fresh install of unbuntu and still fails on the gem install. Keeps asking me to install different gem files and asked for the same one again.

I also changed server back to DHCP and tried DNS to 8.8.8.8 8.8.4.4 just in case.

Same problem.

I’m not sure what else to do?


(Sam Saffron) #15

Try installing Ruby 2.3.1 on the host, cloning the Discourse repo and running bundle install, does that work?


#16

well…

templates/web.china.template.yml.

has seemed to have fixed it.

Why I didn’t do it sooner I don’t know!


(Kai Liu) #17

web.china.template.yml changes ruby gem server to a mirror in China. I’m curious about where your server is hosted.


#18

Hosted in the UK onsite @ work.

Both fibre lines gave same error.

one being Plusnet the other BT.

Both where pointing to DNS 8.8.8.8 8.8.4.4

so I’m not sure. I had problems before. But a few rebuild sorted it. But now it failed all the time until changing it over to China mirror.


(Kai Liu) #19

:joy::joy: I thought it is only in China that we got slow/unstable connection to official gems server. Thanks for making me feel better :laughing:


(Dean Taylor) #20

Be aware these lines might not be very diverse in any meaningful way if you use one as a backup to the other.