<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>complich8's journal &#187; technobabble</title>
	<atom:link href="http://www.complich8.net/archives/category/technobabble/feed" rel="self" type="application/rss+xml" />
	<link>http://www.complich8.net</link>
	<description>complacence is the enemy</description>
	<lastBuildDate>Thu, 22 Jul 2010 08:28:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Why does calendaring suck so much?</title>
		<link>http://www.complich8.net/archives/434</link>
		<comments>http://www.complich8.net/archives/434#comments</comments>
		<pubDate>Sat, 22 Nov 2008 17:25:07 +0000</pubDate>
		<dc:creator>complich8</dc:creator>
				<category><![CDATA[life and times]]></category>
		<category><![CDATA[technobabble]]></category>
		<category><![CDATA[whining]]></category>

		<guid isPermaLink="false">http://www.complich8.net/?p=434</guid>
		<description><![CDATA[Ok, so here&#8217;s the story. At work, we&#8217;ve got exchange calendars. They do everything from meeting and room scheduling to events and outings and all that stuff, with meeting invites carrying along the necessary info to make stuff work in general. It&#8217;s pretty slick, but it only works with outlook and outlook web access. Which [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so here&#8217;s the story.</p>
<p>At work, we&#8217;ve got exchange calendars.  They do everything from meeting and room scheduling to events and outings and all that stuff, with meeting invites carrying along the necessary info to make stuff work in general.  It&#8217;s pretty slick, but it only works with outlook and outlook web access. </p>
<p>Which is all well and great, except that it means to use it I&#8217;ve got to have our OWA page sitting in a browser window open all the time.  No reminders, nothing else.  See, I&#8217;m a Linux sysadmin, and I don&#8217;t even have a windows box on my desk.  No windows, no outlook.</p>
<p>Now, most places you can get away with doing stuff like that by running Evolution and using the owa interface to interface with exchange calendars and it works, but with our company, there&#8217;s some tweak or customization to the login page that causes exchange to simply not work with it.  I&#8217;m not sure on the details, but it&#8217;s a bit of a problem either way.  So that route&#8217;s out.  Also, evolution blows a little bit as a mail client.</p>
<p>So, I thought what I&#8217;d do was I&#8217;d run thunderbird for email and not worry about calendaring.  Which worked great for me for the first three months I was here, until I started having more than one meeting a week and had to actually schedule and keep track of things for myself appropriately.  As my daily and weekly complexity levels rose, I needed a calendar.  So I turned to Lightning, the thunderbird calendar plugin.</p>
<p>And you know, Lightning was working ok.  Not any really huge problems with it except that the calendar was only on the local system, not synced with exchange or anything else.  Of course, that meant I couldn&#8217;t check the calendar from owa at home, or anywhere else&#8230; it was only any good to me on my local system at work.  Which wasn&#8217;t really great for me, because I keep a slightly odd schedule and need the calendar to reference to remind me what I&#8217;m doing tomorrow.  So I was still maintaining two calendars &#8212; the OWA one and the lightning one, so I could have web-accessibility and still have pop-up reminders and such.</p>
<p>But maintaining two calendars manually is a pain, so I sought out a different solution.  The obvious answer was to tap Google Calendars inside of lightning using the lightning GDATA provider to replace the local lightning-native calendar.</p>
<p>And that&#8217;s when the headaches really started.  You see, Lightning&#8217;s gdata provider does something weird, or maybe it&#8217;s just lightning itself.  Some meeting invitations work perfectly in lightning, directly.  They just go into the google calendar, they work, and things are great.  But then others, you try to accept them and they crap all over the place.  For example, the &#8220;accept&#8221; button will show up, you click it and nothing happens.  Or you click accept and thunderbird freezes.  Or you click &#8220;accept&#8221; and it adds it to the local calendar, or if you don&#8217;t have a local calendar pops up a box asking you to pick the calendar to add it to but not listing the google one.  But you can still drag-and-drop such invites into the calendar.  Just that if you do, it decides to send new invitations to everyone on the attendees list, because rather than interpreting that as &#8220;accept the invitation&#8221; or &#8220;add this event to the calendar&#8221; it interprets it at &#8220;take this event, add it to the calendar like it&#8217;s your own, and send out appropriate invites as specified in the invitation&#8221;.</p>
<p>This &#8230; you see, this is annoying as hell.  The only way I can convince the google calendar to accept the invite without spamming everyone on the list is to basically duplicate the event manually, for myself only.  Now instead of maintaining two calendars by clicking &#8220;accept&#8221; in lightning then &#8220;accept&#8221; in owa, I&#8217;m maintaining two calendars by clicking &#8220;accept&#8221; in lightning, getting annoyed when it doesn&#8217;t work, manually recreating the meeting info, then clicking &#8220;accept&#8221; in owa.  Calling it &#8220;retarded&#8221; would be offensive to retarded people everywhere.</p>
<p>So now I&#8217;m pretty far down the rabbit hole.  Most of the events that I&#8217;m tracking are in my google calendar, but that means they don&#8217;t get the exchange-pushed updates to things like locations and cancellation statuses.  And that&#8217;s not all of the events that I&#8217;m keeping track of, just most of them.  And none of this even begins to address things like tying into my phone.</p>
<p>My basic desire is to have a single, central calendar, which I can see from my cell phone, from my mail client on any system I use, and from a web interface.  I want to be able to click &#8220;accept&#8221; and accept invitations.  I want to be able to do this without having an extra system just sitting there being my own personal calendar sync system.  And honestly, if lightning could understand all the invitations I get and send them all to the gdata provider, I&#8217;d have close enough to what I want.  Or if lightning could just talk to exchange directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.complich8.net/archives/434/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mpm-worker versus mpm-prefork, and mod_php versus fastcgi</title>
		<link>http://www.complich8.net/archives/404</link>
		<comments>http://www.complich8.net/archives/404#comments</comments>
		<pubDate>Sat, 22 Mar 2008 17:18:43 +0000</pubDate>
		<dc:creator>complich8</dc:creator>
				<category><![CDATA[Beyond Nerddom]]></category>
		<category><![CDATA[technobabble]]></category>

		<guid isPermaLink="false">http://www.complich8.net/archives/404</guid>
		<description><![CDATA[*Caution: nothing but geek-content here* So Apache 2.2 has a couple of &#8220;stable&#8221; mpm&#8217;s, namely prefork and worker. Prefork is the old tried-and-true method, where the server spawns $StartServers httpd processes, and on-demand starts additional up to $MaxClients. Each subprocess handles $MaxRequestsPerChild requests, then dies and is replaced as needed. Worker, on the other hand, [...]]]></description>
			<content:encoded><![CDATA[<div style="color: red;"><strong>*Caution: nothing but geek-content here*</strong></div>
<p>So Apache 2.2 has a couple of &#8220;stable&#8221; mpm&#8217;s, namely prefork and worker.  </p>
<p>Prefork is the old tried-and-true method, where the server spawns $StartServers httpd processes, and on-demand starts additional up to $MaxClients.  Each subprocess handles $MaxRequestsPerChild requests, then dies and is replaced as needed.  </p>
<p>Worker, on the other hand, starts $StartServers httpd processes, and on each process runs up to $ThreadsPerChild.  Each thread serves requests (the same as processes on prefork), and when any given process&#8217;s child threads hit $MaxRequestsPerChild, the process kills its idle threads, unpools its working threads and waits for them to finish, then dies.</p>
<p>Sounds cool, right?  Threads are lighter than processes, so having 5 processes running 20 threads each sounds better than having 100 processes.  I got caught up in that and decided to try it on a large-ish site (namely gotwoot, and the 20-odd other sites hosted on that box). </p>
<p>Well, it turns out Worker isn&#8217;t as stable as I was hoping.  At least for me&#8230; one of the sites we host is a huge sender of fairly large files and file streams.  When apache processes under mpm-worker try to die, they wait until all the threads are done sending&#8230; but if the children are sending for hours, it&#8217;s going to take hours for these otherwise-defunct processes to die.  If we were talking about just one process taking that long to die, it wouldn&#8217;t be a big deal because it wouldn&#8217;t interact with anything else.  But somehow in that interaction mode, various modules start behaving badly.</p>
<p>So I was running mod_php (only using threadsafe modules) on mpm-worker, and every couple of days I&#8217;d see random problems.  Sometimes it was zero-byte replies from php, other times it was php segfaulting, still other times it was apache itself dropping empty page replies.</p>
<p>I got sick of that, so I switched over to mpm-prefork and php on fastcgi.  Things seem to be better now&#8230; it gives me user-mode php, and because of that APC maintains a per-site cache.  It&#8217;s running fcgi processes on demand, which is also cool &#8217;cause if a site doesn&#8217;t get traffic, it doesn&#8217;t keep a running php process.</p>
<p>Overall, my system load is a bit lower and things just &#8220;<em>feel</em>&#8221; more stable with prefork+fcgi.  In the next couple days I should actually _see_ whether it&#8217;s more stable or not&#8230; but either way, I guess there&#8217;s value in feelings too :p.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.complich8.net/archives/404/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fighting syn floods with iptables</title>
		<link>http://www.complich8.net/archives/402</link>
		<comments>http://www.complich8.net/archives/402#comments</comments>
		<pubDate>Sun, 09 Mar 2008 11:46:08 +0000</pubDate>
		<dc:creator>complich8</dc:creator>
				<category><![CDATA[Beyond Nerddom]]></category>
		<category><![CDATA[life and times]]></category>
		<category><![CDATA[technobabble]]></category>

		<guid isPermaLink="false">http://www.complich8.net/archives/402</guid>
		<description><![CDATA[The tracker I admin seems to be undergoing a bit of a syn flood, and the tcp_syncookies tools weren&#8217;t helping. My ip_conntrack table was filling at 65536 connections, and the tracker just wasn&#8217;t talking to anyone as a result. Lots of packets falling out, lots of full tables. Not sure if it&#8217;s intentional or if [...]]]></description>
			<content:encoded><![CDATA[<p>The tracker I admin seems to be undergoing a bit of a syn flood, and the tcp_syncookies tools weren&#8217;t helping.  My ip_conntrack table was filling at 65536 connections, and the tracker just wasn&#8217;t talking to anyone as a result.  Lots of packets falling out, lots of full tables.  Not sure if it&#8217;s intentional or if it&#8217;s just a bunch of clients behaving badly&#8230; big fan of Hanlon&#8217;s Razor there though&#8230;</p>
<p>Detection: looked in /proc/net/ip_conntrack.  Noticed that the connections listed were mostly SYN_SENT from some src, and &#8220;UNREPLIED&#8221; status.  Many source ip&#8217;s.  Verified that the tracker was functional (by temporarily firewalling off all inbound syn traffic to it except my own ip addy).  Saw lots of packets getting dropped.</p>
<p>Mitigation attempt 1: tuned /proc/sys/net/ip_conntrack_max and /proc/sys/net/ipv4/netfilter/{many settings} in /etc/sysctl.conf, turning up maxes and turning down timeouts.  This should more aggressively expire lost tcp connections.  Also added a rule: <code>iptables -t raw -A OUTPUT -p tcp --sport $TRACKER_PORT -j NOTRACK</code> in an attempt to further lower the conntrack burden.  Result: I no longer kept getting as many conntrack &#8220;table full&#8221; errors, but the tracker was still not talking to anyone.</p>
<p>Mitigation attempt 2: added two more firewall rules:<br />
<code>iptables -I INPUT 1 -p tcp --dport $TRACKER_PORT --syn -m hashlimit --hashlimit 10/min --hashlimit-burst 15 --hashlimit-name torrenthash --hashlimit-htable-size 2048 --hashlimit-htable-max 65536 --hashlimit-mode srcip -j ACCEPT</code><br />
followed by<br />
<code>iptables -I INPUT 2 -p tcp --dport $TRACKER_PORT --syn -j DROP</code>.<br />
Result: the tracker appears to be talking again &#8230; I can see the web interface on it, and get peers on torrents hosted there without the help of DHT.  It&#8217;s good times.</p>
<p>I imagine this technique could be used for quite a bit more than just protecting a tracker, so I suppose it&#8217;d be great to have it written down somewhere <img src='http://www.complich8.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.complich8.net/archives/402/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox X-forwarding weirdness&#8230;</title>
		<link>http://www.complich8.net/archives/388</link>
		<comments>http://www.complich8.net/archives/388#comments</comments>
		<pubDate>Fri, 28 Dec 2007 20:19:34 +0000</pubDate>
		<dc:creator>complich8</dc:creator>
				<category><![CDATA[Beyond Nerddom]]></category>
		<category><![CDATA[technobabble]]></category>

		<guid isPermaLink="false">http://www.complich8.net/archives/388</guid>
		<description><![CDATA[Ok, so check it out. This is like &#8230; the single strangest thing I&#8217;ve run into in the wide world of linux. So, you start a local firefox session, then ssh to a machine with a -X (enabling x11 forwarding). Then on the remote machine, you run firefox. You get &#8230; another locally-running firefox. So [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so check it out.  This is like &#8230; the single strangest thing I&#8217;ve run into in the wide world of linux.</p>
<p>So, you start a local firefox session, then ssh to a machine with a -X (enabling x11 forwarding).  Then on the remote machine, you run firefox.  You get &#8230; another locally-running firefox.</p>
<p>So you close both locally-running firefox sessions (and any others you might have) and invoke firefox on the remote machine.  Now you get an X11-forwarded firefox running on the remote box (the expected behavior).  And then you run firefox on the local machine, and you get &#8230;. another remotely-running firefox window.</p>
<p>Apparently, Xorg doesn&#8217;t differentiate between remotely-running windows and locally-running ones, and firefox catches any requests for a new X window named firefox, and instead of letting another copy be run, just makes a new window on the same firefox instance.</p>
<p>A little googling shows that the environment variable MOZ_NO_REMOTE controls this behavior &#8212; set it to 1 and firefox doesn&#8217;t lurk under the surface intercepting other instances that try to run.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.complich8.net/archives/388/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>distro blues</title>
		<link>http://www.complich8.net/archives/385</link>
		<comments>http://www.complich8.net/archives/385#comments</comments>
		<pubDate>Thu, 29 Nov 2007 03:48:27 +0000</pubDate>
		<dc:creator>complich8</dc:creator>
				<category><![CDATA[Beyond Nerddom]]></category>
		<category><![CDATA[life and times]]></category>
		<category><![CDATA[technobabble]]></category>

		<guid isPermaLink="false">http://www.complich8.net/archives/385</guid>
		<description><![CDATA[Ahh, the geekery. I wonder how many people this has happened to&#8230; So basically, for the last couple years I lived almost exclusively in gentoo for all my linux needs. Sounds good, right? A single distro, albeit a source-based one. I got used to a lot of gentoo-isms. I had my hands in RHEL a [...]]]></description>
			<content:encoded><![CDATA[<p>Ahh, the geekery.  I wonder how many people this has happened to&#8230;</p>
<p>So basically, for the last couple years I lived almost exclusively in gentoo for all my linux needs.  Sounds good, right?  A single distro, albeit a source-based one.  I got used to a lot of gentoo-isms.  I had my hands in RHEL a bit, I poked a bsd or two a bit, but gentoo was definitely my area of expertise, and my home.</p>
<p>Now I&#8217;m not so sure.</p>
<p>See, at work, I run an ubuntu box for my desktop.  I&#8217;m the only one there on ubuntu, so I&#8217;m kinda the odd-man out in that regard (the other sysadmins are on fedora).  We&#8217;ve also got servers that are fedora, so it&#8217;d make sense to be there&#8230; but <em>no~oo</em>, I <em>had</em> to install ubuntu instead.</p>
<p>Regardless, the majority of the server functions at work are solaris boxes.  So I&#8217;m simultaneously getting more comfortable with Ubuntu, getting more comfortable with Fedora, and learning a shitlot about Solaris.</p>
<p>Which is confusing.</p>
<p>See, Gentoo&#8217;s got /etc/conf.d.  Everything that&#8217;s distro-specific is controlled out of there.  Things like &#8230; default behaviors, network configs, what xdm tool should be called (eg: gdm, kdm, xdm), what options to pass iptables and where to save it, what options to pass in init scripts, etc.  It gives a lot of flexibility in a single place, and it&#8217;s very clean.</p>
<p>But nobody else does that.  At all.  </p>
<p>Ubuntu&#8217;s got it&#8217;s configs strewn all over /etc.  Fedora and RHEL shove a lot of, but not all of, their stuff in /etc/sysconfig.  Solaris &#8230; hell, I still don&#8217;t have any idea for half of that stuff &#8230; if it&#8217;s not in SMF, it&#8217;s probably somewhere in /etc, or maybe /var/sadm, or possibly in some random db2 file or something.</p>
<p>But it gets worse.  Mainly because of package managers.  I am finding myself typing &#8220;aptitude search&#8221; when I want to find a package on fedora or gentoo, and typing &#8220;eix&#8221; when I want to find things in ubuntu.  I have to remind myself &#8220;oh wait, this is ${DISTRO}, not ${OTHERDISTRO}&#8221; all the time.  This is only exacerbated by the fact that I&#8217;ve been building a new fileserver at home, and out of my distros of choice (ubuntu and gentoo), only gentoo&#8217;s install cd worked cleanly on the new hardware.  On the bright side, at least solaris doesn&#8217;t have a sane auto-updating package manager to work with at all, so there&#8217;s one less thing to think about.</p>
<p>So yeah, that&#8217;s my life these days :p</p>
]]></content:encoded>
			<wfw:commentRss>http://www.complich8.net/archives/385/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
