ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)


(Julien Cohen Adad) #1

Hi,

trying to install discourse and I ran into the following issue:

I, [2018-07-27T02:56:32.505452 #18] INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run

I, [2018-07-27T02:56:32.505871 #18] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git

Cloning into 'docker_manager'...

I, [2018-07-27T02:56:33.320313 #18] INFO -- : 

I, [2018-07-27T02:56:33.320809 #18] INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf

I, [2018-07-27T02:56:33.324476 #18] INFO -- : 

I, [2018-07-27T02:56:33.324793 #18] INFO -- : > rm /etc/nginx/sites-enabled/default

I, [2018-07-27T02:56:33.327168 #18] INFO -- : 

I, [2018-07-27T02:56:33.327446 #18] INFO -- : > mkdir -p /var/nginx/cache

I, [2018-07-27T02:56:33.330117 #18] INFO -- : 

I, [2018-07-27T02:56:33.330492 #18] INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf

I, [2018-07-27T02:56:33.330956 #18] INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf

I, [2018-07-27T02:56:33.331361 #18] INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf

I, [2018-07-27T02:56:33.331752 #18] INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf

I, [2018-07-27T02:56:33.332098 #18] INFO -- : > echo "done configuring web"

I, [2018-07-27T02:56:33.334465 #18] INFO -- : done configuring web

I, [2018-07-27T02:56:33.334847 #18] INFO -- : > cd /var/www/discourse && gem update bundler

ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)

timed out (https://api.rubygems.org/specs.4.8.gz)

I, [2018-07-27T02:57:33.836094 #18] INFO -- : Updating installed gems

I, [2018-07-27T02:57:33.836504 #18] INFO -- : Terminating async processes

I, [2018-07-27T02:57:33.836572 #18] 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: 73

189:signal-handler (1532660253) Received SIGTERM scheduling shutdown...

I, [2018-07-27T02:57:33.836648 #18] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 189

2018-07-27 02:57:33.836 UTC [73] LOG: received fast shutdown request

2018-07-27 02:57:33.840 UTC [73] LOG: aborting any active transactions

2018-07-27 02:57:33.842 UTC [73] LOG: worker process: logical replication launcher (PID 82) exited with exit code 1

2018-07-27 02:57:33.845 UTC [77] LOG: shutting down

2018-07-27 02:57:33.879 UTC [73] LOG: database system is shut down

189:M 27 Jul 02:57:33.880 # User requested shutdown...

189:M 27 Jul 02:57:33.880 * Saving the final RDB snapshot before exiting.

189:M 27 Jul 02:57:33.887 * DB saved on disk

189:M 27 Jul 02:57:33.887 # Redis is now ready to exit, bye bye...

FAILED

--------------------

Pups::ExecError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 302 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", "chown -R discourse $home"]}

12d9dd4d8006216ce99477d1ab3bafb55f4e293f39fb6f33af7df6bea5b5ec54

** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Any help appreciated,
Thanks
Julien


(Matt Palmer) #2

Your network – specifically DNS resolution – is broken.


(Julien Cohen Adad) #3

@mpalmer Thank you very much for your quick reply. I will investigate.


(Julien Cohen Adad) #4

So, I suspect the problem comes from the CNAME record. My domain is managed by Namecheap, so I followed this article, however I could not add the CNAME record because my server only has an IP address, hence I could not enter a URL under the field value. Therefore, I instead added an “A Record” with Host=forum and value=IP_ADDRESS.

Additional information:

host forum.spinalcordmri.org
--> forum.spinalcordmri.org has address 199.241.167.44

host 199.241.167.44
--> Host 44.167.241.199.in-addr.arpa. not found: 3(NXDOMAIN)

I am probably doing something wrong, so if someone could kindly point out the procedure that would be great.

Thanks,
Julien


(Michael - DiscourseHosting.com) #5

This is not about the DNS setup for the domain you want to use, but the problem is caused by your server unable to use the DNS to lookup other hosts in order to download code.