=== ashleyd is now known as ashd [11:10] Hi, I'm trying to figure out why my apache daemon doesn't start. I'm running on ubuntu 17.04. It times out when trying to start and I get no output other than that in syslog, journalctl, access.log or error.log. I removed all symlinks in sites-enabled, but no improvement. [11:11] what does a config file check say [11:11] you should get something in the error log [11:11] and you should get something from journalctl [11:13] ikonia: how do I do a config file check? (I assume you're talking about something automatic) [11:13] apachectl configtest [11:14] there you go, as max said [11:15] AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message [11:15] Syntax OK [11:17] I'm waiting for it to timeout so I can paste you the log for journalctl [11:17] so there is something you should fix to make life easier [11:17] it's got no FQDN so it's defaulting to the loopback address [11:18] thats going to make it pretty worthless unless you access it on localhost [11:18] ikonia: I have that set up in two different virtualhosts that I disabled while trying to figure this out. [11:19] it's pointless then [11:19] becuase you're trying to figure out something that is broken [11:19] but something you're not going to use [11:19] test it properly [11:19] and even if you add two other virtualhosts, that base config will still be there [11:19] ServerName still needs to be set outside the virtualhosts [11:19] Well.... you can get by with a wrong ServerName if the server isn't generating self-referential URLs a lot of the time. Not that you *should*, of course. But it's a relatively minor wart compared to the server not starting up cleanly [11:20] it's noise that's not needed [11:20] That's true [11:20] what would you recommend I set it to? in general terms of course. It won't be listening for anything on that adress, or should I reuse one of the virtualhosts domain name? [11:21] If you're certain all your traffic is going to hit a and nothing is going to be processed by the default server, you can quite happily get by with "ServerName default.server.unused" or any other designator for the admin's eyes only [11:21] maxb: ok, I'll use that =) [11:22] it needs to be resolvable though [11:22] google.com? [11:22] Eww [11:22] even if it's just resolvable by the hostfile [11:22] don't be silly [11:22] you're going to tell your server to listen on a google.com IP ? [11:23] ikonia: something that's just resolvable locally sounds fine [11:23] It needs to be resolvable? I have production stuff quite happily using a name non-existent in DNS or hosts to represent the unused base server [11:23] maxb: if it's not resolvable it drops back to localhost [11:24] x-ref the warning you see [11:24] 'drops back to' ? [11:24] Could not reliably determine the server's fully qualified domain name using 127.0.1.1 [11:24] it can't resolve the servers FQDN - so it drops back to using the localhost IP [11:24] using the IP for what? [11:25] ServerName value [11:26] Doow: has it timed out yet ? [11:26] ikonia: yeah, got occupied by the ServerName ;) [11:29] https://paste.ubuntu.com/24573808/ [11:29] that's from journalctl -xe [11:30] PWD=/home/user/apache/mods-enabled [11:30] ?? [11:31] what's that about [11:31] ikonia: just a backup folder I was standing in when doing sudo systemctl start apache2.service [11:31] Doow: pastebin the apache error.log [11:32] ikonia: it's 0 bytes long [11:32] ok - so it's not even trying to start [11:32] is this a clean/standard 17.04 install [11:32] or have you done anything with it / got external software etc [11:33] no, it's an upgrade from 16.10 [11:33] and I added some mods, I'm running owncloud and a custom django site [11:34] pastebin the output of systemctl status apache2.service [11:34] as well as set up https for those two sites [11:36] https://paste.ubuntu.com/24573830/ [11:38] do a manual start [11:38] httpd -f /where/your/config/file/is [11:40] That won't work, rather, try 'APACHE_STARTED_BY_SYSTEMD=1 apachectl -e debug' [11:41] Ubuntu renames the httpd binary to apache2, and supplies a configuration file which requires various environment variables set via apachectl to complete the configuration [11:41] you should still be able to do apache2 -f to get a base start up [11:41] and hopefully a bit of noise on problems [11:41] maxb: interesting that you can set APACHE_STARTED_BY_SYSTEMD [11:42] didn't know that [11:42] 'apache2 -f /etc/apache2/apache2.conf' will just give you a complaint about 'Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}' or similar [11:43] (Unless of course you rewrite the Ubuntu default config file to avoid the use of environment interpolations - then your method would be OK) [11:43] maxb: thats intersting, I'd have not expected that [11:44] The Ubuntu default config is a bit too complicated for the average user's needs, in my opinion [11:44] I'd not considered that, but yes, if t's going to depend on "system" variables to actually run over config file based variables, that would add confusion [11:45] yeah, it complains about a number of settings that are in /etc/apache2/envvars (as you said maxb). Then it also have some problems with permissions, should I run this as www-data? or root? (everything in /etc/apache2 is owned by root:root) [11:45] You should be doing this as root [11:46] I'm sure the few people who want to run multiple isolated httpd processes with different configs on the same server are very thankful for all the hooks that Ubuntu provides to make that easy - but they can confuse the situation for majority who don't want that. [11:46] maxb: which to be fair will be a minority [11:47] APACHE_STARTED_BY_SYSTEMD=1 apachectl -e debug: command not found [11:47] The quotes I included were only for the benefit of showing the command in context in IRC - they weren't intended to be literally entered at the shell [11:47] I assume it should set, or export or something before that? (my bash scripting is not up to par unfortunately [11:48] maxb: ok, now it starts without complaining, let me check some logs =) [11:55] maxb, ikonia: I tried enabling everything again, both sites, etc, and it seems to be working as long as I launch with -debug and APACHE_STARTED_BY_SYSTEMD=1 as per above [11:56] First, swap the -e debug for -k start [11:57] That changes the invocation of Apache to be as close as possible to what the default startup procedure is doing [11:58] I'm guessing that's not going to change anything, at which point the problem has been localised to the interaction between systemd and apache, nothing to do with apache itself [11:59] At which point, pastebin the output of the following so that we can see whether you have any local overrides in your systemd config for apache: [11:59] # find /etc/systemd -name '*apache*' -ls [12:01] Yeah, that works as well, brb with pastebin [12:02] Also, does 'debsums --changed apache2' give any output? (I want to see if any of the apache-related files in /lib/systemd/system have been improperly modified) [12:03] https://paste.ubuntu.com/24573950/ [12:04] I think we just found the culprit. /etc/systemd/system/apache2.service is a file locally defined on your system which is probably messing things up [12:04] nope, no output from debsums, I'm keeping that though, very convenient [12:04] Please pastebin the contents [12:04] sure [12:06] Additionally you seem to be missing an expected symlink, so you should run 'systemctl enable apache2' if you want it to automatically start after a reboot [12:06] https://paste.ubuntu.com/24573963/ [12:07] maxb: how do you know what the expected config looks like? do you have clean machine set up, or is there some reference? [12:07] I'm just looking at my desktop, which I know I haven't changed in this respect [12:07] maxb: could be useful to solve my own problems in the future [12:07] maxb: aha, that makes sense [12:08] So, I don't know how /etc/systemd/system/apache2.service got there, but it's wrong and shadowing the correct version provided by the package in /lib/systemd/system/apache2.service [12:09] I suspect it may have come from one of the modules that was manually/externally installed [12:09] You should delete or move away /etc/systemd/system/apache2.service - and then I don't remember whether systemd just notices automatically, or you have to run 'systemctl daemon-reload' [12:10] maxb: It's probably a remnant of when I tried to get apache to start on boot, I wouldn't mind removing it [12:10] I'll give it a try [12:10] After which, pastebin the output of 'systemctl status apache2' so we can see what your systemd thinks the new status is === JanC_ is now known as JanC [12:16] maxb: looks fine from what I can see: https://paste.ubuntu.com/24573997/ [12:17] Mostly fine - but it does still say 'disabled' meaning it won't start at boot. [12:17] Quite possibly because I suggested you ran enable before deleting the service file [12:18] maxb: I hadn't ran enable yet at that point, it says enabled now [12:18] all sorted then [12:18] The lesson is to be wary of local customizations interfering with the operation of system packages :-) [12:19] maxb: I'll try rebooting as well to see that everything is fine, but from what I can see everything is looking great :) [12:20] maxb: yeah, I like systemd, but I still don't know how everything is working. thanks for all the help (you too ikonia) [12:22] you fixed it yourself, well done [12:24] rebooting worked great as well, everything started without problems =D [12:25] well done [15:50] this'll sound like an insane question, but is there any way to get a desktop environment inside an LXD container, so that i could, say, VNC to it or X-Forward to it and then have it VPN outbound without affecting my host system? [15:50] I have it in a VM right now, but... just curious if I can do it with an LXD container. [17:22] HI just instlaling 16.04 onto a usb drive from a cd. and got [17:22] Exiting on error base-installer/kernel/failed-install [17:22] What is this and how do I fix it? [17:30] ArchaicLord: did you verify the integrity of the LiveCD image before you burned it, by chekcing the hash sums against known good ones? [17:31] (to make sure your image was complete) [17:31] No i didn't [17:32] I downloaded the default lts from Ubuntu website [17:40] not sure how I managed to get this but I have been given a list of kernals [17:40] I guess I shouldn't use linux-generic as that just failed [17:40] any suggestions which one to use instead === ivoks_ is now known as ivoks === DavidDuffey is now known as dduffey === lordieva- is now known as lordievader === arosales_ is now known as arosales === nOgAnOo_ is now known as nOgAnOo === thebwt_ is now known as thebwt === beisner__ is now known as beisner_ === codedmart_ is now known as codedmart === lordievader is now known as Guest7186 [18:49] ok so i checeked the md5 and it was fine there was a match.. i also re downloaded and burned again and still same issue. luckly i found an older server install disk and this is working fine so not sure why the current download won't work === wyre_ is now known as wyre === the_ktosiek is now known as ktosiek [19:26] i've got a question here, I've got multiple LXD containers, and multiple public IPs on this one box. I'd like to route the public IP data to one of the LXD containers specifically, anyone know how I can do that for just the one LXD container? === Tahvok_ is now known as Tahvok === _Jeepbeats is now known as Jeepbeats === Into_the_Pit is now known as Frickelpit === db is now known as Guest612 === clvx is now known as Guest24214 === tarpman_ is now known as tarpman