This plugin was enabled (but isn’t for now):
https://github.com/muhlisbc/discourse-images-guardian
And I’m currently trying to work out if this commit broke the Nginx config:
https://github.com/muhlisbc/discourse-images-guardian/commit/8a79b86d0a0f344504a75a38eb417c820787b3bb
I can’t see anything in the app.yml
file that could affect the Nginx config, and the YAML appears to be valid, I just tested it with yamllint containers/app.yml
and the only issues were with whitespace and line length.
To try to shed some light on the problem:
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
- exec: ls -lah /etc/nginx/
- exec: /usr/sbin/nginx -t -c /etc/nginx/nginx.conf
- exec: /usr/sbin/nginx -t -c /etc/nginx/letsencrypt.conf
- exec: /usr/sbin/nginx -t -c /etc/nginx/fastcgi.conf
And this resulted in:
I, [2019-03-29T14:28:53.182369 #14] INFO -- : > /usr/sbin/nginx -t -c /etc/nginx/nginx.conf
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Which looks good, but then:
I, [2019-03-29T14:28:53.209517 #14] INFO -- : > /usr/sbin/nginx -t -c /etc/nginx/letsencrypt.conf
nginx: the configuration file /etc/nginx/letsencrypt.conf syntax is ok
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/letsencrypt.conf test failed
I, [2019-03-29T14:28:53.218977 #14] INFO -- :
...
FAILED
--------------------
Pups::ExecError: /usr/sbin/nginx -t -c /etc/nginx/letsencrypt.conf failed with return #<Process::Status: pid 2355 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "/usr/sbin/nginx -t -c /etc/nginx/letsencrypt.conf"
f42e20c75dda3fa8b80905d1ad3159a30ca16aea69bc2a7f392cf566f33e02da
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
So the issues is with the IPv6 address? The server does have the following in /etc/sysctl.conf
— the VM isn’t setup for IPv6:
# https://serverfault.com/a/660985
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
So perhaps I need to disable IPv6 for Nginx and or Docker?
Or perhaps sed
can save the site?
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
- exec: sed -e 's/listen \[::\]:80;/#listen [::]:80;/' -i /etc/nginx/letsencrypt.conf
- exec: /usr/sbin/nginx -t -c /etc/nginx/letsencrypt.conf