msimerson / Mail-Toaster-6

Mail Toaster 6
https://github.com/msimerson/Mail-Toaster-6/wiki
BSD 3-Clause "New" or "Revised" License
47 stars 16 forks source link

12.2-REL Issues provisioning vpopmail (again) #471

Closed lunaticds closed 2 years ago

lunaticds commented 3 years ago

Expected behavior

Expect vpopmail jail to complete provisioning successfully (on a fresh 12.2-RELEASE=p4 build).

Observed behavior

Provisioning script ends at: . checking for port 80 listener in staged jail checking port 80 port 80 is NOT listening

Looking back through output, I observe: lighttpd_enable: -> YES jexec stage service lighttpd start Starting lighttpd. 2021-03-13 05:57:17: network.c.221) warning: please use server.use-ipv6 only for hostnames, not without server.bind / empty address; your config will break if the kernel default for IPV6_V6ONLY changes 2021-03-13 05:57:17: network.c.369) can't bind to socket: [::]:80: Address already in use /usr/local/etc/rc.d/lighttpd: WARNING: failed to start lighttpd

There is nothing bound to port 80 on the host - it's a fresh install, patched then installed as per instructions. The end result does not provision the jail successfully.

Steps to reproduce

Followed install steps as documented all the way to: # . mail-toaster.sh && provision vpopmail Then ended at the point above. Have rebuilt a number of times ending with same result. No additional options selected when prompted during install - everything has been step by step with the only changes being replacing the server.key and crt for my SSL certificate and the addition of my local DNS servers in the DNS jail config (though I have tested without touching this to same result). I've been attempting to get around this for 2 days without much luck. I seem to have experienced this last year in September on 12-1 with the same result.

msimerson commented 3 years ago

After the failure, there will be a jail named 'stage' around. Hop into that jail and figure out why lighttpd isn't running. It's likely a config issue.

lunaticds commented 3 years ago

Ah.. cool. Jumped in and changed the config file /usr/local/etc/lighttpd/lighttpd.conf and commented out the server.use-ipv6 = "enable" line then was able to get lighttpd to start successfully.

msimerson commented 3 years ago

Is your server lacking IPv6 addresses? Or has something in a lighttpd update caused this to break for you/some/everyone.

lunaticds commented 3 years ago

No IPv6 on that particular VLAN. I can change that if this is too hard to work around.

msimerson commented 3 years ago

I don't think you need to have IPv6 externally, but you should still have IPv6 enabled on the jails. Then, if/when you do get an IPv6 allocation, it's just some firewall rules to update and you're in business.

lunaticds commented 3 years ago

Yeah fair call. The network technically has IPv6. For some reason the internet network isn't being allocated them. I'll go hunting that down and see if I can sort that out. Thanks for your help Matt.

lunaticds commented 3 years ago

OK - at this point the host itself has IPv6, as does its entire VLAN. I haven't actually nuked IPv6 within the toaster config, so they should all be able to talk IPv6 still. Attempted to provision Vpopmail again with same result.

msimerson commented 3 years ago

I guess I haven't documented this yet, but:

  1. after the build failure, jump into the staged jail and fix the issue
  2. promote the jail: promote_staged_jail vpopmail
lunaticds commented 3 years ago

Cool, I'll keep that handy. Just for giggles (and because I can now do it blind folded), I re-run the build from base on wards with the host having IPv6 config... this time, it's worked. I'll finish the build and see what happens.

lunaticds commented 3 years ago

The vpopmail jail is still temperamental If I try to promote it, it throws the error "Starting jails: cannot start jail "vpopmail": jail: vpopmail: mount: /jails/vpopmail/data: No such file or directory" right before it tells me "success".

I've found a couple of times if I re-provisioned some of the earlier jails again, it would work, but things like Dovecot would get completely bjorked. Hard to tell if the lighttpd problem is the only issue in there. I did try a build on a VPS just to compare, which managed to get past it (it was built off an ugpraded 12.0-REL ISO instead of 12.2-REL), but it ran into issues later building Haraka.

msimerson commented 2 years ago

I've built several toasters this week and ironed out all the build issues that have surfaced.