Closed toastedmail closed 8 years ago
duplicate of #88
I think it is great that Matt is polishing MT6... I am really looking forward to moving from MT5 to MT6.
After issue #91 was closed today, I downloaded mail-toaster.sh again, and provisioned all jails again - up to "provision haraka". But apparently I must be doing something wrong.
I still get the same error as in issue #91:
######### (...) Starting jails: cannot start jail "haraka": jail: haraka: mount: /jails/haraka/data/avg: No such file or directory #########
Very thankful for a kick in the right direction...
The problem is right here:
Starting jails: cannot start jail "haraka":
jail: haraka: mount: /jails/haraka/data/avg: No such file or directory
Hint: look in /etc/jail.conf. Figure out the problem. Instead of whining, dig in and figure it out and CONTRIBUTE something instead of just whining. Or be a decent human being and patiently wait until I get around to it.
I've had a chance to look into this. My theory is that both of you had provisioned an AVG jail in the past, and then partly removed everything and started anew. Evidence of this:
*** haraka already in /etc/jail.conf ***
The build script doesn't change/update the jail declarations in /etc/jail.conf. I haven't thought of a clever way to do that that doesn't deprive users of the ability to customize /etc/jail.conf.
When the Haraka jail was initially provisioned, the build script detected the presence of /data/avg and added a mount entry for it in Haraka's section of /etc/jail.conf. Note the difference between an install with AVG enabled and without:
haraka {
ip4.addr = lo1|172.16.15.9;
devfs_ruleset = 7;
mount += "/data/haraka $path/data nullfs rw 0 0";
mount += "/data/avg $path/data/avg nullfs rw 0 0";
mount += "/data/geoip $path/usr/local/share/GeoIP nullfs ro 0 0";
}
haraka {
ip4.addr = lo1|172.16.15.9;
devfs_ruleset = 7;
mount += "/data/haraka $path/data nullfs rw 0 0";
mount += "/data/geoip $path/usr/local/share/GeoIP nullfs ro 0 0";
}
This time around, neither of you provisioned AVG. Since the build script did NOT detect /data/avg, it also did not create the AVG directory mount point (/jails/haraka/data/avg). When the jail attempts to start, that directory doesn't exist and so the jail doesn't start.
Possible solutions:
rm /etc/jail.conf
, especially if you make different choices the next time.
* look at the extremely dangerous unprovision
command in mail-toaster.sh.mkdir /jails/haraka/data/avg
)Matt, When I made the new MT6, it was made in a brand new QEMU VM. There was no prior install of anything. I used FreeBSD 10.3-RELEASE amd/64 iso.
I don't have time right now, but I will try to reproduce the behavior and comment here on the result.
Run initial commands and provision haraka
sudo sh
fetch https://raw.githubusercontent.com/msimerson/Mail-Toaster-6/master/mail-toaster.sh
mail-toaster.sh 100% of 18 kB 6460 kBps 00m00s
sh mail-toaster.sh
loading config from mail-toaster.conf mysql enabled toaster host: mxbt1.barontel.com email domain: barontel.com shell: /bin/csh safe name: stage
. mail-toaster.sh && provision host
loading config from mail-toaster.conf mysql enabled toaster host: mxbt1.barontel.com email domain: barontel.com shell: /bin/csh safe name: stage provision-host.sh 100% of 8412 B 12 MBps 00m00s loading config from mail-toaster.conf mysql enabled toaster host: mxbt1.barontel.com email domain: barontel.com shell: /bin/csh safe name: stage
updating FreeBSD with security patches
Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching metadata signature for 10.3-RELEASE from update5.freebsd.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files... done.
No updates needed to update system to 10.3-RELEASE-p11. No updates are available to install. Run '/usr/sbin/freebsd-update fetch' first.
updating FreeBSD pkg collection
Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date.
updating FreeBSD ports tree
Looking up portsnap.FreeBSD.org mirrors... 6 mirrors found. Fetching snapshot tag from your-org.portsnap.freebsd.org... done. Fetching snapshot metadata... done. Updating from Mon Oct 31 16:44:05 EDT 2016 to Mon Oct 31 19:26:20 EDT 2016. Fetching 5 metadata patches... done. Applying metadata patches... done. Fetching 0 metadata files... done. Fetching 10 patches. (10/10) 100.00% done.
done. Applying patches... done. Fetching 0 new ports or files... done. Removing old files and directories... done. Extracting new files: /usr/ports/Mk/Scripts/ /usr/ports/Mk/bsd.port.mk /usr/ports/audio/lv2/ /usr/ports/benchmarks/iperf3/ /usr/ports/graphics/vips/ /usr/ports/math/dynare/ /usr/ports/math/matio/ /usr/ports/math/scilab/ /usr/ports/net-p2p/sonarr/ /usr/ports/security/gnupg1/ Building new INDEX files... done.
enabling NTPd
ntpd_enable: YES -> YES ntpd_sync_on_start: YES -> YES Stopping ntpd. Waiting for PIDS: 89787, 89787. Starting ntpd. sendmail_enable="NO" preserving sendmail flags ListenAddress 104.193.49.47 ListenAddress 192.168.1.95 preserving /etc/ssh/sshd_config ListenAddress
disabling syslog network listener
syslogd_flags: -b 172.16.15.1 -a 172.16.15.0/12:* -cc -> -ss Stopping syslogd. Waiting for PIDS: 89964. Starting syslogd.
checking for host listeners on all IPs
preserving pf.conf settings
TLS certificates already exist
jail_enable: YES -> YES rc.d/jail is already patched jail_list="dns mysql vpopmail dovecot webmail haproxy clamav avg redis rspamd geoip spamassassin haraka monitor" preserving existing jail order
installing jailmanage
Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking integrity... done (0 conflicting) The most recent version of packages are already installed /usr/local/sbin/jailmanage 100% of 7614 B 11 MBps 00m00s cloned_interfaces="lo1" ifconfig_lo1="172.16.15.1 netmask 255.255.255.0" syslogd_flags="-ss" NOTICE: changing syslogd flags
configuring syslog to accept messages from jails
syslogd_flags: -ss -> -b 172.16.15.1 -a 172.16.15.0/12:* -cc Stopping syslogd. Waiting for PIDS: 96040. Starting syslogd.
removing /etc/hosts toaster additions
adding /etc/hosts entries
172.16.15.1 syslog 172.16.15.2 base 172.16.15.254 stage 172.16.15.3 dns 172.16.15.4 mysql 172.16.15.8 vpopmail 172.16.15.15 dovecot 172.16.15.10 webmail 172.16.15.12 haproxy 172.16.15.5 clamav 172.16.15.14 avg 172.16.15.16 redis 172.16.15.13 rspamd 172.16.15.17 geoip 172.16.15.6 spamassassin 172.16.15.9 haraka 172.16.15.11 monitor 172.16.15.22 minecraft 172.16.15.23 joomla 172.16.15.24 php7 172.16.15.25 memcached 172.16.15.26 sphinxsearch 172.16.15.27 elasticsearch
Success! Your host is ready to install Mail Toaster 6!
provision base
172.16.15.2 provision-base.sh 100% of 7339 B 11 MBps 00m00s loading config from mail-toaster.conf mysql enabled toaster host: mxbt1.barontel.com email domain: barontel.com shell: /bin/csh safe name: stage zroot/jails/base-10.3-RELEASE@p11 snapshot exists
provision base
172.16.15.2 provision-base.sh 100% of 7339 B 11 MBps 00m00s loading config from mail-toaster.conf mysql enabled toaster host: mxbt1.barontel.com email domain: barontel.com shell: /bin/csh safe name: stage zroot/jails/base-10.3-RELEASE@p11 snapshot exists # provision haraka 172.16.15.9 provision-haraka.sh 100% of 14 kB 30 MBps 00m00s loading config from mail-toaster.conf mysql enabled toaster host: mxbt1.barontel.com email domain: barontel.com shell: /bin/csh safe name: stage zroot/jails/base-10.3-RELEASE@p11 snapshot exists zroot/data/redis filesystem exists
stage cleanup
service jail stop stage Stopping jails:. jail -r stage zroot/data/haraka filesystem exists zroot/data/geoip filesystem exists
stage jail filesystem setup
zfs clone zroot/jails/base-10.3-RELEASE@p11 zroot/jails/stage sysrc -R /jails/stage hostname=haraka hostname: base -> haraka
creating data volume
zroot/data/haraka filesystem exists zroot/data/haraka filesystem exists mkdir -p /jails/stage/data mount_nullfs /data/haraka /jails/stage/data mount /jails/stage/usr/ports mount /jails/stage/var/cache/pkg
devfs BPF ruleset already present
stage jail haraka startup
Setting hostname: haraka. Starting syslogd. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib 32-bit compatibility ldconfig path: /usr/lib32 Clearing /tmp (X related). Starting cron.
Mon Oct 31 19:50:58 EDT 2016 zroot/data/geoip filesystem exists mkdir -p /jails/stage/usr/local/share/GeoIP mount_nullfs /data/geoip /jails/stage/usr/local/share/GeoIP Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date.
installing node & npm
pkg -j stage install -y node npm gmake Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking integrity... done (0 conflicting) The following 10 package(s) will be affected (of 0 checked):
New packages to be INSTALLED: node: 6.7.0 npm: 3.9.2 gmake: 4.2.1_1 c-ares: 1.12.0 openssl: 1.0.2j,1 icu: 57.1,1 libuv: 1.9.1 python27: 2.7.12 libffi: 3.2.1 python2: 2_3
Number of packages to be installed: 10
The process will require 150 MiB more space. [haraka] [1/10] Installing libffi-3.2.1... [haraka] [1/10] Extracting libffi-3.2.1: 100% [haraka] [2/10] Installing c-ares-1.12.0... [haraka] [2/10] Extracting c-ares-1.12.0: 100% [haraka] [3/10] Installing openssl-1.0.2j,1... [haraka] [3/10] Extracting openssl-1.0.2j,1: 100% ldconfig: warning: ldconfig: No such file or directory [haraka] [4/10] Installing icu-57.1,1... [haraka] [4/10] Extracting icu-57.1,1: 100% [haraka] [5/10] Installing libuv-1.9.1... [haraka] [5/10] Extracting libuv-1.9.1: 100% [haraka] [6/10] Installing python27-2.7.12... [haraka] [6/10] Extracting python27-2.7.12: 100% [haraka] [7/10] Installing node-6.7.0... [haraka] [7/10] Extracting node-6.7.0: 100% [haraka] [8/10] Installing gmake-4.2.1_1... [haraka] [8/10] Extracting gmake-4.2.1_1: 100% [haraka] [9/10] Installing python2-2_3... [haraka] [9/10] Extracting python2-2_3: 100% [haraka] [10/10] Installing npm-3.9.2... [haraka] [10/10] Extracting npm-3.9.2: 100% Message from openssl-1.0.2j,1: Copy /usr/local/openssl/openssl.cnf.sample to /usr/local/openssl/openssl.cnf and edit it to fit your needs. Message from python27-2.7.12:
Note that some standard Python modules are provided as separate ports as they require additional dependencies. They are available as:
bsddb databases/py-bsddb gdbm databases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter
=========================================================================== Message from node-6.7.0: Note: If you need npm (Node Package Manager), please install www/npm.
installing Haraka
jexec stage pkg install -y git Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking integrity... done (0 conflicting) The following 16 package(s) will be affected (of 0 checked):
New packages to be INSTALLED: git: 2.9.2_2 expat: 2.2.0 p5-Error: 0.17024 perl5: 5.20.3_15 cvsps: 2.1_2 pcre: 8.39 p5-Authen-SASL: 2.16_1 p5-Digest-HMAC: 1.03_1 p5-GSSAPI: 0.28_1 curl: 7.50.3 p5-Net-SMTP-SSL: 1.03 p5-IO-Socket-SSL: 2.038 p5-Net-SSLeay: 1.78 p5-IO-Socket-IP: 0.37_1 p5-Socket: 2.021 p5-Mozilla-CA: 20160104
Number of packages to be installed: 16
The process will require 84 MiB more space. [haraka] [1/16] Installing perl5-5.20.3_15... [haraka] [1/16] Extracting perl5-5.20.3_15: 100% [haraka] [2/16] Installing p5-Net-SSLeay-1.78... [haraka] [2/16] Extracting p5-Net-SSLeay-1.78: 100% [haraka] [3/16] Installing p5-IO-Socket-IP-0.37_1... [haraka] [3/16] Extracting p5-IO-Socket-IP-0.37_1: 100% [haraka] [4/16] Installing p5-Socket-2.021... [haraka] [4/16] Extracting p5-Socket-2.021: 100% [haraka] [5/16] Installing p5-Mozilla-CA-20160104... [haraka] [5/16] Extracting p5-Mozilla-CA-20160104: 100% [haraka] [6/16] Installing p5-Digest-HMAC-1.03_1... [haraka] [6/16] Extracting p5-Digest-HMAC-1.03_1: 100% [haraka] [7/16] Installing p5-GSSAPI-0.28_1... [haraka] [7/16] Extracting p5-GSSAPI-0.28_1: 100% [haraka] [8/16] Installing p5-IO-Socket-SSL-2.038... [haraka] [8/16] Extracting p5-IO-Socket-SSL-2.038: 100% [haraka] [9/16] Installing expat-2.2.0... [haraka] [9/16] Extracting expat-2.2.0: 100% [haraka] [10/16] Installing p5-Error-0.17024... [haraka] [10/16] Extracting p5-Error-0.17024: 100% [haraka] [11/16] Installing cvsps-2.1_2... [haraka] [11/16] Extracting cvsps-2.1_2: 100% [haraka] [12/16] Installing pcre-8.39... [haraka] [12/16] Extracting pcre-8.39: 100% [haraka] [13/16] Installing p5-Authen-SASL-2.16_1... [haraka] [13/16] Extracting p5-Authen-SASL-2.16_1: 100% [haraka] [14/16] Installing curl-7.50.3... [haraka] [14/16] Extracting curl-7.50.3: 100% [haraka] [15/16] Installing p5-Net-SMTP-SSL-1.03... [haraka] [15/16] Extracting p5-Net-SMTP-SSL-1.03: 100% [haraka] [16/16] Installing git-2.9.2_2... ===> Creating groups. Creating group 'git_daemon' with gid '964'. ===> Creating users Creating user 'git_daemon' with uid '964'. [haraka] [16/16] Extracting git-2.9.2_2: 100% Message from perl5-5.20.3_15: The /usr/bin/perl symlink has been removed starting with Perl 5.20. For shebangs, you should either use:
!/usr/local/bin/perl
or
!/usr/bin/env perl
The first one will only work if you have a /usr/local/bin/perl, the second will work as long as perl is in PATH. Message from cvsps-2.1_2: ===> NOTICE:
The cvsps port currently does not have a maintainer. As a result, it is more likely to have unresolved issues, not be up-to-date, or even be removed in the future. To volunteer to maintain this port, please create an issue at:
https://bugs.freebsd.org/bugzilla
More information about port maintainership is available at:
https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port Message from git-2.9.2_2:
* GITWEB *** If you installed the GITWEB option please follow these instructions:
In the directory /usr/local/share/examples/git/gitweb you can find all files to make gitweb work as a public repository on the web.
All you have to do to make gitweb work is: 1) Copy the files /usr/local/share/examples/git/gitweb/ to a directory on your web server (e.g. Apache2) in which you are able to execute CGI-scripts. 2) In gitweb.cgi, adjust the variable $projectroot to point to your git repository (that is where you have your .git project directories). * GITWEB ***
* CONTRIB **** If you installed the CONTRIB option please note that the scripts are installed in /usr/local/share/git-core/contrib. Some of them require other ports to be installed (perl, python, etc), which you may need to install manually. * CONTRIB ****
jexec stage npm install -g strongloop/modern-syslog Haraka ws express /usr/local/bin/haraka -> /usr/local/lib/node_modules/Haraka/bin/haraka /usr/local/bin/spf -> /usr/local/lib/node_modules/Haraka/bin/spf /usr/local/bin/dkimverify -> /usr/local/lib/node_modules/Haraka/bin/dkimverify /usr/local/bin/haraka_grep -> /usr/local/lib/node_modules/Haraka/bin/haraka_grep
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.7.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/Haraka/node_modules/iconv/.node-gyp" gmake: Entering directory '/usr/local/lib/node_modules/Haraka/node_modules/iconv/build' CXX(target) Release/obj.target/iconv/src/binding.o CC(target) Release/obj.target/iconv/deps/libiconv/lib/iconv.o In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:209: ../deps/libiconv/lib/jisx0208.h:2381:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0100) ~~ ^
~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:210: ../deps/libiconv/lib/jisx0212.h:2161:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0460) ~~ ^~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:213: ../deps/libiconv/lib/gb2312.h:2539:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0460) ~~ ^~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:214: In file included from ../deps/libiconv/lib/isoir165.h:81: ../deps/libiconv/lib/isoir165ext.h:760:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0200) ~~ ^~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:217: In file included from ../deps/libiconv/lib/cns11643.h:38: ../deps/libiconv/lib/cns11643_inv.h:15373:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0100) ~~ ^~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:218: ../deps/libiconv/lib/big5.h:4124:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0100) ~~ ^~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:220: ../deps/libiconv/lib/ksc5601.h:2988:12: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (wc >= 0x0000 && wc < 0x0460) ~~ ^~~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:235: In file included from ../deps/libiconv/lib/gb18030.h:186: ../deps/libiconv/lib/gb18030uni.h:185:23: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (i >= 0 && i <= 39419) { ~ ^ ~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:235: ../deps/libiconv/lib/gb18030.h:249:25: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if (i >= 0 && i < 0x100000) { ~ ^ ~ In file included from ../deps/libiconv/lib/iconv.c:70: In file included from ../deps/libiconv/lib/converters.h:241: In file included from ../deps/libiconv/lib/cp950.h:130: ../deps/libiconv/lib/cp950ext.h:39:11: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((c1 == 0xf9)) {