Getting UnknownHostError from Gem::RemoteFetcher on new install


#1

I’ve just done a fresh install as I couldn’t view site any more randomly.

I had a backup so I didn’t mind.

But following the guide to a T it does not want to build?

Ubuntu 16.04

It work perfectly before hand. Nothing has changed?

Fresh Ubuntu + SSH setup + Static IP.

Then follow guide and it fails.

From viewing the logs. This gets repeated alot.

There are lots of these?? also.
Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/tilt-2.0.2.gem
Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/sprockets-3.6.0.gem)
Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/message_bus-2.0.0.beta.5.gem)

Bottom Error
RuntimeError: cd /var/www/discourse && su discourse -c ‘bundle install --deployment --verbose --without test --without development’ failed with return #<Process::Status: pid 294 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn’
exec failed with the params {“cd”=>"$home", “hook”=>“bundle_exec”, “cmd”=>[“su discourse -c ‘bundle install --deployment --verbose --without test --without development’”, “su discourse -c ‘bundle exec rake db:migrate’”, “su discourse -c ‘bundle exec rake assets:precompile’”]}
5f5ec921ad61417df5f46f7dc328840d2138bce08457b43626d3192876773143


Gem Install SSL CONNECT ERROR
(Rafael dos Santos Silva) #2

Are you on china?


#3

China? Not as far as I’m aware. I’m UK based same as server.


(Rafael dos Santos Silva) #4

Can you curl ruby gems?

curl https://rubygems.org

Edit: Looks like this:


#5

I’ve just changed the server DNS to 8.8.8.8 8.8.8.4 and am trying again. So we shall see what happens. Will update once completed.


#6

changing dns fixed my problem.

Which may of been the cause to why I couldn’t access the site.