<?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>Everybody Staze... &#187; Sys Admin</title> <atom:link href="http://www.staze.org/sysadmin/feed/" rel="self" type="application/rss+xml" /><link>http://www.staze.org</link> <description>Nobody leavz...</description> <lastBuildDate>Thu, 26 Aug 2010 06:27:48 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Webcam image</title><link>http://www.staze.org/webcam-image/</link> <comments>http://www.staze.org/webcam-image/#comments</comments> <pubDate>Fri, 20 Aug 2010 05:08:41 +0000</pubDate> <dc:creator>staze</dc:creator> <category><![CDATA[Sys Admin]]></category> <category><![CDATA[Logitech Quickcam 9000]]></category> <category><![CDATA[Webcam]]></category> <category><![CDATA[Xbox Live Camera]]></category><guid isPermaLink="false">http://www.staze.org/?p=1055</guid> <description><![CDATA[UPDATE: So, Logitech Quickcam Pro 9000 has been installed, and the image quality is quite good. Though, I think I need to clean the window it shoots through. So, no more green halo from the Xbox camera. All and all, very happy. Probably have a brief review forthcoming. ORIGINAL: Today I changed my webcam to [...]]]></description> <content:encoded><![CDATA[<p><strong>UPDATE: </strong>So, Logitech Quickcam Pro 9000 has been installed, and the image quality is quite good. Though, I think I need to clean the window it shoots through. So, no more green halo from the Xbox camera. All and all, very happy. Probably have a brief review forthcoming.</p><p><strong>ORIGINAL: </strong>Today I changed my webcam to an Xbox Live Camera (the ones for the Xbox360). The image is better than my old Intel CS430, but not great. Also, there&#8217;s a nice green ring in the image since it&#8217;s reflected from the window.</p><p>The solution is temporary as I&#8217;ll be receiving a Logitech Quickcam Pro 9000 this coming Tuesday that will have an even better image, and not have the silly ring.</p><p>So, please be patient. Also, I hope to be adding access to a higher resolution webcam image once the new camera arrives. Though, I&#8217;m not sure how high, or how often I want to update it since I don&#8217;t want my net connection to be taxed too heavily.</p><p>Thanks!</p> ]]></content:encoded> <wfw:commentRss>http://www.staze.org/webcam-image/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>420 Too many open files</title><link>http://www.staze.org/420-too-many-open-files/</link> <comments>http://www.staze.org/420-too-many-open-files/#comments</comments> <pubDate>Fri, 13 Aug 2010 04:42:10 +0000</pubDate> <dc:creator>staze</dc:creator> <category><![CDATA[Sys Admin]]></category> <category><![CDATA[10.5]]></category> <category><![CDATA[launchd]]></category> <category><![CDATA[Plone]]></category> <category><![CDATA[ulimit]]></category><guid isPermaLink="false">http://www.staze.org/?p=1051</guid> <description><![CDATA[After years of Plone/Zope running on a 10.5 web server, this last weekend I started seeing the zope logs filling with errors saying &#8220;[420] Too many open files&#8221;. One, I hadn&#8217;t seen this before, and two, I couldn&#8217;t figure out why it was happening after years of solid use. So, looking around online, it appeared [...]]]></description> <content:encoded><![CDATA[<p>After years of Plone/Zope running on a 10.5 web server, this last weekend I started seeing the zope logs filling with errors saying &#8220;[420] Too many open files&#8221;. One, I hadn&#8217;t seen this before, and two, I couldn&#8217;t figure out why it was happening after years of solid use.</p><p>So, looking around online, it appeared that 10.5 just set the max files open per user to an awfully small limit (especially in the server version)&#8230; 256 files per user! Since I use a zeo/client setup, and use FileSystemStorage for storing files outside the zodb, I easily had this many files open. Again, why is this just happening after years?</p><p><span id="more-1051"></span></p><p>I found a fair amount of info online about this issue. ulimit seemed to be the way to fix this on many *nix&#8217;s, but since 10.5 replaced much of this functionality with launchd, so it didn&#8217;t seem to actually do much.</p><p>First, from the command line, run &#8220;launchctl limit&#8221;. This will show you 3 columns. The first is the type, then the limit per user, then the limit for the whole system. So, at least in 10.5, you&#8217;ll see the maxfiles is 256 per user. To fix this, you have to create a file /etc/launchd.conf. In that, you just want to put &#8220;limit maxfiles 2048 unlimited&#8221; or something like that. That will raise the limit per user to 2048 (8x the previous limit).</p><p>The key, after this, is to reboot. Launchd sets all these limits on boot, and changing them once you&#8217;re up and going doesn&#8217;t seem to accomplish much (I&#8217;m guessing if you closed down everything running as a specific user, then restarted those processes, the new limits would take affect, but it&#8217;s just easier to reboot). Once you reboot, you can run &#8220;launchctl limit&#8221; again and see that the limits are raised.</p><p>Me, I set the per user limit to 8192 (32x the original limit), just because I know zope is going to open a lot of files, and this web server doesn&#8217;t do anything else.</p><p>That&#8217;s basically it. If you get errors about too many open files, up the limit, and reboot. Really pretty annoying this limit is so low on a server OS. And looking at my other systems, it&#8217;s still 256 per user in 10.6.4. This should be something Apple smartly configures based on usage&#8230; the 256 limit seems like something for a multi-user system where people are SSH&#8217;ing in and running tasks. Not for something like a web server. =/</p> ]]></content:encoded> <wfw:commentRss>http://www.staze.org/420-too-many-open-files/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Canonical URLs</title><link>http://www.staze.org/canonical-urls/</link> <comments>http://www.staze.org/canonical-urls/#comments</comments> <pubDate>Thu, 29 Jul 2010 21:52:13 +0000</pubDate> <dc:creator>staze</dc:creator> <category><![CDATA[Sys Admin]]></category> <category><![CDATA[Canonical]]></category> <category><![CDATA[mod_rewrite]]></category> <category><![CDATA[URL]]></category><guid isPermaLink="false">http://www.staze.org/?p=1048</guid> <description><![CDATA[At work, we&#8217;re looking at a major webpage redesign, and are therefore looking at other similar programs and their websites to see what they are using&#8230; and one major thing has struck me in the process. No one uses redirects to force certain URLs. For example: http://www.staze.org vs http://staze.org. Now, in one case, both work, [...]]]></description> <content:encoded><![CDATA[<p>At work, we&#8217;re looking at a major webpage redesign, and are therefore looking at other similar programs and their websites to see what they are using&#8230; and one major thing has struck me in the process. No one uses redirects to force certain URLs. For example: http://www.staze.org vs http://staze.org. Now, in one case, both work, and they present the same content (bad for SEO), in the WORST case, one works, and the other doesn&#8217;t. Almost none of the sites we looked at handled this correctly.</p><p>Really, it&#8217;s extremely easy to fix. Either in .htaccess, or in your virtual host file, just add something like:</p><p>RewriteEngine On<br /> RewriteCond %{HTTP_HOST} ^localhost [OR]<br /> RewriteCond %{HTTP_HOST} ^127\.0\.0\.1<br /> RewriteRule ^(.*) &#8211; [L]<br /> RewriteCond %{HTTP_HOST} !^www\.example\.com<br /> RewriteRule ^/(.*) http://www.example.com/$1 [R=301,L]</p><p><strong>UPDATE:</strong> Please see the corrected code above to account for anything referencing your site on the local machine via localhost, or 127.0.0.1&#8230;. some of my site broke without me noticing until today. DOH!</p><p><span id="more-1048"></span></p><p>This says &#8220;if the request isn&#8217;t for www.example.com (it&#8217;s for example.com, foo.example.com, etc), then redirect it so it&#8217;s www.example.com&#8221;. Now, if you use HTTPS for your site, and you put the above rule in your .htaccess file, then you&#8217;ll need to address that. Probably something like:</p><p>RewriteEngine on<br /> RewriteCond %{HTTP_HOST} ^example\.com [NC]<br /> RewriteCond %{SERVER_PORT}!443<br /> RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]</p><p>#rewrite all HTTPS requests<br /> RewriteCond %{HTTP_HOST} ^example\.com<br /> RewriteRule ^(.*) https://www.example.com/$1 [R=301,L]</p><p>Though it might be over kill. Anyway, you should prevent google from indexing HTTPS anyway. Which I do with some trickery like in my HTTPS vhost file that does:</p><p>RewriteRule ^/robots.txt$ robots_ssl.txt [P]</p><p>Basically, that says &#8220;anything requesting robots.txt via HTTPS, give it robots_ssl.txt&#8221; which has a simple:</p><p>User-agent: Googlebot<br /> Disallow: /<br /> User-agent: *<br /> Disallow: /</p><p>Basically, I don&#8217;t want it to index anything over HTTPS anyway. That&#8217;s duplicate content, and it bogs down my server to be letting google (or any spider) hammer away at https.</p><p>So, moral here&#8230; fix your site. Don&#8217;t let visitors use any URL they want to see your content, and worse, don&#8217;t let shit break when they do. Worst case, like, if your domain is example.com, and you don&#8217;t want a www on the website URL, then set up a wildcard in DNS to point everything at your webserver. Then setup the above redirects. So someone can type in whosyourmomma.example.com, and still get http://example.com.</p><p>Oh, and don&#8217;t even get me started on the whole www vs. no www issue. I&#8217;m not really of one mind on the issue&#8230; and think it varies from case to case. My site, I enforce it. At work, I enforce against it on our website. I honestly think it&#8217;s as aesthetics issue. Long URLs suck, and if typing in foo.example.com gives you a department, then you should get a webpage. You shouldn&#8217;t need www.foo.example.com. But, I&#8217;m sure this discussion is nearly as bad as top vs bottom posting.</p><p>For Google&#8217;s take, look: <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=139066" rel="nofollow" >here</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.staze.org/canonical-urls/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hardware UUID &#8220;Attribute Not Mapped&#8221;</title><link>http://www.staze.org/hardware-uuid-attribute-not-mapped/</link> <comments>http://www.staze.org/hardware-uuid-attribute-not-mapped/#comments</comments> <pubDate>Wed, 28 Jul 2010 21:41:35 +0000</pubDate> <dc:creator>staze</dc:creator> <category><![CDATA[Sys Admin]]></category> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[Open Directory]]></category> <category><![CDATA[UUID]]></category><guid isPermaLink="false">http://www.staze.org/?p=1046</guid> <description><![CDATA[Since I have been pouring over OD the last few days, I decided to look again at a change in WGM that came with 10.5. Computer records now have a place for Hardware UUID. UUIDs offer a theoretically truly unique identifier as opposed to MAC address, which I&#8217;ve seen not be unique (mind you, this [...]]]></description> <content:encoded><![CDATA[<p>Since I have been pouring over OD the last few days, I decided to look again at a change in WGM that came with 10.5. Computer records now have a place for Hardware UUID. UUIDs offer a theoretically truly unique identifier as opposed to MAC address, which I&#8217;ve seen not be unique (mind you, this was a manufacturing defect that happened when I was working at 3com, where some customers were getting boxes of NICs all with the same MAC address). Trying to populate it, however, results (for me) in a &#8220;Attribute not mapped&#8221; error, saying I should contact the sys admin. So, self&#8230; this doesn&#8217;t work.</p><p>A quick search around resulted in a Apple mailing list discussion list thread that talks about this very issue. It seems the 10.6 update added these attributes to the schema, but didn&#8217;t map them to anything. Cool.</p><p>So, here&#8217;s the scoop. Open up Directory Utility on the OD Master in /System/Library/CoreServices, then unlock. Open up LDAPv3, then click on 127.0.0.1, then Edit. Now &#8220;Search &amp; Mappings&#8221;, and scroll down on the left to &#8220;Computers&#8221;. Open that up, then click &#8220;Add&#8221;. You should see the option to add &#8220;HardwareUUID&#8221;. Select and Click &#8220;Okay&#8221;. Now with that new one selected, on the right, type in &#8220;apple-hwuuid&#8221;. Now &#8220;Write to Server&#8221; and authenticate. Hit Okay. Now you should notice that &#8220;LDAP Mappings&#8221; is set to &#8220;Custom&#8221; or &#8220;From Server&#8221;. You should be able to change that back to &#8220;Open Directory Server&#8221; and click &#8220;Okay&#8221;.</p><p>HardwareUUID in WGM should now work. Have Fun!</p> ]]></content:encoded> <wfw:commentRss>http://www.staze.org/hardware-uuid-attribute-not-mapped/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Kerberos brokeage</title><link>http://www.staze.org/kerberos-brokeage/</link> <comments>http://www.staze.org/kerberos-brokeage/#comments</comments> <pubDate>Wed, 28 Jul 2010 19:20:18 +0000</pubDate> <dc:creator>staze</dc:creator> <category><![CDATA[Sys Admin]]></category> <category><![CDATA[Comcast Sucks]]></category> <category><![CDATA[Kerberos]]></category> <category><![CDATA[Mac OS X]]></category><guid isPermaLink="false">http://www.staze.org/?p=1045</guid> <description><![CDATA[I assist other departments on campus with Mac related issues fairly regularly, since I&#8217;m one of the few Sysadmin&#8217;s on campus that really know Mac OS X Server. The issue they were seeing (and have been seeing since they upgraded to 10.6 about 4 months ago) was any time someone tried to login to a [...]]]></description> <content:encoded><![CDATA[<p>I assist other departments on campus with Mac related issues fairly regularly, since I&#8217;m one of the few Sysadmin&#8217;s on campus that really know Mac OS X Server. The issue they were seeing (and have been seeing since they upgraded to 10.6 about 4 months ago) was any time someone tried to login to a client, or really anything as a user that was part of the OD, it would take about 60 seconds to authenticate. If they used their server&#8217;s local admin account, however, it worked instantly.</p><p>Everything seemed to be running, but it just took a long time. Investigating further, everything seemed to point to Kerberos just not functioning. It was running, but kinit would take about 60 seconds to come back asking for a password. And for some reason, the REALM for the Kerberos server had been set as SERVERNAME.LOCAL. Which, shouldn&#8217;t be an issue in of itself, but it was certainly not &#8220;proper&#8221;.</p><p><span id="more-1045"></span></p><p>So, last night I spent about 4 hours rebuilding their Kerberos setup. Mainly by following <a href="http://support.apple.com/kb/HT3655" rel="nofollow" >this article</a>, but it didn&#8217;t really work as they describe. I&#8217;m pretty sure the missing step is, you should reboot after removing all the Kerberos info. Just restarting the services doesn&#8217;t seem to be enough.</p><p>Anyway, to add to that, for some reason, kerberosautoconfig couldn&#8217;t write the edu.mit.Kerberos file in /Library/Preferences, and to really clear things out, I removed the keytab from /etc, and it wasn&#8217;t being regenerated.</p><p>The first issue I solved with &#8220;kerberosautoconfig -f /LDAPv3/127.0.0.1 -o /Users/admin/Desktop/ -r REALM.EXAMPLE.COM -m server.example.com&#8221; which outputs the edu.mit.Kerberos to the desktop of the admin user, then I manually copied that into Preferences. Once that was done, I was able to &#8220;touch&#8221; /etc/krb5.keytab, and run &#8220;sh-3.2# sso_util configure -r REALM.EXAMPLE.COM -f /LDAPv3/127.0.0.1 -a diradmin -v 1 all&#8221; and get it to populate the keytab file. A reboot later, and things were nearly working.</p><p>Last step was to touch these two files in /Library/Preferences that didn&#8217;t seem to exist: edu.mit.Kerberos.kadmind.launchd and edu.mit.Kerberos.krb5kdc.launchd. Reboot again, and both kadmin and the kdc were running. kinit was instant, kadmin -p diradmin was instant. Logging into a client, or via AFP, or just WGM as diradmin was instant.</p><p>While it probably was only 2 hours of work, it took me 4 because I really didn&#8217;t want to reboot before recreating the kerberos info, like the article said, yet for some reason, it just doesn&#8217;t work right if you don&#8217;t throw a reboot in there. =/</p><p>Your mileage may vary, but I&#8217;ll chalk this one up to a partially failed 10.6 upgrade. While it worked fine upgrading out OD Master, for some reason, it just hosed Kerberos for this department (even though, like I said, it LOOKED fine&#8230; it just didn&#8217;t work).</p><p>I love helping other departments out, and I&#8217;m especially glad my boss actually encourages/demands it.</p><p>But the real icing on this whole cake was, right as I finished, and was starting to test everything, my Comcast internet connection went out. This was at 12:15am. During this time, I had no net, or phone. They did this to me about a week ago too. It finally came back up around 1:30am. I had to stay up until then so I could actually finish testing. What I really want to know is, why the hell Comcast takes it&#8217;s headend down for over an hour at a time when people are more than likely still up. And why it took over an hour?! Don&#8217;t they have the configuration ready to load, and they just reboot the headend after it&#8217;s loaded? Or does it really take that long to cycle through and reestablish connections with everyone&#8217;s modem after a reset? Further, why on earth couldn&#8217;t they let people know they&#8217;re doing maintenance ahead of time? Email is not a new thing guys&#8230; and you have location info on my account. Email us when you&#8217;re going to take shit down. *grumble*</p> ]]></content:encoded> <wfw:commentRss>http://www.staze.org/kerberos-brokeage/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using apc
Object Caching 463/548 objects using apc

Served from: www.staze.org @ 2010-09-06 17:12:52 -->