/srv/irclogs.ubuntu.com/2016/12/28/#ubuntu-server.txt

=== JanC_ is now known as JanC
lordievaderGood morning08:13
=== frickler_ is now known as frickler
Onepamopaquestion - /proc/sys/kernel/core_pattern is set to /tmp/core.%e.%p.%t, * soft core 500000 & root hard core 1000000 in limits.conf, the application segfaults and no corefile is found anywhere09:22
Onepamopaubuntu server 16.04 x6409:22
Onepamopaso, how do I go about enabling core dump files ?09:23
=== ashleyd is now known as ashd
Genk1Hello all10:04
Genk1 what is the fast  way to backup/recover a mysql database using MyISAM engine ?10:04
Genk1I've found mysqldump to be very slow10:04
ddellavwith myisam thats kinda all you go10:04
ddellav*got10:04
ddellavwith innodb you can do incremental backups but myisam is not transactional so your only choice is a full table dump10:05
Genk1ddellav, I see thanks for your your answer10:06
ddellavyou're welcome Genk110:07
JanCalso depends on database size how fast it is of course...11:31
patdk-lapand what filesystem your using12:34
patdk-lappersonally, I had always used lvm snapshots to backup mysql myisam12:35
patdk-lapbut it has been awhile, and use innodb for just about everything now12:35
Walexpatdk-lap: even LVM2 snapshots are not that good for consistent MyISAM state, but they usually work.12:51
WalexGenk1: you should really ask in #MySQL or #MariaDB for faster alternatives to 'mysqldump'. But that's really the right way to do it. If it is slow that may mean that your MyISAM files need compacting12:52
blackflowdepends on the definition of "slow" and considering database size12:53
blackflowmeanwhile, like Walex said, using fs snapshots to back up the database is illadvised as the database has its own regime of syncing states with the underlying fs, so you might be snapshotting incomplete states.12:54
blackflowpostgres has the ability to do WAL archiving. I don't know if that's possible with MySQL. Also, consider using real time replication for backup.12:55
maswaneh, if it is an atomic snapshot, it is no more unsafe than handling an unscheduled power loss12:55
blackflowcorrect, but "unschedules power loss" is not a "consistent backup state" that you want your data BACK UP to be in :)12:56
blackflow*d12:56
blackflowand iirc, "unscheduled power loss" with MyISAM tables leads to "lots of corruption and pain". :)12:57
maswanwell, then i'd certainly not use that for any data i'd like to keep. :)12:57
blackflowif dumps are inadequate, replication is really the best, consistent form of back up.12:58
maswandumps were hard for us, so we setup replication, then tuned that to the point that we could get dumps made on the replica so we had both13:00
patdk-wkhmm, the database doesn't have it's own syning time, that is what a flush command is for13:36
patdk-wknow if the filesystem supports flushing also, would be requred for lvm snapshot to work13:36
patdk-wkbut if every level is flushed, it's a perfect usable method13:36
patdk-wkthough personally, using a mysql slave database, and doing your backups on there, is better, if your concerned about downtime13:37
JanCdepending on the dependencies, you could possibly dump some tables separately too...13:48
blackflowpatdk-wk: the files are mmaped and there's no guarantee that at every given moment, data in files represents 100% the in-memory state.13:56
patdk-wkblackflow, did the default change? it was not using mmap by default normally14:01
=== skylite_ is now known as skylite
blackflowpatdk-wk: afaik it mmaps since 5.1. but now that you mention it, I could be wrong, yes.14:44
patdk-wkI see support for mmap in 5.114:45
patdk-wkbut it is not enabled, except for packed myisam files, and those are read-only14:45
erick3khi17:04
erick3kcan someone help me with a routing problem?17:04
erick3kanyone in here?17:07
Picikinda17:07
erick3khaha17:07
erick3kis there a way to force a different subnet gateway to work instead of using the route command or post up?17:08
erick3kanyone17:12
erick3k?17:12
jellywhat's a subnet gateway?17:12
jellyshow an example.  Explain what it's doing, what the actual results are, what you'd want it to do instead17:14
jellyeg. pastebin current outputs of "ip a" and "ip r" and your network config (/etc/network/interfaces, or whatever else you use)17:15
maxbAlso, don't say "instead of using (some perfectly reasonable options)" without explaining why you propose not to use them17:15
erick3kwell am going to try17:17
erick3kthe ip and gateway are on different subnet17:17
erick3kso if i put gateway on the /etc/network/interfaces it can not be bring up17:18
erick3know if i remove it and add route add default gw (gw ip)17:18
erick3kas a command it works17:18
erick3know i have to through cloud-init add default gateway to the /etc/network/interfaces due to automation17:19
erick3kso basically a fix could be adding a command before the network starts to delete the line gateway xxx.xxx.xxx.xxx from /etc/network/interfaces before bringing it up on boot17:20
maxbThis sounds a bit scary and broken17:21
erick3ki know17:21
erick3kthats why am trying to find a better solution17:22
erick3ksince ubuntu doesnt allow a different subnet gateway on /etc/network/interfaces17:22
maxbI think you will need to paste the output of "ip route" if we are to have any hope of understanding your network setup17:23
erick3kok am gonna show with pics17:23
erick3kmaxb here is not working17:27
erick3khttps://i.imgur.com/z91hKJR.png17:27
=== JanC is now known as Guest83509
=== JanC_ is now known as JanC
erick3khold on17:29
maxbThis is not a sensible configuration17:30
maxbYou can't use an address outside the subnet as a default gateway unless there's some other special routing going on17:31
robert45hi guys, after a dist-upgrade process my server is unbootable, Im getting this on the screen, any advice? http://imgur.com/a/l1hvV17:37
tomreynrobert45: press enter and examine?17:38
tomreynfor a (n entirely blind) guess: zfs related17:39
robert45tomreyn I appreciate the quick reply, Im now inside the shell. I did a service networking status and this is what I get, ifconfig shows correct network setup: http://imgur.com/a/bY7yz17:40
tomreynrobert45: you should start examingn the cause of the first error, not the last17:41
tomreynrobert45: on the screen shot you posted, the first error (which has not scroll off screen, i.e. there may have been others before this one) is about systems-tmpfiles-setup.service17:43
tomreynthe temporary / volatile file storage service did not start up properly.17:43
tomreynit is suggested that you should run "systemctl status systems-tmpfiles-setup.service" to examine this issue.17:44
tomreynnote how the message right before this is about starting ZFS support via FUSE17:44
robert45tomreyn tx, Im running that command now17:45
tomreynalso note that ZFS-fuse is considered deprecated17:46
tomreynuse the native module instead17:47
CurionticeHi! I want to cache HTTPS site contents such as Facebook Images and etc. I have added the following https_port 3126 tproxy ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid3/lib/ssl_db/certs/myCA.pem connection-auth=off. This gives me errors. Is squid can not be run this way?17:49
CurionticePlease if anyone know the answer, PM me.17:49
tomreynyou might want to discuss the errors you get there.17:52
MASMin logs?17:53
CurionticeIt just crashes. Segfault at xx.xx.xx17:53
CurionticeCan squid be run with Tproxy target for HTTPS traffic?17:54
Curiontice\17:54
CurionticeCan you pls confim me that ^17:54
* tomreyn lacks Squid experience, can't tell17:54
CurionticeMASM: Can squid be run with Tproxy target for HTTPS traffic?17:54
tomreynAll I can tell is that caching SSL content contradicts with the idea of end-to-end encryption, it is only possible by creating a man-in-the-middle. Some companies and ... ISPs in some countries ... still do it anyways.17:56
MASMi don't know men, sorry...17:57
tomreynhttp://wiki.squid-cache.org/Features/HTTPS17:59
tomreyni assume "tproxy" stands for 'transparent proxy'.17:59
robert45tomreyn sorry I had some troubles with the systemctl command, this is what I get: http://imgur.com/a/x7p6l18:03
robert45I assume its because the filesystem is mounted as readonly18:04
tomreynrobert45: same here18:05
robert45Im rebooting it again to see if get why its not mounting properly18:05
tomreynrobert45: i would check syslog, go back to when you booted, then look through those lines until you hit the first error.18:05
tomreynor start with "dmesg -T | less" - sometimes this is faster18:06
robert45tomreyn tx, doing that now18:07
tomreynone (of many) possible explanation might be file system corruption on /etc or / (i do not know your partitioning scheme)18:07
robert45tomreyn ugh! I hope not, its a production server :(18:08
robert45tomreyn ok I caught the first error, I dont think it could be related, do you? http://imgur.com/a/p0OXS18:09
tomreynapparmor failing could be related, yes18:09
robert45tomreyn well, its the same error, systemctl shows a read-only filesystem18:10
tomreynyou surely have current backups, and if it's an important system you surely considered a HA configuration?18:10
robert45when systemctl apparmor thing18:10
tomreynso check dmesg + syslog, find out why it's r/o18:11
robert45tomreyn tx, I was able to bring it online, few service still failing though18:31
robert45tomreyn for some reason its mounting /dev/sda1 as ro, but if I use mount -o remount,tw it mounts it ok, any ideas?18:34
robert45tomreyn nevermind, I was able to fix it, it was all fstab related18:36
robert45its showing 16.04 instead of 16.10, not sure it didnt upgrade all the way through18:36
tomreynrobert45: so you upgraded from 16.04 to 16.10 recently, or tried to? appartenly it didn't happen if lsb_release -sd still shows 16.0418:38
robert45tomreyn I upgraded from 14.04, it shows 16.04 now18:39
robert45first time18:39
tomreyn<robert45> its showing 16.04 instead of 16.10, not sure it didnt upgrade all the way through18:39
tomreynthis is contradictionary18:39
robert45tomreyn not sure if I understood. I was looking to upgrade to 16.1018:40
robert45tomreyn so I upgraded from 14.04, do I need to run another upgrade?18:40
tomreyneither you last upgraded from 14.04 to 16.04, or from 16.04 to 16.1018:40
tomreynonly one of them can be correct18:41
robert45tomreyn I upgraded from 14.04 to 16.0418:41
robert45Im looking to upgrade to the latest version 16.10, is it possible?18:41
tomreynyes, personally i prefer to run LTS releases on servers, whoever, do not like to have to upgrade every 6 months18:42
tomreyns/whoever/however/18:42
tomreynalso LTS releases tend to be a lot more stable18:42
=== ejat_ is now known as ejat
robert45tomreyn I see. I ran do-release-upgrade and got "No new release found"18:43
robert45tomreyn oh I just noticed 16.10 its not a LTS release18:43
robert45tomreyn so you dont recommend to upgrade from LTS to latest non LTS ?18:44
tomreyncorrect, 16.10 is not LTS. and personally i prefer to only run LTS on servers. in even more so in your case. ;)18:44
tomreyncorrect, 16.10 is not LTS. and personally i prefer to only run LTS on servers. and even more so in your case. ;)18:44
tomreyn^typo fixed18:44
tomreynfirst of all, i would suggest you ensure your previous upgrade succeeded, and the system is in a good condition.18:45
tomreyn!lts | robert4518:46
ubotturobert45: LTS means Long Term Support. Until 12.04 LTS versions of Ubuntu were supported for 3 years on the desktop, and 5 years on the server; since 12.04 (Precise Pangolin) LTS versions will be supported for 5 years on the desktop and server. The latest LTS version of Ubuntu is !Xenial (Xenial Xerus 16.04.1)18:46
robert45tomreyn yes I think I wont upgrade it, Im scary to suffer any other downtime like this one18:46
robert45tomreyn understood, so far everything looks good! :)18:46
patdk-lpalso be very sure of the non-lts support lifetime18:47
patdk-lpit used to be 18months, but now is like 9 I think, or maybe 618:48
tomreynand system upgrades mean downtime18:48
tomreynrobert45: if you like i can check your output of "apt-get update", "apt-cache policy", "apt-get -V -f install", "apt-get -V -y --simulate dist-upgrade" later.18:49
patdk-lpor worse, a broken package during upgrade18:49
tomreynrobert45: .. post them to a pastebin if so, e.g. using !pastebinit18:49
tomreyn!pastebinit | robert4518:49
ubotturobert45: pastebinit is the command-line equivalent of !pastebin - Command output, or other text can be redirected to pastebinit, which then reports an URL containing the output - To use pastebinit, install the « pastebinit » package from a package manager - Simple usage: command | pastebinit -b http://paste.ubuntu.com18:49
* tomreyn taking a shower now18:50
robert45sure, running those now18:50
robert45tomreyn patdk-lap looks like some errors indeed: http://paste.ubuntu.com/23701740/18:53
robert45how should I proceed?18:53
erick3khow can i run post-up command outside of /etc/network/interfaces?18:56
andolerick3k: cut-n-paste to the shell?18:58
erick3kandol i meant to run on startup outside interfaces,18:59
erick3kin shell says command not found18:59
MASMerick3k maybe put link in bin path19:01
MASMerick3k, maybe create a shortcuts in local/bin19:03
erick3kMASM can you link me to an example and a little newbie19:04
MASMerick3k,  shortcuts : http://unix.stackexchange.com/questions/226315/how-to-use-ln-s-to-create-a-command-line-shortcut19:05
MASMerick3k, program executable everywhere : http://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere19:05
erick3kMASM am not sure that would work i want  post-up route add xxx.xxx.xxx.xxx dev eth0 to run outside /etc/network/interfaces file19:06
erick3kjust that command19:07
erick3kbecause /interfaces will be modified by cloud-init19:07
maxbIf cloud-init is incorrectly changing your config, then fix that, rather than trying to paper over it elsewhere19:08
erick3khuh if i knew how19:09
erick3ki would19:09
erick3kis it possible to run that command outside interface or not?19:09
erick3klike on centos19:10
erick3kyou just add route-eth0 file19:10
maxbUbuntu's network configuration chooses to give you one readable file rather than littering bits and pieces across multiple files like CentOS19:17
tomreynrobert45: i don't see errors there. I see a notice, "N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension", and i see a lot of no longer needed (due to changed dependencies) packages which can likely be removed (using apt-get --purge autoremove)19:20
erick3kmaxb so only solution is to have a custom script or have cloud-init run it?19:21
robert45tomreyn ok do you recommend to --purge autoremove or should I kept those for just inc ase?19:21
maxbyes19:21
maxbIf you're using cloud-init to configure your networking, it needs to do it *right*19:22
maxbIf it isn't, you need to work on addressing that19:23
tomreynrobert45: yes maybe dont purge immediately19:24
tomreynthere's zfs-fuse in there19:24
erick3kgot it, maxb what about if i make a file executable here /etc/network/if-up/ with that command?19:24
erick3kwould that work?19:25
robert45tomreyn sorry got dc'ed, thanks so much for your help, wish you a happy new year!19:40
=== JasonMc92 is now known as CodeMouse92
erick3kmaxb you still here?22:15
erick3kremember about the network?22:16
erick3kfound a solution :)22:16

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