kushanx
(Kushan Liyanarachchi)
2015 年 1 月 10 日午後 11:53
1
root@daysrilanka:~# mkdir /var/discourse
root@daysrilanka:~# git clone https://github.com/discourse/discourse_docker.git /var/discourse
Cloning into '/var/discourse'...
remote: Counting objects: 1353, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 1353 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (1353/1353), 301.74 KiB | 115.00 KiB/s, done.
Resolving deltas: 100% (791/791), done.
Checking connectivity... done.
root@daysrilanka:~# cd /var/discourse
root@daysrilanka:/var/discourse# cp samples/standalone.yml containers/app.yml
root@daysrilanka:/var/discourse# nano containers/app.yml
root@daysrilanka:/var/discourse# ./launcher bootstrap app
WARNING: No swap limit support
Unable to find image 'samsaffron/discourse:1.0.7' locally
Pulling repository samsaffron/discourse
22d62951587e: Pulling image (1.0.7) from samsaffron/discourse
22d62951587e: Pulling image (1.0.7) from samsaffron/discourse, endpoint: https://registry-1.docker.io/v1/
22d62951587e: Pulling dependent layers
511136ea3c5a: Pulling metadata
511136ea3c5a: Pulling fs layer
511136ea3c5a: Download complete
7e2a471a454a: Pulling metadata
7e2a471a454a: Pulling fs layer
7e2a471a454a: Download complete
cdb5237bc8a7: Pulling metadata
cdb5237bc8a7: Pulling fs layer
cdb5237bc8a7: Download complete
fa6d84c1e733: Pulling metadata
fa6d84c1e733: Pulling fs layer
fa6d84c1e733: Download complete
91cf3969bafa: Pulling metadata
91cf3969bafa: Pulling fs layer
91cf3969bafa: Download complete
22d62951587e: Pulling metadata
22d62951587e: Pulling fs layer
22d62951587e: Download complete
22d62951587e: Download complete
Status: Downloaded newer image for samsaffron/discourse:1.0.7
This user has no SSH key, but a SSH key is required to access the Discourse Docker container.
Generate a SSH key? (Y/n) Y
Generating SSH key
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
68:4c:97:44:a9:76:0f:33:c5:89:82:63:6f:76:09:2c root@daysrilanka.com
The key's randomart image is:
+--[ RSA 2048]----+
| o .o+ . |
| E +.o.+ |
| . +.+oo |
| o*oB |
| ++oS= |
| . . |
| |
| |
| |
+-----------------+
Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=codedbykush@gmail.com -e DISCOURSE_HOSTNAME=100.daysrilanka.com -e DISCOURSE_SMTP_ADDRESS=smtp.mandrillapp.com
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com
5a57c4f199e4199c5bbc348a82ef798c2e929112bb8ff8c4250630d99b4e8a5a
FAILED TO BOOTSTRAP
I have checked a ping to github.com and it is working properly.
root@daysrilanka:/var/discourse# ping github.com
PING github.com (192.30.252.128) 56(84) bytes of data.
64 bytes from github.com (192.30.252.128): icmp_seq=1 ttl=55 time=240 ms
64 bytes from github.com (192.30.252.128): icmp_seq=2 ttl=55 time=234 ms
64 bytes from github.com (192.30.252.128): icmp_seq=3 ttl=55 time=240 ms
Anyone can direct me to the error?
I can’t provide access to my DigitalOcean Droplet
Regards,
「いいね!」 1
Could it be to do with the recent blocking of GitHub?
You could try testing your connectivity to GitHub by running the following command:
wget --output-document=/dev/null https://github.com/discourse/discourse_docker.git
This should give you output similar to this:
root@forum:~# wget --output-document=/dev/null https://github.com/discourse/discourse_docker.git
--2015-01-10 20:06:43-- https://github.com/discourse/discourse_docker.git
Resolving github.com (github.com)... 192.30.252.130
Connecting to github.com (github.com)|192.30.252.130|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/discourse/discourse_docker [following]
--2015-01-10 20:06:44-- https://github.com/discourse/discourse_docker
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/dev/null’
[ <=> ] 52,784 205KB/s in 0.3s
2015-01-10 20:06:44 (205 KB/s) - ‘/dev/null’ saved [52784]
EDIT: It does look like a connectivity / availability issue though - trying again after a period of time is a good step.
kushanx
(Kushan Liyanarachchi)
2015 年 1 月 11 日午後 1:04
5
Thanks for the tips. I’ll check them asap. I’m not in or from India. I
use git daily for learning purposes. And the digital ocean droplet is
located in Singapore.
I CAN PROVIDE access to it. Made a mistake in the first post.
Stefan
(Stefan)
2015 年 1 月 11 日午後 1:10
6
Edit /etc/default/docker and uncomment the following line:
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
After this, restart docker and rebuild. I had the same issue today.
The solution is taken from
https://meta.discourse.org/t/afatal-unable-to-access-https-github-com-samsaffron-pups-git-could-not-resolve-host-github-com/18611/7?u=stefan
「いいね!」 8
genachka
(Genachka)
2015 年 2 月 3 日午後 10:40
7
@Stefan thanks, this resolved it for me.
danlucraft
(Daniel Lucraft)
2015 年 10 月 21 日午前 9:54
8
I have the same problem,
fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com"_ during `./launcher rebuild app`.
My installation was all working fine for a week beforehand but today it told me Sidekiq wasn’t running so I went to rebuild, which has now failed.
I can ping github outside the container and the wget test above also works fine. I’ve tried with and without the DNS options in /etc/default/docker (and restarted the docker service after editing each time).
If it matters, I have added --iptables=false to the DOCKER_OPTS variable, as I wanted to restrict access to the Discourse install by IP with ufw. I am not blocking outgoing traffic at all (and as I said pinging github works anyway).
Any more ideas?
EDIT: there are no other error messages. Also “Fetching origin” seems to complete without errors (and the first time it actually pulled so commits) so I’m very confused as to why only on the pups repo it can’t resolve Github.
riking
(Kane York)
2015 年 10 月 23 日午前 4:58
9
danlucraft:
If it matters, I have added --iptables=false to the DOCKER_OPTS variable, as I wanted to restrict access to the Discourse install by IP with ufw. I am not blocking outgoing traffic at all (and as I said pinging github works anyway).
What happens if you try without that?
「いいね!」 1
danlucraft
(Daniel Lucraft)
2015 年 10 月 23 日午前 8:16
10
It works! Thank you
So I need to disable that to rebuild and then reenable it afterwards. Or will it cause problems if I leave the option in while the container is running?
danlucraft
(Daniel Lucraft)
2015 年 10 月 23 日午前 8:49
11
It no longer works at all with the --iptables=false option. Now the site returns a Bad Gateway when that option is present. That’s weird because it worked fine with it with for over a week before.
Any advice on how to restrict access to port 80 by IP? I was using ufw to set the policy but Docker seems to completely bypass that using iptables directly.
xiasummer
(xiasummer)
2019 年 9 月 19 日午前 6:46
12
How to restart docker?
Fine, I find the best solution is simply to reboot the server and wait for a while.
sudo reboot
neounix
(Dark Matter)
2020 年 6 月 27 日午後 1:14
13
今日は、新しい Discourse の Docker インストールで、全く同じ問題に遭遇しました。
@Stefan さんが上記で投稿された同じ解決策で問題を解決しました(ありがとう!):
編集:
/etc/default/docker
以下の行のコメントアウトを外してください:
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
このようになります:
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
その後:
systemctl restart docker
これで、ランチャーの bootstrap コマンドと rebuild コマンドが DNS 問題でフリーズしたり失敗したりしなくなります。
apt を使って複数の Ubuntu ディストリビューションに Docker をインストールしてきましたが、このインストールだけがこの問題を抱えていたのは不思議です。
# lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
「いいね!」 2
minipunch
(Josh Yolles)
2020 年 12 月 4 日午後 10:21
14
その行のコメントアウトを外し、Dockerを再起動して /discourse-setup を再実行しましたが、何らかの理由で github.com の解決ができません
Ubuntu 20.04 を使用しており、Docker の再インストールも試みました。
# lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal