/srv/irclogs.ubuntu.com/2017/05/14/#ubuntu-server.txt

=== ashleyd is now known as ashd
DoowHi, 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:10
ikoniawhat does a config file check say11:11
ikoniayou should get something in the error log11:11
ikoniaand you should get something from journalctl11:11
Doowikonia: how do I do a config file check? (I assume you're talking about something automatic)11:13
maxbapachectl configtest11:13
ikoniathere you go, as max said11:14
DoowAH00558: 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 message11:15
DoowSyntax OK11:15
DoowI'm waiting for it to timeout so I can paste you the log for journalctl11:17
ikoniaso there is something you should fix to make life easier11:17
ikoniait's got no FQDN so it's defaulting to the loopback address11:17
ikoniathats going to make it pretty worthless unless you access it on localhost11:18
Doowikonia: I have that set up in two different virtualhosts that I disabled while trying to figure this out.11:18
ikoniait's pointless then11:19
ikoniabecuase you're trying to figure out something that is broken11:19
ikoniabut something you're not going to use11:19
ikoniatest it properly11:19
ikoniaand even if you add two other virtualhosts, that base config will still be there11:19
ikoniaServerName still needs to be set outside the virtualhosts11:19
maxbWell.... 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 cleanly11:19
ikoniait's noise that's not needed11:20
maxbThat's true11:20
Doowwhat 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:20
maxbIf you're certain all your traffic is going to hit a <VirtualHost> 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 only11:21
Doowmaxb: ok, I'll use that =)11:21
ikoniait needs to be resolvable though11:22
Doowgoogle.com?11:22
maxbEww11:22
ikoniaeven if it's just resolvable by the hostfile11:22
ikoniadon't be silly11:22
ikoniayou're going to tell your server to listen on a google.com IP ?11:22
Doowikonia: something that's just resolvable locally sounds fine11:23
maxbIt needs to be resolvable? I have production stuff quite happily using a name non-existent in DNS or hosts to represent the unused base server11:23
ikoniamaxb: if it's not resolvable it drops back to localhost11:23
ikoniax-ref the warning you see11:24
maxb'drops back to' ?11:24
ikoniaCould not reliably determine the server's fully qualified domain name using 127.0.1.111:24
ikoniait can't resolve the servers FQDN - so it drops back to using the localhost IP11:24
maxbusing the IP for what?11:24
ikoniaServerName value11:25
ikoniaDoow: has it timed out yet ?11:26
Doowikonia: yeah, got occupied by the ServerName ;)11:26
Doowhttps://paste.ubuntu.com/24573808/11:29
Doowthat's from journalctl -xe11:29
ikoniaPWD=/home/user/apache/mods-enabled11:30
ikonia??11:30
ikoniawhat's that about11:31
Doowikonia: just a backup folder I was standing in when doing sudo systemctl start apache2.service11:31
ikoniaDoow: pastebin the apache error.log11:31
Doowikonia: it's 0 bytes long11:32
ikoniaok - so it's not even trying to start11:32
ikoniais this a clean/standard 17.04 install11:32
ikoniaor have you done anything with it / got external software etc11:32
Doowno, it's an upgrade from 16.1011:33
Doowand I added some mods, I'm running owncloud and a custom django site11:33
ikoniapastebin the output of systemctl status apache2.service11:34
Doowas well as set up https for those two sites11:34
Doowhttps://paste.ubuntu.com/24573830/11:36
ikoniado a manual start11:38
ikoniahttpd -f /where/your/config/file/is11:38
maxbThat won't work, rather, try 'APACHE_STARTED_BY_SYSTEMD=1 apachectl -e debug'11:40
maxbUbuntu renames the httpd binary to apache2, and supplies a configuration file which requires various environment variables set via apachectl to complete the configuration11:41
ikoniayou should still be able to do apache2 -f to get a base start up11:41
ikoniaand hopefully a bit of noise on problems11:41
ikoniamaxb: interesting that you can set APACHE_STARTED_BY_SYSTEMD11:41
ikoniadidn't know that11:42
maxb'apache2 -f /etc/apache2/apache2.conf' will just give you a complaint about 'Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}' or similar11:42
maxb(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
ikoniamaxb: thats intersting, I'd have not expected that11:43
maxbThe Ubuntu default config is a bit too complicated for the average user's needs, in my opinion11:44
ikoniaI'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 confusion11:44
Doowyeah, 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
maxbYou should be doing this as root11:45
maxbI'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
ikoniamaxb: which to be fair will be a minority11:46
DoowAPACHE_STARTED_BY_SYSTEMD=1 apachectl -e debug: command not found11:47
maxbThe 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 shell11:47
DoowI assume it should set, or export or something before that? (my bash scripting is not up to par unfortunately11:47
Doowmaxb: ok, now it starts without complaining, let me check some logs =)11:48
Doowmaxb, 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 above11:55
maxbFirst, swap the -e debug for -k start11:56
maxbThat changes the invocation of Apache to be as close as possible to what the default startup procedure is doing11:57
maxbI'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 itself11:58
maxbAt 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
maxb# find /etc/systemd -name '*apache*' -ls11:59
DoowYeah, that works as well, brb with pastebin12:01
maxbAlso, 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:02
Doowhttps://paste.ubuntu.com/24573950/12:03
maxbI think we just found the culprit. /etc/systemd/system/apache2.service is a file locally defined on your system which is probably messing things up12:04
Doownope, no output from debsums, I'm keeping that though, very convenient12:04
maxbPlease pastebin the contents12:04
Doowsure12:04
maxbAdditionally you seem to be missing an expected symlink, so you should run 'systemctl enable apache2' if you want it to automatically start after a reboot12:06
Doowhttps://paste.ubuntu.com/24573963/12:06
Doowmaxb: how do you know what the expected config looks like? do you have clean machine set up, or is there some reference?12:07
maxbI'm just looking at my desktop, which I know I haven't changed in this respect12:07
Doowmaxb: could be useful to solve my own problems in the future12:07
Doowmaxb: aha, that makes sense12:07
maxbSo, 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.service12:08
ikoniaI suspect it may have come from one of the modules that was manually/externally installed12:09
maxbYou 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:09
Doowmaxb: It's probably a remnant of when I tried to get apache to start on boot, I wouldn't mind removing it12:10
DoowI'll give it a try12:10
maxbAfter which, pastebin the output of 'systemctl status apache2' so we can see what your systemd thinks the new status is12:10
=== JanC_ is now known as JanC
Doowmaxb: looks fine from what I can see: https://paste.ubuntu.com/24573997/12:16
maxbMostly fine - but it does still say 'disabled' meaning it won't start at boot.12:17
maxbQuite possibly because I suggested you ran enable before deleting the service file12:17
Doowmaxb: I hadn't ran enable yet at that point, it says enabled now12:18
maxball sorted then12:18
maxbThe lesson is to be wary of local customizations interfering with the operation of system packages :-)12:18
Doowmaxb: I'll try rebooting as well to see that everything is fine, but from what I can see everything is looking great :)12:19
Doowmaxb: yeah, I like systemd, but I still don't know how everything is working. thanks for all the help (you too ikonia)12:20
ikoniayou fixed it yourself, well done12:22
Doowrebooting worked great as well, everything started without problems =D12:24
ikoniawell done12:25
tewardthis'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
tewardI have it in a VM right now, but... just curious if I can do it with an LXD container.15:50
ArchaicLordHI just instlaling 16.04 onto a usb drive from a cd. and got17:22
ArchaicLordExiting on error base-installer/kernel/failed-install17:22
ArchaicLordWhat is this and how do I fix it?17:22
tewardArchaicLord: did you verify the integrity of the LiveCD image before you burned it, by chekcing the hash sums against known good ones?17:30
teward(to make sure your image was complete)17:31
ArchaicLordNo i didn't17:31
ArchaicLordI downloaded the default lts from Ubuntu website17:32
ArchaicLordnot sure how I managed to get this but I have been given a list of kernals17:40
ArchaicLordI guess I shouldn't use linux-generic as that just failed17:40
ArchaicLordany suggestions which one to use instead17:40
=== 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
ArchaicLordok 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 work18:49
=== wyre_ is now known as wyre
=== the_ktosiek is now known as ktosiek
tewardi'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?19:26
=== 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

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!