/srv/irclogs.ubuntu.com/2018/06/01/#ubuntu-server.txt

trippeh_seems it was just bad memory. didnt trip any ECC tho.01:44
sarnoldo_O01:45
=== inteus_ is now known as inteus
cpaelzergood morning04:18
cpaelzerrbasak: nacc: ok, we will see if next time things are similar04:19
cpaelzerI'm ok if the hickups this time were due to the re-import04:19
lordievaderGood morning06:21
=== mundus2018 is now known as mundus
=== giraffe is now known as Guest18867
srulianyone tried running ubuntu-server from usb stick in production? i have HP DL320 8x256GB SSD RAID 10, does it make sense to run the OS from internal slot, will it effect the performance of kvm vm's on the main raid?10:41
blackflowsruli: I haven't tried, but in theory I don't see anything wrong with that, assuming you treat the USB installation as readonly root, and mount writable paths from faster media, like the "main raid" you mention.10:45
sruliblackflow: i understand, on the flip side if i install the os on main raid will that have any effect on performance of kvm?10:46
blackflowsruli: again depends where you mount writable paths, but it'd probably be insignificant, unless you have any high volume logging going on or something like that.10:47
sruliblackflow: not show how to mount root as read  only and which path i need to make to main raid10:48
blackflowif I were you, I'd consider using ZFS and put VMs on dedicated zvols.10:49
sruliblackflow: i ran some bonnie++ test with the os install on main raid vs on usb, see the results here, https://www.saurymper.com/pages/bonnie-results-2018-05-31.html see  Set 1 & 3 tests10:49
sruliblackflow: i will put vm's on seperate LV's, i want to stay with raid 10, i am not sure if zfs can surpass the performance of dedicated raid card (p420)10:51
blackflowsruli: those numbers don't mean much to me, it's a synthetic benchmark.10:51
blackflowsruli: it might, depending on the size of hot data and amount of RAM10:51
blackflowbut you also get all the goodies of ZFS: checksumming, snapshots, easy backups, ARC/L2ARC and in case of write heavy applications, ZIL10:54
sruliblackflow: to use that i would need to delete the raid set and expose the drives directly to os, right?10:55
blackflowand compression. Just as an example, I only use ZFS, exclusively on the servers. All the hot data (actively accessed) fits in RAM so ZFS' MFU (Most Frequently Used) caches are reigning supreme, while at the same time all the data is checksummed, auto-healing raid6 (raidz2), and backups are a snapshot + zfs send|recv away.10:56
blackflowsruli: yes. ZFS works best if it uses drives directly.10:56
blackflowif you're not familiar with ZFS, I wouldn't recommend you going straight to production with it. I just meant to say consider it, toy with it, learn it, because in the long run you'll reap huge benefits.10:57
sruliblackflow: i have 32GB ram, i guess zfs raid 10 would be the fastest?10:57
sruliblackflow: been using zfs z2 on my workstation for 3-4 years, installed and forgot about it (its a storage pool, os is on ssd)10:58
blackflowdepends on the workload. but in general I'd say yes, raid10 -- or striped mirror as it is in ZFS -- should be very fast.10:58
sruliblackflow: will try it and run a bonnie test, maybe someone will be able to decipher those tests and see which is best option10:59
blackflowbonnie wont help you there. ZFS MFU is built over time and the true performance benefits come from L2ARC and ZIL -- unless you're already using ssd/nvme for disks11:00
sruliblackflow: its a new install no existing data, using consumer ssd's (hp s700 pro)11:07
blackflowsruli: then it boils down to if hot data fits in RAM. if not, ZFS will not be performant (but will be everything else).11:11
sruliblackflow: all the files are small (except maybe for the actual os installs on the VM's) and a few 2-300mb files11:17
blackflowsruli: that doesn't mean anything. it all depends on how they're used, especially if frequently used blocks can fit in RAM / can be identified by ZFS MFU.11:18
sruliblackflow: how do i figure that out?11:18
blackflowsruli: you don't, in advance. You have to put it in production and see, or have eexperience from previous such deployments.11:41
Buoy172I have ubuntu 16.04 with caddy. I just installed php7.2 on it. I created a test page /var/www/index.php and its contents: https://pastebin.com/V6pLVMuE11:57
Buoy172The output in the browser is the same as the contents.11:57
Buoy172Not just "Hello World"11:57
Buoy172What is the problem?11:57
blackflowBuoy172: you haven't configured the web server to interpret the .php scripts with the PHP interpreter11:59
sandstromOn Ubuntu 18.04, how can I let dnsmasq know about the upstream (dhcp-provided) DNS server?12:00
sandstromIn NetworkManager there was a specific setting for dnsmasq, but NetworkManager doesn't seem to be used in 18.04.12:00
blackflowsandstrom: NM is used, on desktop, but abstracted with netplan. It's still full networking authority in case of dhcp setups via netplan. Which means, NM + dhcp should set up DNS servers from dhcp data. but, irrc, dnsmasq is not default, so you must've set that up?12:02
blackflowsandstrom: anyway, to config dnsmasq under NM, see this, see paragraphs for "dns" setting:  https://developer.gnome.org/NetworkManager/stable/NetworkManager.conf.html12:03
sandstromblackflow this is an ubuntu server (if that matters), yes I've setup dnsmasq manually.12:04
blackflowoh yes, the channel is -server :)   well, then the networking authority is networkd, for dhcp setups. otherwise you need full network config via netplan itself.12:05
blackflowor ignore netplan and configure networkd directly.12:05
sandstromblackflow: when systemd is the authority, is it still possible to have it 'tell' dnsmasq about the upstream dns server?12:05
Buoy172How do I configure the web server to interpret php?12:06
blackflowsandstrom: not sure. by default it wants to use systemd-resolved, and personally I have very little experience with dnsmasq, I use bind (and mask out resolved completely).12:06
sandstromI haven't found anything similar to what you quoted in the man pages for 'systemd.network'12:07
sandstromblackflow I wouldn't mind using bind either. My problem is that I want to forward dns queries under one special domain (.example) to a local dns server (say, 127.0.0.2).12:08
blackflowBuoy172: for example   https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-0412:08
sandstromThis doesn't seem to be possible under systemd-resolved, so I'm thinking that I need to configure systemd-resolved to pass all traffic to dnsmasq/bind, and then have dnsmasq/bind resolve with upstream (dhcp provided DNS) for everything except those under the special domain.12:09
Buoy172blackflow: I don't need instructions for nginx. I have caddy.12:09
blackflowBuoy172: then look up caddy documentation on how to set up php-fpm fastcgi.12:09
blackflowsandstrom: nah, just drop resolved completely12:10
Buoy172I'm looking... :)12:10
blackflowsandstrom: that way you have full control over /etc/resolv.conf and can do full DNS configuration with bind. eg, make it authoritative for .example, and pass through everything else to an upstream resolver, OR query the roots directly (my preference)12:10
sandstromblackflow Agree, that's what I want12:11
sandstrombut I don't know how to let bind know about the dhcp provided dns server12:11
blackflowah, I see what you mean12:12
sandstrom(I've figured out how to take back control over /etc/resolv.conf from systemd-resolved (read in the man pages), but don't know how I'll have systemd-networkd inform bind (or dnsmasq) about the upstream DNS servers (received via DHCP). I guess I could hardcode 8.8.8.8 or similar, but would like to avoid that if possible12:14
blackflowwell I'm not sure, I'd have to google it, but it'd probably involve dhclient or dhcpcd integrating with bind/named somehow.12:15
blackfloweg, NetworkManager can integrate with unbound via hook scripts, and same principle could be used for bind, but... that's network manager.12:16
sandstromalright, those are good pointers, I'll investigate further! Thanks a lot for your help!12:17
blackflowdhclient has such hook scripts too iirc12:17
Buoy172blackflow: now the url outputs "502 bad gateway". Do I need to install php-fpm?12:25
blackflowBuoy172: yes, if you're configuring the web server to use php-fpm via fastcgi.12:26
blackflowand oyu should, that's pretty much a standard setup nowadays. PHP under fastcgi with php-fpm as the process manager for it.12:26
Buoy172I installed php with this command: "apt-get install php7.2"12:28
blackflowBuoy172: I believe that pulls in php7.2-fpm12:28
Buoy172I looked up that "dpkg --get-selections | grep php" lists all the installed php packages12:29
Buoy172and here they are: https://pastebin.com/tP4dEetQ12:29
Buoy172Does this mean I don't have php-fpm?12:29
blackflowBuoy172: yes, install php7.2-fpm12:30
blackflowBuoy172: ah yeah, it pulled in the libapache thing, I see the dependency is that libapache thing, OR fpm, OR cgi.12:31
blackflowlibapache thing = libapache2-mod-php7.2, aka the mod_php for apache12:31
sandstromBuoy172 tried any of http://oonlab.com/code/2016/08/12/setup-caddy-on-ubuntu-to-work-with-php/ https://www.digitalocean.com/community/tutorials/how-to-host-a-website-with-caddy-on-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-caddy-on-ubuntu-16-0412:33
Buoy172sandstrom: thanks, I'll check those links out12:33
sandstromtop hits on google12:34
Buoy172all right, managed to setup php!12:36
Buoy172Thanks guys. I might have some more questions later. Please bear with me, I'm a beginner ;)12:37
lordievaderNothing wrong with that 😉12:44
coreycbfrickler: would you be able to respond to rbasak's question on the dynamic-routing bug?14:17
fricklercoreycb: oh, I had interpreted that at being directed towards thedac who did the Ubuntu testing. I'll add a comment15:31
coreycbfrickler: well possibly, i thought you tagged it but anyone will do if they tested15:33
coreycbthanks frickler15:34
naccrbasak: re: ntp merge, have a sec?16:22
rbasaknacc: yes16:23
rbasaknacc: here? Or HO/Meet?16:23
naccrbasak: whatever you prefer16:24
rbasaknacc: I sent you a link16:25
rbasak(DM)16:25
tewardahasenack: any idea why an autopkgtest inside snapped LXD doesn't have any netowrking connection?  (It's like it's not requesting an IP...)17:01
SSMAdminHi all.  Anyone else had their 18.04 apache server suddenly stopp working?  Error.log only says "Out of Memory", apache2ctl -S" complain about a missing or empty Letsencrypt certificate (which actually IS there and is NOT empty), and "sudo apache2 -X -f /etc/apache2/apache2.conf" complain about  Config variable ${APACHE_RUN_DIR} is not defined.  I myself have not made any changes that should create these errors and apache17:31
SSMAdminstop working.  So I wonder what could have happened, and how to fix it.  Any help?"17:31
dpb1yuck17:33
dpb1how much memory does your system have17:33
SSMAdmin4G17:34
SSMAdminand there is nothing else running on the machine, exerpt the kid wathcing netflix17:35
SSMAdminapache is serving nextcloud, but there is no traffic there, only private cloud (which is now not working as apache refuse to run)17:36
SSMAdminTo me it looks like some system update have messed up things, as the sound settings on the desktop was also suddenly changed/reset, so I had to go in desktop system tools area to configure sound output once more to get the sound back.  Strange things have happened.  And I know for sure the box is not hacked, and my 6 year old is not capable of messing with system settings17:42
matjamSSMAdmin: I didn't realise this channel existed17:46
matjamso, thanks17:46
yeatsSSMAdmin: could be that the server ran out of RAM for non-apache reasons and apache was just collateral damage17:46
matjamSSMAdmin: I've seen out of memory stuff in apache when using something like PHP and you increase the upload limit to something silly like 2GB and you don't have a small VM17:47
matjam*big vm17:47
matjamSSMAdmin: the certificate thing is weird too17:47
matjamSSMAdmin: you should be able to change the systemd policy to restart apache in any condition17:47
matjamor switch to nginx because it's better17:48
* matjam ducks17:48
SSMAdminI dont think the server ran out of RAM, as it is only apache that runs most of the time.  Kid log in and watch some netflix before bedtime, but else there is nothing running17:51
SSMAdminBeside, it has worked in this type of configuration for years, then I upgraded to 18.04 i April, and it has been running without error since...until these strange things happened yesterday17:54
matjamwell basically you should go through the logs17:56
matjamdmesg, syslog etc17:56
matjamlook at the times around when the problem happened17:56
matjamalso the apache2ctl -S command might complain if you did not run it as root and the certificate permissions are set such that your user can't read the files that are referred to in the configuration in apache17:57
matjamand running the apache2 command directly would complain as there is an environment variable set in the startup script for the apache daemon17:57
matjamso I don't think either of those things are symptomatic17:58
matjamSSMAdmin: also, are you running the official apache package from the ubuntu repos or did you build from source? Are you using PHP? any other deails you can give about the system?17:58
matjam"sudo apt install inxi pastebinit" and then "sudo inxi -Fr -c0 -z | pastebinit" and sharing the URL that it prints out might be helpful for us to get some context.17:59
matjamSSMAdmin: did you get the last thing I said?18:02
pavlosSSMAdmin: matjam  I'm here too18:03
SSMAdminmatjam https://paste.ubuntu.com/p/f2BxZdNnXx/18:04
matjam:thumpsup:18:04
matjamSSMAdmin: and you just used the Apache package in the Ubuntu repo right?18:05
SSMAdminyes18:05
matjamSSMAdmin: whats the apache serving? A php app?18:12
matjamSSMAdmin: is it open to the internet?18:12
SSMAdminmatjam apache is serving nextcloud, and it is open to the internet, it has been working since April when I installed 18.04 and nextcloud and configured the system.  Errors and strange behavior occured yesterday18:13
matjamSSMAdmin: it may be someone was running an attack against your server and managed to trigger a bug to consume memory and DoS your server.18:19
matjamnextcloud is written in PHP, so the code is executed in the apache process18:19
matjamwhich means if there's a bug in nextcloud or in php, it would behave like that18:20
matjamI've seen that behavior before when I've had a server being actively attacked, and I was running an older version of the app or PHP18:20
matjammake sure you've got libapache2-mod-php7.2/bionic-updates,bionic-security 7.2.5-0ubuntu0.18.04.1 amd64 isntalled not the older libapache2-mod-php/bionic,bionic 1:7.2+60ubuntu1 all18:22
matjammake sure nextcloud is updated18:22
matjamif you still have problems with it, I'd look at using nginx + php-fpm which is the fastcgi runner for php apps, and that runs your PHP application in a separate process - so at worst it will take out the PHP environment but not nginx. You can also use the same model with apache - it also supports fastcgi18:24
matjamSSMAdmin: I'd check the apache logs and see what was hitting your server on the lead up to the crash, I would suspect that there's lots of weird requests.18:24
SSMAdminmatjam thankyou. That is a lot to wrap my head around, but I'll try.  I am not linux-trained, so only have basic commandline skills18:32
SSMAdminI will read up about your suggestions18:33
matjamSSMAdmin: yeah, you should be aware that there's lots of automated scripts out there trying to find their way into whatever they can, you'll probably find lots of random accesses in your apache logs, thats usually not people thats some automated script18:33
matjamand they try like, every exploit they can against the server, and this will sometimes crash things18:33
SSMAdminyes, I saw huge logs, so there is a lot in it.  what is the command in nano to get to the last line of the log?18:34
matjamuh, shift pg-down I think?18:34
matjamI usually use less to view logs though18:35
matjamno chance I will accidentially edit the file18:35
SSMAdminshift pg-down did not work18:36
SSMAdminhow to use less?18:36
matjamman less will give you all the commands18:36
matjam"man less"18:36
SSMAdminthanks18:36
dlloydlast line is >18:36
matjamI typically do shift-F and then ctl-c to get to the bottom lol18:37
matjamthere ya go18:37
matjamupdate-alternatives --set editor vim :P18:37
SSMAdmindlloyd > alone did not work, shift > or ctrl > did not work either18:38
dlloyduh, sure you are in less?18:39
dlloydG should do eof too18:40
SSMAdmindlloyd, sorry, I thought you ment nano18:42
SSMAdminmatjam, looked in access.log.  There is nothing there indicating some attack.  Last lines indicate working apache serving nextcloud connections from known clients.  Then traffic just stops, no more entries in access.log18:48
matjamthen may just have been a bug in nextcloud18:49
matjamabove advice still holds18:49
SSMAdminok, i try deactivating nextcloud, and activate 000-default.conf and see what happens18:50
SSMAdminwell, that did not help, apache not running18:55
matjamyou probably have an invalid apache configuration, so become root with "sudo -i" and then run apachectl configtest18:57
SSMAdminSyntax OK19:00
SSMAdminapache2 -X -f /etc/apache2/apache2.conf19:03
SSMAdmin[Fri Jun 01 21:02:09.055322 2018] [core:warn] [pid 27409] AH00111: Config variable ${APACHE_RUN_DIR} is not defined19:03
SSMAdminapache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot19:03
SSMAdminThis is a strange thing, as I have not touched this setting, so why should it suddenly complain about that variable?19:04
SSMAdminIn /etc/apache2/envvars it says "export APACHE_RUN_DIR=/var/run/apache2$SUFFIX".  I have checked that /var/run/apache2 dir actually exist19:07
SSMAdminSo apache is complaining about a non-existing directory that actually exist19:09
SSMAdminSimilar to it complaining about a non-existing or empty letsencrypt certificat, that actually exist, and is NOT empty, its content is as originally created by certbot19:10
SSMAdminhave to put kid to bed, be back later19:10
matjamyou can't start apache like that19:12
matjamwhy do you keep doing that ..19:12
naccSSMAdmin: you aren't using the service file, which probably does other things, like ensure envvars is sourced.19:15
SSMAdminmatjam, I dont "keep doing that".  I run some command I have found on the internet, from posts discussing similar problems, in order to find out what is wrong.  I dont usually run apache manually19:43
SSMAdminnacc you are probably correct, but I am just a newbie, so I dont know.  Could you please tell me how to do this correct then?19:44
matjamsystemctl start apache19:48
matjamlook at error_log19:48
SSMAdminyes I know, and I have tried it, nothing happens, not even an error message.  The only thing that then happens in error.log is a new entry of "Out of Memory"19:49
matjamsudo systemctl status apache | pastebinit19:49
matjamalso journalctl -u apache will give you what systemctl knows19:50
SSMAdminsystemctl status apache | pastebinit19:51
SSMAdminUnit apache.service could not be found.19:51
SSMAdminDu prøver å sende et tomt dokument. Avslutter.19:51
matjamits probably apache219:52
SSMAdminthen19:52
SSMAdminjournalctl -u apache19:52
SSMAdmin-- Logs begin at Sun 2018-04-29 19:26:53 CEST, end at Fri 2018-06-01 21:51:11 CEST. --19:52
SSMAdmin-- No entries --19:52
SSMAdminapache2 yes, sorry, I try again19:52
sarnoldmy favourite part is how the tools don't give you any feedback that the unit name is unknown19:52
sarnold"lol here's the non-existant logs in that time frame!"19:53
matjamyeah it is idiotic19:53
matjamsilent on success, print something on failure, thats the unix way19:54
matjamso service name is apache219:54
matjamsorry19:54
matjamI use nginx19:54
SSMAdminStatus apache2: https://paste.ubuntu.com/p/N22kwvvr9K/19:54
matjamSSMAdmin: cat /etc/apache2/mods-enabled/mpm_prefork.conf | pastebinit19:55
matjamalso cat /etc/apache2/apache2.conf | pastebinit19:57
SSMAdminjournalctl -u apache2: https://paste.ubuntu.com/p/cDx5t8shFM/19:57
matjamSSMAdmin: also cat /etc/php/7.2/apache2/php.ini20:00
SSMAdminapache2.conf: https://paste.ubuntu.com/p/ckJRxPfT8W/20:00
matjam| pastebinit20:00
SSMAdminphp.ini: http://paste.ubuntu.com/p/B8FQbbkP6G/20:01
matjamalso, cat /var/log/apache2/error.log | pastebinit20:01
SSMAdminerror.log: http://paste.ubuntu.com/p/CWFGdVdQnY/20:03
sdezielthis also work: "pastebinit /var/log/apache2/error.log"20:03
sdezielcat doesn't hurt but I find it cool that pastebinit can eat files directly20:04
SSMAdminthanks sdeziel20:04
sarnoldOut of memory20:04
sarnolduhhhh20:04
matjamoh thats nice20:04
matjamSSMAdmin: did you increase php memory limit to 256M?20:04
matjammemory_limit20:05
matjamI'm assuming when you were setting up the app20:05
SSMAdminyes I may have done that when configuring nextcloud settings20:05
sdezielI find it odd that no timestamp is prepended to those messages20:07
matjamcan you do, find /etc/apache2 -ls | pastebinit20:07
matjamsdeziel: I think it's the php module20:07
matjamsdeziel: my theory is we need to increase memory available to php in apache2 configuration20:07
matjamjust trying to confirm there is no limts being set elsewhere20:07
matjamhttps://httpd.apache.org/docs/2.4/mod/core.html#rlimitmem20:08
sdezielmatjam: wouldn't that be in /etc/php/7.?/apache2/ then?20:08
matjamSSMAdmin: also confirm that grep -ir RLimitMEM /etc/apache2 returns nothing20:08
SSMAdminmatjam http://paste.ubuntu.com/p/CbjD3qcpNv/20:08
matjamsdeziel: the apache directives should be in the apache conf.avail etc dirs20:09
SSMAdmin grep -ir RLimitMEM /etc/apache2 returns nothing20:09
SSMAdmingrep: returns: Fila eller mappa finnes ikke20:09
SSMAdminNo file or directory (translated from norwegian)20:10
matjamok20:10
matjamlol yeah20:10
matjamjust "grep -ir RLimitMEM /etc/apache2"20:10
matjamshould return nothing at all20:10
SSMAdmincorrect, last command did not return anything at all20:11
SSMAdminlol, I see now20:12
SSMAdmin grep -ir RLimitMEM /etc/apache2 RETURNS NOTHING :-)20:12
matjamlol20:12
matjamsorry I should have quoted it20:12
matjamso this won't be a fix but if it works then it will confirm my theory20:13
matjamadd "RLimitMEM max" to /etc/apache2/mods-enabled/php7.2.conf20:13
matjamat the bottom is fine20:14
matjamand then try "systemctl start apache2"20:14
matjamand then systemctl status apache220:14
matjamto see that it's running or not20:14
SSMAdminNope, refuse to run20:16
matjamhmm20:16
matjamgrep -r www-data /etc | pastebinit20:18
SSMAdminerror.log just got a new entry of "Out of Memory", thats all20:18
matjamyeah20:18
matjamalso modify memory_limit in php.ini to 128M temporarily to see if it will start20:19
matjamits really odd20:19
matjam/etc/php/7.2/apache2/php.ini20:19
matjamoh before you do that20:20
matjamhave you rebooted this machine at all?20:21
matjamlike, since yesterday20:21
SSMAdmingrep www-data: http://paste.ubuntu.com/p/jhjkqVqCDq/20:21
SSMAdminyes, rebooted several times20:22
matjampastebinit /etc/systemd/system/multi-user.target.wants/apache2.service20:23
SSMAdminchanging memory-limit to 128M did not work20:24
matjamyeah ok20:24
matjamso you upgraded from 16.04 to 18.04?20:25
SSMAdminhttp://paste.ubuntu.com/p/HGNyWyy9Hm/20:25
SSMAdminno, I installed fresh 18.0420:25
matjamah ok20:25
matjamdid you make any other modifications to any other system files?20:26
matjamlike /etc/sysctl.conf etc20:26
SSMAdminprevious system was 16.0420:26
SSMAdminno20:26
matjamso20:26
SSMAdminwhat about uninstalling apache2 and reinstall it?20:27
matjamcan you "cat /etc/apache2/sites-enabled/* | pastebinit"20:27
matjamwell its one thing to try20:27
matjamwe're not there yet20:27
matjamits something specific to your configuration, as I have just installed apache 2 & php etc and its working fine20:28
matjamand like, its something that if it was broken, lots of people would have been having problems20:29
matjamwell that looks fine20:30
SSMAdmincould it be a harddrive error, some sector damaged, that holds information apache2 needs?20:31
matjamyou'd see something in dmesg20:32
matjamor /var/log/syslog20:32
matjamsense error stuff like that20:32
matjamunlikely though20:32
matjampastebinit /etc/apache2/envvars20:33
SSMAdminhttp://paste.ubuntu.com/p/X288S9rgpc/20:34
matjamseems fine20:35
matjamweeeeeeird20:35
matjamok so this will suck20:36
matjamsec20:36
matjamI need to test locally20:36
SSMAdminok20:36
sdezielif you suspect a mod_php issue I'd a2dismod it as a test20:37
matjamgood point20:37
matjamdo that20:37
SSMAdminok, a2dismod what?20:37
matjama2dismod php7.220:38
matjamthen start the server again with systemctl start apache220:38
SSMAdminapache2 running20:39
matjamsystemctl status apache220:39
SSMAdminyes, its running20:39
matjamif it's running then, stop it with systemctl stop apache220:39
matjamyeah ok it's php20:39
SSMAdmindone20:39
matjama2enmod php7.220:39
SSMAdminok, then problem is back20:40
matjamSSMAdmin: cd /etc/apache220:43
matjamsource envvars20:43
matjamapache2 -X20:43
matjamas root20:43
matjamdoes it print anything useful>20:45
SSMAdminok, nothing happend.  Did not print anything useful.  "systemctl status apache2" gave same error message as earlier20:45
matjamyeah it will20:46
matjamwhen you say, nothing happened20:46
matjamit just returns straight back to the prompt?20:46
SSMAdminyes20:46
matjamok so as root, in /etc/apache220:46
SSMAdminas root, yes20:47
matjamstrace -f -o /tmp/apache2.strace apache2 -X20:47
SSMAdminin /etc/apache220:47
matjamthen patebinit /tmp/apache2.strace20:47
matjamugh20:47
matjampastebinit /tmp/apache2.strace20:47
SSMAdminhttp://paste.ubuntu.com/p/5hqsrZdWBP/20:49
matjamwell thats useful20:50
matjamhow much swap on this system?20:50
matjam"free" will tell you20:52
matjamfree | pastebinit20:52
matjamalso df -h | pastebinit20:52
SSMAdminSwap:        999420           0      99942020:52
SSMAdminhttp://paste.ubuntu.com/p/dGhMcGzsBD/20:53
SSMAdminhttps://paste.ubuntu.com/p/S33jpR2QgG/20:54
matjamso, system has 4GB ram, <1GB swap20:55
sdezielthe reading pattern of /dev/urandom is weird, 8 bytes at the time20:55
matjamthat *should* be ok20:55
matjamsdeziel: my apache2 does that20:55
matjamseems "normal"20:55
matjamso like20:56
matjammmap(NULL, 93874405974016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)20:56
matjamthat number 9387440597401620:56
matjamis the number of bytes its trying to allocate20:56
sarnoldwhat's 85 TB here or there? :)20:57
nacci'm 99% sure that this a local configuration issue20:57
matjamyeah20:58
matjamSSMAdmin: can you a2dismod ssl20:58
sdezielcould it be RLimitMEM max?20:58
matjamSSMAdmin: then try to start apache with systemctl start apache220:58
matjamsdeziel: tried that20:59
matjamsdeziel: as in, it had no RlimitMEM statement, we added one20:59
SSMAdmina2dismod ssl done, still same error20:59
sdezielmatjam: right but I'd remove it20:59
SSMAdminapache2 will not start20:59
matjamsure20:59
matjamSSMAdmin: can you remove the RLimitMEM entry from the php conf we added before21:00
matjamoh hang on21:00
matjamSSMAdmin: can you "cat /etc/apache2/mods-enabled/* | pastebinit"21:01
matjamI like the modularity of the debian config for apache21:01
matjambut man, it scatters the config all over the place21:01
SSMAdminmatjam, removed RLimitMEM, still same error21:02
matjamyeah figured21:02
sdezielthis would provide a fuller view: "grep . /etc/apache2/*-enabled/* |  pastebinit"21:02
SSMAdminhttps://paste.ubuntu.com/p/QP36brRfSD/21:03
SSMAdminhttp://paste.ubuntu.com/p/dVNGbMcwn3/21:04
matjamsdeziel: mr fancy21:04
sdezielmatjam: hehe :)21:04
sdezielthe split out apache2 config was one of the key factor in me adopting Ubuntu years ago. I have now moved to nginx when feasible though21:05
matjamyeah21:05
matjamI like using fastcgi21:05
matjamproblems with php don't take out the entire webserver21:05
matjamand it performs better21:06
matjamI dunno man, this all looks boringly normal21:06
matjamother than the weird mmap for 85TB or fram21:06
matjamof ranm21:06
matjamSSMAdmin: can you please "dpkg --list | grep php | pastebinit"21:07
matjamif the output of that is boringly normal21:07
matjamthen I'm officially throwing in the towel21:07
SSMAdminhttps://paste.ubuntu.com/p/XfKBbwf5gM/21:08
naccare we not getting an error from apache2 at all?21:08
matjamno I don't think its getting that far21:08
matjamI think its loading modules and php prints to stderr and that goes to error.log21:09
matjamso on my system I don't have libapache2-mod-php, just libapache2-mod-php7.221:09
naccwell, you *should* have mod-php :)21:10
naccit's a metapackage to track updates21:10
nacc*upgrades21:10
matjamah21:11
* matjam throws in the towel21:11
matjamSSMAdmin: sorry dude, I'm at a loss21:11
matjamSSMAdmin: you've hit some weird bug in php21:11
sdezielSSMAdmin: any idea of what changed since it all started?21:12
naccwhy do you think it's in php?21:12
sdezielnacc: a2dismod php7.2 makes the issue go away21:12
naccah, that was what i was missing21:12
sdezielSSMAdmin: you could try to disable every PHP modules and selectively reintroduce them one by one21:13
nacchas a purge of php (or at least libapache2-mod-php*) and reinstall been tried?21:13
SSMAdminmatjam, thank you for trying and spending a lot of time on it.  Ok...its a php bug, but then it must be something from the ubuntu repos, because I have not changed anything myself.  I has been running without error since april when I installed 18.04, suddenly yesterday it stopped working21:13
sdezielSSMAdmin: could you share /var/log/apt/history.log ?21:14
naccSSMAdmin: any clues if a packge update happened? /var/log/apt/history.log21:14
SSMAdminapt history: http://paste.ubuntu.com/p/vdXWmG4PHR/21:18
sdezielnothing of interest in there21:19
SSMAdminI have no idea what updates have been made by the system automatically.  I did a manual update earlier today, in order to see if that would fix anything, but it didnt21:19
sdezielzcat /var/log/apt/history.log.1.gz | pastebinit21:19
SSMAdminsdeziel, https://paste.ubuntu.com/p/FTwcz38XBj/21:21
sarnoldlooks so *plain*21:23
sarnoldnothing here makes sense21:23
sarnoldmy next thought is to ask perf to dump a stack trace when mmap fails and hope that somepart of the stack trace indicates what might be wrong21:24
sarnoldhttp://www.brendangregg.com/perf.html#StackTraces21:24
SSMAdminI suggested removing and then reinstalling apache2.  matjam did not think that was needed.  How about reinstalling php7.2?21:24
sdezielremoving symlinks from /etc/php/7.2/apache2/conf.d/ would be simple too21:25
SSMAdminOk, I have no clue about this, so I just follow your suggestions.  How do I remove these symlinks, and what will happen?21:26
sarnoldmeh, i'm not real hopeful, and I'd rather know the *cause*, but if you go that route, I suggest ot use apt-get purge rather than apt-get remove21:26
SSMAdminsarnold, ok thanks21:27
sdezielthe phpmyadmin that's in "rc" bugs me21:27
sdezielI'd purge this one first (I never liked that piece of software ;)21:27
SSMAdminhow do I purge it?21:28
sdezieldpkg -P phpmyadmin21:28
SSMAdmindone21:29
sdeziel(I don't remember if apt-get purge would work on a package in "rc")21:29
sdezielapache2 still choking on startup?21:29
SSMAdminhow do I check if the purge did what it should?21:29
sdeziel"dpkg -l| grep phpmyadmin" => should return nothing21:30
SSMAdminapache2 still choking21:30
SSMAdminreturned nothing, so good21:30
sarnoldapt-get purge on 'upstart' on my laptop took it from rc to un21:31
sdezielthx21:31
sdezielthat's weird to see "openat(AT_FDCWD, "/usr/lib/ssl/openssl.cnf", O_RDONLY) = 12" when mod_ssl isn't even enabled21:33
SSMAdminSo, if I should try to clean out php (both 5 and 7?) and then reinstall, what should I do then?  And that means I must reinstall also extra modules needed by apache and nextcloud?21:33
SSMAdminI have a2enmod ssl now21:34
sdezielI just picked it as it was few lines before the huge malloc21:35
sdeziels/malloc/mmap/21:35
SSMAdminohh btw, it was php7.2 only that is creating the problem, not php5? We only disabled php721:35
sdezielon a bionic box, only 7.2 should be there21:36
sdezielhttps://paste.ubuntu.com/p/XfKBbwf5gM/ showed it was the case21:36
SSMAdminok21:37
SSMAdminso....apt purge <what>?21:38
SSMAdminphp7?21:38
sdezielSSMAdmin: each PHP package one at the time, I'd start with php-apcu21:43
SSMAdminpurge or just disable them?21:44
sdezielpurge would probably be easier to undo afterward21:44
SSMAdminok, will you guide me?21:45
SSMAdminso I start with apt purge php-acpu21:45
sdezielI'm afraid I'll have to leave soon21:45
SSMAdminok21:46
sdezielbut it's pretty simple, purge, test, rince and repeat21:46
sdezielthe above paste captures the list of php packages you had before starting to poke at it21:47
SSMAdminso,example php-curl, will that also purge php7.2-curl?  Or is there some significant difference in all these?  Are there some I should NOT purge?21:47
SSMAdminQuestion put another way:  Why are there some of these modules without the *7.2 part in the name21:50
sdezielthose are virtual packages21:50
sdezielthey point to the current php7.X-mod version21:50
sdezielon Xenial it would have been php7.0-mod, on Artful: php7.1-mod and so on21:50
SSMAdminok, but there are some of them that does not have a php7.x version of them21:50
SSMAdminphp-acpu as an example21:51
sdezielI _think_ that's because they don't build from the PHP sources and are external components21:52
SSMAdminand should I purge the virtual ones, or the 7.x ones?21:52
sdezielSSMAdmin: purging the 7.2 one should also purge the non versioned one21:54
SSMAdminthanks, I go ahead, take them one by one, purge, test, reinstall, purge next, test, reinstall?21:55
sdezielnacc also suggested to purge and reinstall libapache2-mod-php*21:56
sdezieland he knows PHP far better than I do :)21:57
SSMAdminok, "apt purge libapache2-mod-php*" will work, but how about reinstall? "apt install libapache2-mod.php*" will probably not work21:58
SSMAdminapt install libapache2-mod-php21:58
SSMAdminapt install libapache2-mod-php*21:58
sdezielinstalling libapache2-mod-php only should pull the other21:59
SSMAdminok thank you.  I try21:59
SSMAdminpurging libapache2-mod-php* made the apache2 able to start22:01
naccSSMAdmin: yeah that seems accurate (as purge will remove the config which implies a2dismod php7.2)22:02
SSMAdminbut now some ssl protocol error on the website22:02
sdezielSSMAdmin: wasn't SSL disabled earlier?22:03
SSMAdminso better leave libapache2-mod-php installed, for bugtracking the other modules22:03
sdezielbut if you have SSL errors, that probably means apache2 starts now, isn't it?22:03
SSMAdminyes, but I enabled it again (a2enmod ssl), I think22:04
SSMAdminsdeziel, apache starts now, yes22:04
sdezielok is mod-php installed yet?22:05
SSMAdminno, should I reinstall it?22:06
SSMAdminI try22:06
sdezielyes because we already knew that without php involved it was working OK22:06
SSMAdminWell, now apache2 is able to start with libapache2-mod-php reinstalled22:09
naccSSMAdmin: so i'd assume it was due to a config change you did with php before22:09
SSMAdminso now this part is fixed, apache2 is able to run with php involved22:09
naccSSMAdmin: maybe related to nextcloud, dunno22:09
SSMAdminnacc, no, I have not touched the system since I installed it in April, it has been running without error until yesterday22:10
SSMAdminbut now there is still a ssl protocol error22:10
SSMAdminI did "a2enmod ssl" to enable it, we disabled it earlier in this session22:10
sdezielSSMAdmin: didn't you have a nextcloud vhost specifically for SSL? if yes, I'd enable it22:11
SSMAdminstill some problem22:11
sdezielwhat's apache2 error.log like now?22:11
SSMAdminsdeziel, ahh...there it is, I try enable the nextcloud.conf file22:11
SSMAdminwait a second..22:11
* sdeziel is in holding pattern22:12
SSMAdminHOLY MOLY, everything is suddenly working22:13
dpb1wow22:14
dpb1epic debug session?22:14
dpb1like, 2 hours22:14
sdezielbut the root cause remains unkown so we are none the wiser22:14
SSMAdminso, then only thing to fix the problem was to purge and reinstall libapache2-mod-php22:14
naccwhich implies some config fubar22:14
nacci know you'll say you didn't do anything22:15
naccbut that's not what the operations imply :)22:15
sdezielstill would have been nice to find what was mmap'ing 85T22:16
sdezielI know sarnold, I hear you ;)22:16
SSMAdminnacc, well, I KNOW I have not touched the system, exerpt running "apt update" and "apt upgrade" manually on a few occations.  I have not touched a single config file or installed any additonal modules after I got the system running in April22:16
SSMAdminsdeziel, what was that mmap'ing 85T?22:20
naccfrom your strace of apache2 earlier22:20
SSMAdminopps, too late, he is gone22:20
SSMAdminwhat does it mean?  Someone trying to send 85T to the server?22:20
naccSSMAdmin: no, your apache2 program was trying map 85T of virtual memory, which the kernel said no to.22:21
SSMAdminok, I don't understand "mapping of virtual memory"22:22
SSMAdminmaybe I don't need to know? :-)22:23
SSMAdminanyway, thanks a lot everyone.  Say thanks to sdeziel from me, and also to matjam that worked a long time to try to help me22:24
_KaszpiR_SSMAdmin you should REALLY order pizza/beer for them :)22:25
SSMAdmin_KaszpiR_, I will :-)  Is there a command for that?22:26
SSMAdminpastepitsa&beer ?22:27
nacc!cookie22:28
ubottuWow! You're such a great helper, you deserve a cookie!22:28
naccis the closest we have :)22:28
SSMAdmin!fortunecookie22:28
naccSSMAdmin: sorry, didn't see your question -- it's the program trying to allocate memory to do something22:28
SSMAdminnacc, what could need 85T?22:29
naccSSMAdmin: that's what we don't know22:30
nacci guess if it happens again, rather than just purge22:30
naccmake a backup of /etc, then purge, then reinstall and diff old and new /etc22:30
SSMAdminthanks, but that sounds like something more complicated.  I don't know how to do the diff-stuff22:31
_KaszpiR_I suggest asking on privmsg for details where and when to deliver pizza ;)22:32
SSMAdminI am a linux newbie, have been a newbie for many years22:32
SSMAdmin_KaszpiR_, that sound a bit like pizza-gate, I am not into that sort of stuff :-)22:33
_KaszpiR_hahahahahaah22:33
naccSSMAdmin: something link `sudo cp -aR /etc /etc/.bak; sudo apt purge libapache2-mod-php*; sudo apt install libapache2-mod-php; diff -urpN /etc.bak /etc` and if that last command returns anything, something your local config changed22:34
naccbah first line was a typo :)22:34
naccsudo cp -aR /etc /etc.bak22:34
SSMAdminnacc thanks a lot, I take notes22:34

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