If it is not one thing is another. Hopefully someone can help me isolate what is wrong.
I tried repeatedly to get discourse to work on an OpenSuse 13.2 server at the colo, but no joy, and it appears it is not well supported on that platform.
I have repeatedly completely uninstalled/removed docker, discourse, /var/discourse, removed images, containers, etc. I am perfectly willing to start fresh again if needed.
And that server, though it had a block of many IPs, I kept fighting over the ports, and setting up nginx while battling with all the other webservers running (Apache, Plone, etc.). So I tried setting up on my own laptop, but again OpenSuse 13.2 seemed to have a lot of issues with the setup.
So I setup an old laptop, completely fresh server install, with nothing else on it, with Ubuntu 16.04 LTS server, hoping the closer match to the instructions would solve things, however this is an at-home NAT network, so using proper DNS seemed to be tripping me up. I had setup portforwarding, and dns (I control my own dns servers at various colos). So i tried just configuring the host to only use the IP address. I'm a newb to docker and discourse, and I'm missing something somewhere.
It seems to be running, but I just can't for the life of me seem to figure out what piece I am missing so that it is accessible.
I tried several different instructions from several locations. Here is one (of several I tried) I have been following the directions step-by-step here still to now avail.:
https://www.digitalocean.com/community/tutorial/how-to-install-discourse-on-ubuntu-14-04
But after everything is setup, I just get access denied on the server, even when doing lynx 172.17.0.1 or lynx 192.168.2.16 (the docker/discourse/app ip and the laptop/server ip respectively), and when trying to hist 192.168.2.16 from another computer on the same home network.
I'm not seeing where I can get some good logging information turned up so I can better debug, so I am hoping folks will be kind enough to walk me through troubleshooting this?
cat /proc/sys/net/ipv4/ip_forward
1
ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:20:24:0f:bc
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:20ff:fe24:fbc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:339781 errors:0 dropped:0 overruns:0 frame:0
TX packets:339488 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22368991 (22.3 MB) TX bytes:114341055 (114.3 MB)
enp5s0 Link encap:Ethernet HWaddr 00:16:36:e1:e0:70
inet addr:192.168.2.16 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: 2601:602:c000:bdfc:216:36ff:fee1:e070/64 Scope:Global
inet6 addr: fe80::216:36ff:fee1:e070/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:384670 errors:0 dropped:427 overruns:0 frame:0
TX packets:339498 errors:4 dropped:0 overruns:0 carrier:4
collisions:434 txqueuelen:1000
RX bytes:123207216 (123.2 MB) TX bytes:29004392 (29.0 MB)
Interrupt:18 Memory:da000000-da020000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:96 errors:0 dropped:0 overruns:0 frame:0
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:7184 (7.1 KB) TX bytes:7184 (7.1 KB)
veth107b9cb Link encap:Ethernet HWaddr 2a:2c:34:62:48:c9
inet6 addr: fe80::282c:34ff:fe62:48c9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:360 errors:0 dropped:0 overruns:0 frame:0
TX packets:360 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28542 (28.5 KB) TX bytes:120453 (120.4 KB)
ping 172.17.0.1
PING 172.17.0.1 (172.17.0.1) 56(84) bytes of data.
64 bytes from 172.17.0.1: icmp_seq=1 ttl=64 time=0.081 ms
lynx 172.17.0.1
Looking up '172.17.0.1' first
Looking up 172.17.0.1 first
Looking up 172.17.0.1
Making HTTP connection to 172.17.0.1
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://172.17.0.1/
lynx 192.168.2.16
Looking up '192.168.2.16' first
Looking up 192.168.2.16 first
Looking up 192.168.2.16
Making HTTP connection to 192.168.2.16
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://192.168.2.16/
netstat -na | grep LIST
tcp 0 0 0.0.0.0:4422 0.0.0.0:* LISTEN
tcp6 0 0 :::4422 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DOCKER-ISOLATION all -- anywhere anywhere
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:https
ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:http
Chain DOCKER-ISOLATION (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
ps -ef | grep discourse
d2dadmin 14687 14608 0 15:35 ? 00:00:04 sidekiq 4.2.4 discourse [0 of 5 busy]
message+ 14953 14591 0 15:35 ? 00:00:00 postgres: 9.5/main: discourse discourse [local] idle
message+ 15065 14591 0 15:35 ? 00:00:00 postgres: 9.5/main: discourse discourse [local] idle
message+ 15146 14591 0 15:35 ? 00:00:00 postgres: 9.5/main: discourse discourse [local] idle
message+ 15171 14591 0 15:35 ? 00:00:00 postgres: 9.5/main: discourse discourse [local] idle
message+ 16879 14591 0 15:49 ? 00:00:00 postgres: 9.5/main: discourse discourse [local] idle
ps -ef | grep docker
root 13013 1 0 15:33 ? 00:00:02 /usr/bin/dockerd -H fd://
root 13021 13013 0 15:33 ? 00:00:00 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --runtime docker-runc
root 14509 13013 0 15:34 ? 00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 443 -container-ip 172.17.0.2 -container-port 443
root 14518 13013 0 15:34 ? 00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.17.0.2 -container-port 80
root 14524 13021 0 15:34 ? 00:00:00 docker-containerd-shim 5620389761ce36103721914d23d0d12a4b229c6c2acca30bff2695a7e6a7be2d /var/run/docker/libcontainerd/5620389761ce36103721914d23d0d12a4b229c6c2acca30bff2695a7e6a7be2d docker-runc
lynx 172.17.0.2
Looking up '172.17.0.2' first
Looking up 172.17.0.2 first
Looking up 172.17.0.2
Making HTTP connection to 172.17.0.2
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://172.17.0.2/
cat app.yml
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- "templates/web.ssl.template.yml"
- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
- "80:80" # http
- "443:443" # https
params:
db_default_text_search_config: "pg_catalog.english"
## Set db_shared_buffers to a max of 25% of the total memory.
## will be set automatically by bootstrap based on detected RAM, or you can override
db_shared_buffers: "256MB"
## can improve sorting performance, but adds memory usage per-connection
#db_work_mem: "40MB"
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
env:
LANG: en_US.UTF-8
# DISCOURSE_DEFAULT_LOCALE: en
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
UNICORN_WORKERS: 4
## TODO: The domain name this Discourse instance will respond to
DISCOURSE_HOSTNAME: 192.168.2.16
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: 'remmedout@gmail.com'
## TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: remmedout@gmail.com
DISCOURSE_SMTP_PASSWORD: "remmedout"
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: remmedout@gmail.com
## The CDN address for this Discourse instance (configured to pull)
## see https://meta.discourse.org/t/14857 for details
#DISCOURSE_CDN_URL: //discourse-cdn.example.com
## The Docker container is stateless; all data is stored in /shared
volumes:
- volume:
host: /var/discourse/shared/standalone
guest: /shared
- volume:
host: /var/discourse/shared/standalone/log/var-log
guest: /var/log
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
#- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
- exec: echo "End of custom commands"
Please let me know what else I can do/provide to troubleshoot the problem.
Thanks!