You are here
deutrino - Sun, 2021/10/03 - 09:15
the mediawiki build is blowing up in tkldev, apparently because it's trying to start apache??
I cloned the mediawiki repo in products and ran 'make'
fab-chroot build/root.patched --script conf.d/main + DB_NAME=mediawiki + DB_USER=mediawiki + mcookie + DB_PASS=95134a2f46f0e96b051cee8d1c066b54 + ADMIN_NAME=admin + ADMIN_PASS=turnkey123 + SRC=/usr/local/src + WEBROOT=/var/www/mediawiki + tar xf /usr/local/src/mediawiki-1.35.1.tar.gz -C /usr/local/src + rm -rf /usr/local/src/mediawiki-1.35.1.tar.gz + mv /usr/local/src/mediawiki-1.35.1 /var/www/mediawiki + chown -R www-data:www-data /var/www/mediawiki + service mysql start [ ok ] Starting MariaDB database server: mysqld. + service apache2 start AH00112: Warning: DocumentRoot [/var/www/html] does not exist AH00557: apache2: apr_sockaddr_info_get() failed for tkldev AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message + a2dissite 000-default Site 000-default disabled. To activate the new configuration, you need to run: systemctl reload apache2 + a2ensite mediawiki Enabling site mediawiki. To activate the new configuration, you need to run: systemctl reload apache2 + a2enmod rewrite Enabling module rewrite. To activate the new configuration, you need to run: systemctl restart apache2 + service apache2 reload httpd not running, trying to start (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
Forum:
Muliple builds?
It looks to me as though you already have apache2 running. Perhaps in another build? In tkldev, each "appliance" is built in a chroot. but chroot's are not containers, all chroot's still share the same ports. Since apache uses port 80, and apache is commonly used with a lot of appliances, it's pretty common for 1 build (even a failed build) which was not properly cleaned to cause issues with another build. If this is the case, luckily it's an easy fix. First confirm it is an extra copy of apache by running the following on your tkldev:
should show apache running if not, check the output of this:
Which will likely show nginx, or some other webserver interfering.
Next we need to figure out which appliances might be mounted, and therefor potentially interfering. We can do this with:
Which runs `mount` (the mount command without arguments will list all mounted filesystems), filters by overlay mount-type, then uses regex to pull the appliance name out of the path. Alternatively you could just run
And just look for any line that begins with "overlay on" and includes "/turnkey/fab/[appliance-name-here]/build/..."
The last step is figuring out which of these appliances are running apache/something bound to port 80. If you've only got a couple of appliances, and you've already built them,the easiest way to ensure none of them are interfering with the mediawiki build is to clean each of your other builds, this will remove the chroots entirely along with any processes running inside them, make sure you've already copied out any build artifacts you want to keep then run the following:
If you don't want to clean the build, you can instead
This will preserve the build, but stop apache2. If this is the issue you're encountering, you may experience it again with other software, for example mysql. The fix will also be the same, although the port may be different.
Is there a downside to
Is there a downside to running 'make clean' ?
I didn't realize the build process could leave services etc running.
It's certainly not intuitive
downside is relative to your goals but make clean is roughly equivilent to the following:
If you want to preserve the chroots of your previous builds, failed or otherwise then you'll need to manually go in and stop any running services. If you only want to preserve the built iso then just copy/move it out before cleaning. If you're using buildtasks rather than making directly and the build successfully completed this is irrelevant as all artifacts (containers, images, etc.) are copied out of the build directory after it finishes.
(You may be interested in the tkldev docs https://github.com/turnkeylinux-apps/tkldev/tree/master/docs if you want to understand the build process in more detail they're a little old, but it should still hold up)
As far as leaving processes running, yeah It's certainly not intuitive, but often very useful for debugging, hopefully sometime in the not-so-distant future we'll move to systemd-containers instead of chroots so this'll be a non issue and we can have the best of both worlds.
Add new comment