faster server keeps respawning before failing. The only change I've made (that I can presently think of is that I allocated an ipv6 range for the server and specified the bind address as an ipv6 ipl is that not supported?
Have you had a look at the fast_server log file to see what is happening?
I have no fast_server logs at all.
Your other option is that postal status will tell you which commands are run for each part of Postal so you can try running that command manually and getting the direct output which will hopefully point you in the right direction.
postal status
Procodile Version 1.0.23
Application Root /opt/postal/app
Supervisor PID 1497
Started 2019-07-19 12:38:18 +0000
* fast.3 is not running (Failed)
|| fast
|| Quantity 1
|| Command bundle exec rake postal:fast_server
|| Respawning 5 every 3600 seconds
|| Restart mode term-start
|| Log path none specified
|| Address/Port none
|| => fast.3 Failed 13:15 pid:2664 respawns:5 port:- tag:-
so then: bundle exec rake postal:fast_server
and:
Errno::EADDRINUSE: Address already in use - bind(2) for "10.10.0.6" port 80
... that IP is the digital ocean "anchor IP"
...And I just looked at the nginx config for default and it's listening on 0.0.0.0:80 and 0.0.0.0:443. So doesn't that mean that nginx is going to listen on all network interfaces?
How is that the default config for postal? Does the fast server work for anyone using postal?
modifying the nginx conf to explicitly bind to the primary public ip fixed the above problem for me and let the fast server start:
server {
listen 165.X.X.X:80;
server_name bla.bla.com;
return 301 https://$host$request_uri;
}
server {
listen 165.X.X.X:443 ssl;
Edit: sorry, I neglected to mention that I've disabled IPV6 on this digital ocean box since they won't allow SMTP traffic over IPV6.
I've already done all that... hmm
Running bundle exec rake postal:fast_server yields the following for me:
Errno::EADDRNOTAVAIL: Cannot assign requested address - bind(2) for "2604:a880:400:d0::6af:9002" port 80
which is weird because this is the range assigned by DigitalOcean and I have DNS records pointing there and firewall clearing port 80 via their firewall UI; though I'm not sure if it does it for all IPs. Hmmm. I had no luck with DO's floating IP for fast_server and am using an IP from the IPv6 range DO gave.
rails. ☹️
Can you double check that nothing else is using that port and address combination on your server?
You may also note that others in the issues have mentioned that DO doesn't allow SMTP over IPv6 anyway so have removed it from their installations.
OK. Here's the deal. DigitalOcean assign an IPv4; just forget about the floating IPs. They also assign an IPv6 range but only the first one in the block is actually assigned; the rest are merely reserved I guess. To change this on Ubuntu you can follow their documentation but I'm also noting this here -- do the following:
sudo edit /etc/netplan/50-cloud-init.yaml. The example in their documentation
network:
version: 2
ethernets:
eth0:
addresses:
- 203.0.113.213/20
- your_primary_ipv6_address/64
- your_additional_ipv6_address/64
- 192.0.2.11/16
gateway4: 206.189.208.1
gateway6: ipv6_gateway
match:
macaddress: ce:2c:ex:am:pl:e6
They give you 16 IPv6 address, put as many of them from your block in that you want to use.
According to the documentation to apply the change and test:
Et Voilà, IPv6 working for fast_server -- or at least it isn't respawning or failing. Which is nice.
Happy to add this to your wiki later today or tomorrow
But for the fast_server isn’t smtp and requires a separate ip. So if it’s possible ipv6 is worth a shot. VPS’s give plenty of them and are quite stingy with ipv4 addresses.
Sent from my iPhone
On Jul 19, 2019, at 9:17 AM, Will Power notifications@github.com wrote:
Can you double check that nothing else is using that port and address combination on your server?
You may also note that others in the issues have mentioned that DO doesn't allow SMTP over IPv6 anyway so have removed it from their installations.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.