/srv/irclogs.ubuntu.com/2017/03/10/#ubuntu-server.txt

=== Monthrect is now known as Piper-Off
naccjgrimm: https://bazaar.launchpad.net/~ubuntu-release/britney/hints-ubuntu/view/head:/pitti#L16402:15
naccjgrimm: i don't actually know the context of that file, beyond I believe it's what the AA's use02:16
adrian_1908On a fresh server installation with OpenSSH selected, do the host keys in  /etc/ssh  already exist, or do they have to be created manually by the admin?02:41
sarnoldI believe they are created at the first boot02:42
naccor whenever sshd first runs?02:48
sarnoldyeah02:49
adrian_1908i haven't found a clear answer online, but i think most texts hint at what you're suggesting.02:55
lordievaderGood morning.06:56
freakynlHi, how do I add Ubuntu Trusty to the list on launchpad here? https://bugs.launchpad.net/ubuntu/+source/linux/+bug/160549409:05
ubottuLaunchpad bug 1605494 in linux (Ubuntu Yakkety) "vmxnet3 LRO IPv6 performance issues (stalling TCP)" [Undecided,Fix released]09:05
=== tinwood is now known as tinwood_swap
=== tekku is now known as tekk
ronatorHi. I am learning systemd unit files. I have a 'stupid' php process I need to stop. Only way is with kill. On CMD it works really fast: "kill -15 $(pidof php)". But if I do this with systemctl (ExecStop) it takes almost exactly 1:30 minutes to stop/kill the process. Is that a systemd problem? What am I doing wrong?11:17
ronatorAny systemd pro may help me? This is the (edited) service unit file http://paste.ubuntu.com/24151186/ ; I checked with "watch + ps" that the service is really stopping only after 90 seconds (so its not systemd waiting for a timeout or so I guess)11:26
ronatorI may have found the error: -> Mar 10 12:22:48 HOSTNAME systemd[1]: someproxy.service: State 'stop-sigterm' timed out. Killing.11:30
DoowWhat exactly is it that triggers apache on boot (16.10)? I see no indications in the logs of it even trying to start on my server.11:32
ronatorthere shoud be a apache.service file somewhere on your system - or not (/lib/systemd or /etc/systemd)11:35
ronatoror apache2.service11:35
ronator"service" now also uses systemctl so what does "sude service apache status" or similiar say?11:36
Doowronator, is that what actually triggers it? because "sudo systemctl enable apache2.service" says that it can't be enabled via systemd (gimme a sec and I'll pastebin it)11:36
ronatorI think I read that apache still does not offer unit files for systemd ...11:37
ronatorno sure11:37
Doowhttp://paste.ubuntu.com/24151223/11:37
ronatorwell you could get a basic apache systemd unit file and drop it into /etc/systemd/system - or you could use nginx (different syntax but some like it more than apache - and it has systemd unit files)11:39
ronatorDoow: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79843011:39
ubottuDebian bug 798430 in apache2 "apache2: please add systemd service file" [Wishlist,Fixed]11:39
ronatorexactly11:40
Doowronator, it *can* start automatically, it's just that something went broke on my system11:41
Doowand I can't figure out what11:41
ronatorcheck /var/log/syslog?11:41
ronatorand dmesg - if something went broke you need to find out what - or windows-style re-install11:42
Doownothing, I can't find any trace of it in any logs (which is I wanted to know what exactly is supposed to trigger it)11:42
ronatorwell from my understanding it cant start automatically because no systemd unit file is there and system cant for some reason create it on the fly11:42
DoowI'm not even sure it tries to start11:43
ronatordid you upgrade from 15.10 or 14.10 or so?11:43
Doowno, clean install11:43
ronatorthat's a shame, apache ...11:43
ronatorclean install should not have messed up your system ;-)11:44
DoowI of course have done things on the system, but after the install =)11:44
ronatorso i think it is still the case of the missing systemd file11:45
ronatorsuggestion: quick install of nginx, see how that behaves on your system11:45
ronatorif that behaves better, blame apache11:45
Doowthat isn't really helpful though I'm trying to solve the problem, not find someone/something to blame =P11:46
ronatorwell but to solve it you must find the reason that is to blame11:46
ronatorand i guess it is a huge problem that apache ships without systemd file (if that is still true)11:47
ronatorI can only tell you, I assume it is missing system files for apache. so with nginx you could somehow prove that (if nginx has no issues). And if yiou then decide to try a systemd unit file for apache, you may well take the nginx one, modify it and boom11:48
ronatormake sure you work in /etc/systemd/system path for such experiments11:49
Doowit ships with a systemd file, it just don't have an [install] section. So you can't set it to automatically start from there.11:49
ronatormokay let me think a sec11:49
Doowthere's a setup of glue scripts to let systemd work with it (as mentioned in the bug you linked)11:50
ronator[Install] WantedBy=multi-user.target11:50
ronatorif the install section is missing, systemd does not know at what "runlevel" to start apache!11:50
ronatorthis is the minimum config for that11:51
ronatorafk 10 minutes - let me know how it goes11:52
zioprotohello, if I have to build a container for Horizon Ocata, that is the best Ubuntu distro version ? Should I use Xenial ?11:55
ronatorzioproto: not sure because ubuntu has a habit of not using bleeding edge software so maybe check what container version (docker.io?) you get there. If you want to use Xenial you should know a bit about systemd I guess.12:00
Genk1Hello12:12
Genk1I have just generated a new SSL certificate12:13
Genk1with default options12:13
Genk1but I am wondering what was the CSR that was used to generate this certificate ?12:14
Genk1I need to inform Dovecot about the CA dir12:14
Genk1But I don't know where it is12:15
ronatoryou are not forced to create a csr e.g. for self-signed certificates - the csr would be needed to let a CA create the certificate, usually you would only create the key12:15
ronator(and the CSR for the CA)12:15
ronatorGenk1: create the KEY:  openssl genrsa -out www.someserver.com.key 409612:17
ronatorGenk1: create the CSR:  openssl req -new -key ./www.someserver.com.key -sha256 -out www.someserver.com.csr12:17
Genk1ronator, it's already done  but Dovecot is asking me the ca dir in the parameter : ssl_client_ca_dir12:17
ronatorGenk1: wouldnt that bee sth like /etc/ssl ?12:19
ronator  ssl_client_ca_dir = (''your distribution's trusted TLS CA store (Fedora / CentOS / Redhat uses /etc/pki/tls/ ))12:19
Genk1I have already  gave it ssl_client_ca_dir = /etc/ssl/certs12:20
ronatorcould you post the error message? (i guess you reloaded dovecot)12:21
Genk1ronator, OK12:22
Genk1doveadm(email1@ki.localdomain): Fatal: Disconnected from remote: Received invalid SSL certificate: self signed certificate: /C=MA/ST=Casablanca/L=Casablanca/O=KI/OU=IT12:22
ronatoris that really _your_ certificate?12:23
ronatoreither it does not like the self signed or it complains about the file itsself : invalid certificate12:23
Genk1ronator, Yes it a local certificate12:24
Genk1I will use it in prod also12:24
ronatorshould be not a problem if you can roll out this cert12:24
ronatorwhere is the common name of the server? CN?12:25
ronatoryou should enter the CN in the certificate, it should match the hostname12:25
ronatori cant see it from here12:25
ronatornot sure if this causes a disconnect in general12:26
Genk1ronator, you're right, but is it mandatory to have to have this ?12:26
ronatorwell, in terms of webservers, no: if the CN does not match the DNS name, most browsers will complain. not sure about dovecot. i use postfix with no "internal" ssl certificate.12:27
ronatorbut I would try that direction because "invalid ceritificate" sound ambitious12:28
ronatoryou could try to open the certificate with a desktop application - this should quickly tell you if the format is broken12:28
Genk1ronator, I am doing the same thing for postfix and it works like a charm12:31
ronatorwow12:31
Genk1the problem is with dovecot12:31
Genk1especially dovecot replication12:32
ronatorthe I cannot really help you but doing the same as you would, searching the internet :D12:32
ronatormaybe there is a dovecot option to allow self signed? I am totally guessing right now.12:33
Genk1ronator, usually I don't came here frist when I have an issue12:34
Genk1I always start by the official documentation12:34
Genk1then google12:34
Genk1then IRC :P12:34
ronatorno offense, just making my point why I cant help you effectively :)12:35
Genk1ronator, no problem, thank you so much12:36
ronatoryou are welcome12:36
ronator@systemd: I found out, if you set KillMode= and KillSignal= , you do not need ExecStop --> http://man7.org/linux/man-pages/man5/systemd.kill.5.html13:22
ronator[solved]13:22
jgrimmthanks nacc!14:12
DirtyCajun /msg NickServ identify matthew115:01
DirtyCajunthank god that was the wrong pass15:01
jgehey all good morning, I'm about to start building some Ubuntu 16.04 LTS servers that are not connected to the internet (intended), my network guys tell me I need to let them know what IP:port I need to reach to allow access.. I'm thinking access to http://us.archive.ubuntu.com is all I need for initial install, packages, security updates etc15:12
jgeany other URL I'm missing?15:13
ronatorjge: http/https should be enough - just check /etc/apt/sources.list for default URLs ...15:52
ronatoror /etc/apr/sources.list.d/* in case ...15:53
Genk1is there a way to log root activity in syslog ?15:59
=== degorenko is now known as _degorenko|afk
scottjllike the commands root does? just check their history.16:14
scottjlanything root does, they could erase out of syslog, unless you're using an external server16:15
Genk1scottjl, hmm16:15
Genk1well I need such thing in a centralized log server16:15
scottjlsyslog can be centralized.16:15
scottjlbut it doesn't log shell commands16:15
Genk1where I check who has executed root commands16:16
scottjlhttp://backdrift.org/logging-bash-history-to-syslog-using-traps16:16
scottjlbut. if someone is root. they could slip out of things like this. spawning subshells, scripting, etc.16:17
scottjlif someone has root access, there are too many ways for them to mask what they are doing16:17
Genk1I see16:18
scottjlmight be better to have them work thru sudo16:18
scottjland have sudo log everything16:18
Genk1thanks for the link16:18
scottjlno problem16:18
Genk1scottjl, that's what I suggested, but you can't change the mind of a whole team16:18
scottjlwell. if i have root access to your server, i don't care what kind of logging is going on, i can easily mask what i'm doing.16:19
Genk1scottjl,  I understand what do you say16:20
scottjlso your team has to decide if they really want security, or just the illusion16:20
Genk1it's useless to log root activity16:20
scottjlright. i could easily copy in some command i shouldn't be doing to the name of 'ls' or something and run that. reviewing root logs wouldn't show anything strange. or write a script. name it whatever. again. logging doesn't show anything strange.16:22
scottjlyou can't do that thru sudo. well not as easily.16:23
scottjllogging bash commands to an external server will give you some more protection, but doesn't prevent masquerading16:24
geniibash log is of no use because a space before any command will prevent it from being logged but still executes16:28
naccjgrimm: yw16:31
=== ashleyd is now known as ashd
=== ashleyd is now known as ashd
=== ashleyd is now known as ashd
=== logan_ is now known as Guest29589
=== Guest29589 is now known as logan-
drabGenk1: at a job I worked at we used a modified shell for that18:41
drabGenk1: a common one is "rootsh"18:41
drabthe other common tool for that is "snoopy"18:41
draband "sniffy"18:41
drabit was a while back tho, dunno if those projects are still active/working18:42
drabthe more modern and possible "correct" way of doing it is using "auditd", which can be configured to track all exec syscalls18:43
drabhttps://www.scip.ch/en/?labs.20150604 has some examples18:43
draband http://blog.ptsecurity.com/2010/11/requirement-10-track-and-monitor-all.html18:44
drabaltho examples are on RH it should work just fine on ubuntu18:44
=== zul is now known as zulVacation
ThiagoCMCHey guys! With QEmu 2.5 and Libvirt 1.3.1 (Ubuntu 16.04 plus Newton Cloud Archive, just to get new DPDK and new OVS), I was able to run KVM with hugepages and numa placement, like this:20:45
ThiagoCMC"<cell id='0' cpus='0-3' memory='8388608' unit='KiB' memAccess='shared'/>"20:45
ThiagoCMCWorks great!20:45
ThiagoCMCHowever, now, I upgraded it to QEmu 2.8 and Libvirt 2.5 (Ocata Cloud Archive), and my VM is not booting anymore, with the following error: "Error starting domain: unsupported configuration: Shared memory mapping is supported only with hugepages"20:45
ThiagoCMCWhat is happening?20:45
ThiagoCMCI had to remove the "memAccess", like this: "<cell id='0' cpus='0-3' memory='8388608' unit='KiB'/>"20:46
ThiagoCMC So, the VM booted but, why?20:46
ThiagoCMChugepages are enabled and I don't get why facing that error...   :-(20:46
ThiagoCMC   Any clue?20:46
naccThiagoCMC: memAccess=shared does not refer to hugepages21:06
naccThiagoCMC: it just indicates the memory map is shared and not private21:06
naccThiagoCMC: it sounds like you are missing a <memoryBacking> stanza maybe?21:06
=== Agent_ is now known as Agent
ThiagoCMCnacc, here is my Libvirt XML (simple Jinja2) that was working until Ocata Cloud Archive: https://github.com/tmartinx/svauto/blob/dev/ansible/roles/libvirt/templates/virtual-machines/stack-1-pts-1.xml.j222:03
ThiagoCMCmemoryBacking is there... Otherwise, it would not work with previous OVS+DPDK / Libvirt / QEmu...22:04
ThiagoCMCIf it does not refer to hugepages, why it is complaining that it needs hugepages?22:05
naccThiagoCMC: i meant, shared on its own does not imply hugepages23:10
naccthe memorybacking does23:10
naccThiagoCMC: is your guest using hugepages (in practice0?23:10
ThiagoCMCPreviously, yes, for sure, now, I just starting playing with new versions, I'm not 100% yet...23:43
naccThiagoCMC: ok, well, memAccess=shared only works with hugepages -- so if for some reason your guest isn't bakced by hugepages and you request shared, i think it's an error23:46
ThiagoCMCI see, I'll double check that... Thank you!23:48
naccThiagoCMC: that's just my reading of the libvirt XML spec :)23:49
naccThiagoCMC: but yeah, why it's not backed by hugepages would be the first thing to check23:49

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