Tuesday·10·January·2012
Illegal attempt to re-initialise SSL for server (theoretically shouldn’t happen!) //at 02:52 //by abe
After dist-upgrading my main Hetzner server from Lenny to Squeeze, Apache failed to come up, barfing the following error message in the alphabetically last defined and enabled virtual host’s error log:
[error] Illegal attempt to re-initialise SSL for server (theoretically shouldn't happen!)
Well this is not theory but the real world and it did happen — and it took me a while to find out what was wrong with the configuration despite it worked with Lenny’s Apache version.
To avoid that others have to search as long as I had to, here’s the solution:
Look at all enabled sites, pick out those which have a VirtualHost on port 443 defined and verify that all these VirtualHost containers do have their own “SSLEngine On” statement. If at least one is missing, you’ll run into the above mentioned error message.
And it won’t necessarily show up in the error log of those VirtualHosts which are missing the statement but only in the last VirtualHost (or the last VirtualHost on port 443).
To find the relevant site files, I used the following one-liner:
grep -lE 'VirtualHost.*443' sites-enabled/*[^~] | \ xargs grep -ci "SSLEngine On" | \ grep :0
Should work for all sites which have defined just one VirtualHost on port 443 per file.
I suspect that the raise of SNI made Apache’s SSL implementation more picky with regards to VirtualHosts.
Oh, and kudos to this comment to an article on Debian-Administration.org because
it finally pointed me in the right direction. :-)
Tagged as: Apache, CLI, commandline, Debian, error, experience, grep, HTTPS, KMMR, Lenny, Squeeze, SSL, xargs
// show without comments // write a comment
Related stories
Thursday·27·October·2011
Conkeror in the Debian NEW queue //at 22:57 //by abe
I already mentioned a few times in the blog that I’m working on a Debian package of the Conkeror web browser. And now, after a lot of fine-tuning (and I still further new ideas how to improve the package ;-) Conkeror is finally in the NEW queue and hopefully will hit unstable in a few days. (Update Thursday, 03-Jul-2008, 18:13 CEST: The package has been accepted by Jörg and should be included on most architectures in tonight’s updates.)
Those who could hardly await it can fetch Conkeror .debs from http://noone.org/debian/. The conkeror package itself is a non-architecture specific package (but needs xulrunner-1.9 to be available), and its small C-written helper program spawn-process-helper is available as package conkeror-spawn-process-helper for i386, amd64, sparc, alpha, powerpc, kfreebsd-i386 and kfreebsd-amd64. There are no backported packages for Etch available, though, since I don’t know of anyone yet, who has successfully backported xulrunner-1.9 to Etch.
Interestingly the interest in Conkeror seems to have risen in the Debian community independently of its Debian packaging. Luca Capello, who sponsored the upload of my Conkeror package, pointed me to two blog post on Planet Debian, written by people being fed up with Firefox 3 already and are looking for a more lean, but still Gecko based web browser: Decklin Foster is fed up with Firefox’ -eh- Iceweasel’s arrogance and MJ Ray is fed up with Firefox 3 and its SSL problems.
Since my previously favourited Gecko based web browser Kazehakase never became really stable but instead became slow and leaking memory (and therefore not much better than Firefox 2), I can imagine that it’s no more an candidate for people seaking for a lean and fast web browser.
Conkeror has some “strange” concepts of which the primary one is that it looks and feels like Emacs:
The current location is shown in a status bar below the website, where Emacs usually shows buffer names. All input, even entering new URLs to go to, is done via the mini-buffer, an input line below the status bar.
Instead of tabs it uses Emacs’ concept of buffers. So no tab bar clutter and though easy access to all currently open pages.
It has no buttons, menu-bar or such. And except the status bar and mini-buffer, it uses the whole size of the window for the displayed web page. This is the main reason why I prefer Conkeror on the 7” EeePC: I don’t want to waste any pixels for buttons or menu bars and still have a fully functional web browser.
It of course has Emacs alike keybindings (with a slight touch of Lynx). While this may seem awkward for the vi world (Hey, they have the vimperator*, also in Debian since a few days!), as an Emacs user you just have to remember that you web browser now also expects to be treated like an Emacs. It just works:
C-x C-c
- Exit Emacs -eh- Conkeror
C-x C-f
- Open File -eh- web page in new buffer
C-x C-b
- Change to some other tab -eh- buffer
C-x C-v
- Replace web page in this buffer and use the current URL as start for entering the new one
C-x 5 2
- Open new frame -eh- window
C-x 5 0
- Close current frame -eh- window
C-x k
- Close tab, -eh- kill buffer
C-h i
- Documentation
C-s
- Incremental search forward
C-r
- Incremental search backward
C-g
- Stop
l
- Go back (Think info-mode)
g
- Go to (Open web page in this buffer)
(Hehe, I like the faces of vi users having read these keybindings and now wondering how to remember them. SCNR. Well, sometimes vi key bindings are a mystery to me, too. :-)
There are of course many more and nearly all are the same as in Emacs, even the universal argument
C-u
and theM-x
command-line are there. E.g.C-u g
lets you open a web page in a new buffer, too.Conkeror also has very promising concept for following and copying links with the keyboard only. Opera is very inefficient here since you have to jump from link to link to get to the one you want. In Conkeror you just press
f
for following orc
for copying links and then all links on the currently shown part of the page show a small number attached to it. Then you just enter the number (and additionally press enter if the number is ambigous) and the link is either opened or copied to the clipboard.A funny anecdote about how this concept grew over the time: Early versions of Conkeror (back in the days when it just was a Firefox externsion as vimperator) numbered all links on the page, not only the visible ones. On large pages with many links or buttons (e.g. my blog ;-), this took minutes to complete. The idea to just number the visible links is so simple and important – but someone first needed to have it. :-)
Footnotes
*) I just noticed that there is now also muttator, making
Thunderbird look and behave like vim (and probably also mutt), too.
Wonder into which e-mail client the Emacs community will convert
Thunderbird. GNUS? RMAIL? VM? Wanderslust? What will it be called?
Wunderbird? Thunderslust? (SCNRE ;-)
Tagged as: alpha, amd64, Browser, Conkeror, Debian, EeePC, Emacs, Firefox, Firefox 2, GNUS, i386, Kazehakase, kfreebsd-amd64, kfreebsd-i386, Lenny, MUA, muttator, NEW, Opera, packaging, Planet Debian, powerpc, RMAIL, sparc, Thunderbird, vim, vimperator, Wanderslust, XULRunner
// show without comments // write a comment
Related stories
Daily Snapshot .debs of Conkeror //at 22:57 //by abe
Keeping track with packaging software which is under heavy development can be time-consuming. I noticed this while packaging Conkeror, because there was quite a demand for up-to-date packages, especially from upstream themself.
So recently on the IRC channel #conkeror the idea of automatically built Debian packages came up. After a few hours of experimenting and a few days of steadily optimizing, I can proudly present daily built snapshot packages of Conkeror for currently Lenny and Sid, ready to be included in your sources.list:
deb http://noone.org/conkeror-nightly-debs lenny main deb-src http://noone.org/conkeror-nightly-debs lenny main deb http://noone.org/conkeror-nightly-debs sid main deb-src http://noone.org/conkeror-nightly-debs sid main
The binary package conkeror-spawn-process-helper is currently only built for the i386 architecture, but other architectures may follow.
The packages probably work also on any other Debian based distribution (e.g. Ubuntu) which includes XULRunner version 1.9.
Surely they are not of the usual Debian quality, but they should do it for staying up-to-date with the Conkeror development just by using your favourite APT frontend.
The script which generates those packages is also available in the Conkeror git repository at repo.or.cz.
The APTable archive is generated with reprepro. Packages and the repository are signed with the passphrase-less GnuPG key 373B76B4 which is used only for the Conkeror nightly builds. (If anyone knows a better solution for automatic builds than a passphrase-less key, please tell me. :-)
P.S.: I really like the new keybindings “<<”, “>>” and
“G”. :-)
Tagged as: APT, Browser, build, Conkeror, daily, deb, Debian, git, GnuPG, gpg, i386, IRC, keybindings, Lenny, nightly, packaging, pgp, repo.or.cz, repository, reprepro, Sid, signing, snapshot, Ubuntu, XULRunner
// show without comments // write a comment
Related stories
Friday·07·January·2011
“peer holds all free leases” on both DHCP servers //at 15:54 //by abe
At work we run a pair of ISC DHCP servers running Debian Lenny in a classical ISC DHCP failover setup which provide DHCP service to several subnets, some only with static IPs (e.g. for printers) and some with half static and half dynamic IPs.
Today I got a call from a user that her laptop doesn’t get an IP despite it’s correctly registered in our MAC address database from which we generate the “group { }” sections of the dhcpd.conf.
Everything looked fine, but every DHCPDISCOVER package got logged in the syslog on both servers like this:
Jan 7 14:34:39 dhcp1 dhcpd: DHCPDISCOVER from 01:23:45:67:89:ab via eth2: peer holds all free leases Jan 7 14:34:39 dhcp2 dhcpd: DHCPDISCOVER from 01:23:45:67:89:ab via eth2: peer holds all free leases
Searching the web for this error message mostly results in mails which say “If have this on one server but not the other, you soon run out of IP addresses”, but none which mentions what happens if you got them on both sides. Following a coworker’s idea of adding “both servers” to the search term, I found Debian bug #563449 (dhcp3-server: Incorrect “peer holds all free leases” log entries) which turned out as configuration error or at least unexpected configuration (machine was blocked from getting an IP on purpose) and misleading error messages.
So I checked under which circumstances this computer would not get an IP despite it had a static IP configured:
host somehost { hardware ethernet 01:23:45:67:89:ab; fixed-address 192.0.2.123; }
That computer would not get an IP address in any subnet which has different IP range and no dynamic IP addresses. And even if I comment out the “fixed-address” setting, it wouldn’t get an IP in any static-IPs-only subnet either.
And *bingo*, that computer was plugged into the printer subnet which has only static IPs, e.g. in the 198.51.100.x range.
So if you get the “peer holds all free leases” error message from both your DHCP servers, chances are very high that the mentioned MAC address should really not get an IP address on this network (as it does :-). The error messages are just somewhat misleading.
Hope, this saves someone some time. :-)
Tagged as: D-PHYS, Debian, DHCP, ETH Zürich, Failover, ISC, ISG, Lenny
// show without comments // write a comment
Related stories
Wednesday·24·November·2010
Useful but Unknown Unix Commandline Options: sort -h //at 01:12 //by abe
The GNU coreutils command “du” knows about the option “-h” to output human readable (or at least human friendly) values with unit prefixes, e.g. k, M or G.
The GNU coreutils command “sort” also can sort by numbers for quite a long time using the option “-n”, but that doesn’t work on the output of “du -h”. So you usually just did one of the following commands, but couldn’t easily combine them:
$ du -h $ du | sort -n
For approximately a year, GNU sort now knows about another command line option named “-h”. You guessed it probably: “sort -h” can sort human readable values with SI prefixes, e.g.
$ du -h | sort -h | tail -15 34M ./ttf-mplus-033/debian/ttf-mplus 34M ./ttf-mplus-033/debian/ttf-mplus/usr 34M ./ttf-mplus-033/debian/ttf-mplus/usr/share 34M ./ttf-mplus-033/debian/ttf-mplus/usr/share/fonts 34M ./ttf-mplus-033/debian/ttf-mplus/usr/share/fonts/truetype 34M ./ttf-mplus-033/debian/ttf-mplus/usr/share/fonts/truetype/ttf-mplus 35M ./ttf-mplus-034 57M ./ttf-mplus-029 60M ./php5-5.2.6/ext 60M ./ttf-mplus-030 63M ./ttf-mplus-031 65M ./ttf-mplus-032 67M ./ttf-mplus-033 81M ./php5-5.2.6 1.5G . $
You can get this feature already in Debian Unstable (Sid) and Testing
(Squeeze, the upcoming stable release), and Ubuntu Maverick and Natty,
but not yet in the current Debian Stable release (Lenny) nor in
the last Ubuntu LTS release (Lucid Lynx).
Tagged as: Debian, Debian Testing, Debian Unstable, du, GNU Coreutils, Lenny, Lucid, Maverick, Natty, nuggets, SI, Sid, sort, Squeeze, Ubuntu, UUUCO, UUUT
// show without comments // write a comment
Related stories
Tuesday·26·October·2010
ratpoison and focus follows mouse //at 00:22 //by abe
I use ratpoison as window manager on my ASUS EeePC netbook “nemo” for more than two years now. But although I’m very happy with ratpoison in the EeePC, there are two feature wishes which have been refused by upstream: One is more flexibel window name matching for the unmanage command. The other one is “focus follows mouse” between ratpoison frames.
Well, I always guessed that it was possible, but it took until now to find outhow to implement “focus follows mouse” for ratpoison.
There’s an ancient but still useful tool called Not a Window Manager (nawm) which is a small awk-like interpreter offering mostly window handling functions.
The following .nawmrc implements “focus follows mouse” in nawm:
window newwin; # stores window to raise window lastwin; # stores previous window to prevent race conditions leave { lastwin = currentwindow; } enter { newwin = pointerwindow(); if (name(newwin) != "" && newwin != lastwin) { raise newwin; sync; } }
The leave hook is necessary to prevent flapping between two windows if switched between them via ratpoison’s commands.
I also had to add the following hook to my .ratpoisonrc to work around some cases where ratpoison’s own window switching didn’t work anymore. Only happened with more than one frame — with one frame banishing the mouse cursor was annoying, so I filtered that case:
addhook switchwin exec if [ `ratpoison -c fdump|fgrep -o frame|wc -l` -gt 1 ]; then ratpoison -c banish; fi
Unfortunately nawm has been removed from Debian Sid about a year ago due to being buggy and orphaned. There was not upstream development for seven years or so either.
So for the moment you can get nawm either from Debian Lenny or from snapshot.debian.org.
But I had to fix a segfault in nawm when calling name() on a window without name to be able to use it at all, so you will probably have to rebuild it anyway with the following patch:
diff -u nawm-0.0.20030130/builtins.c nawm-0.0.20030130-patched/builtins.c --- nawm-0.0.20030130/builtins.c 2010-10-25 06:00:02.000000000 +0200 +++ nawm-0.0.20030130-patched/builtins.c 2010-10-25 04:15:25.000000000 +0200 @@ -546,8 +546,12 @@ *name = gcstrdup(""); else { - *name = gcstrdup((char *)nm); - XFree(nm); + if ((char *)nm) { + *name = gcstrdup((char *)nm); + XFree(nm); + } else { + *name = gcstrdup(""); + } } }
And yes, I’m thinking about adopting and reintroducing the nawm package into Debian Sid.
But I’d prefer if anyone could give me a hint how to do this with more
current and still maintained tools (or a patch against ratpoison :-).
I looked into suckless-tools, but I haven’t found anything in
there which provides hooks on X events. And the Perl module Tk seems
to be able to set X event hooks, but only within the application being
written itself.
Tagged as: ASUS, awk, Debian, dwm, EeePC, FocusFollowsMouse, Hack, Hacks, hook, Lenny, nawm, nemo, ratpoison, segfault, Sid, Squeeze, suckless, Window Manager, X
// show without comments // write a comment
Related stories
Tuesday·12·October·2010
Still happy with the ASUS EeePC 701 //at 16:02 //by abe
Recently Eric asked on the LUG Vorarlberg mailing list about netbook experience. I wrote a lengthy reply summarizing my experiences with the ASUS EeePC 701. And I thought this is something I probably should share with more people than only one LUG:
I ordered an ASUS EeePC 701 (4G) with US keyboard layout at digitec in Spring 2008, got it approximately one month later and posted a first resumé after one month in my blog.
I’m still very happy with the EeePC 701, despite two commonly mentioned drawbacks (the small screen resolution and the small SSD – which I both don’t see as real problems) and some other minor issues.
What matters
- Very robust and compact case. And thanks to a small fan being the only moving part inside, the EeePC 701 is also very robust against mobile use.
- Very pleasing always-in-my-daypack size (despite the 7" screen it’s the typical 9" netbook size) and easily held with one hand.
- Black. No glossy display. Neither clear varnish nor piano laquer. Short: No bath room tile. Textured surface, small scratches don’t stick out and don’t matter.
- Debian (previously Lenny, now Sid) runs fine on it, even the webcam works out-of-the-box.
- Despite all those neat features, it was fscking cheap at that time. And it was available without Windows.
Nice to have
- There’s power on the USB sockets even if the EeePC is turned off but the power supply is plugged in.
- The speakers are impressingly good and loud for their size. (But my demands with regards to audio are probably not too high, so audiophiles shouldn’t run to ebay because of this. ;-)
- It has three external USB sockets.
What doesn’t matter
- The small 7" 800×480 screen: I like small fonts and do most things inside a terminal anyway. And even with 800×480, those terminals are still much bigger than 80×25 characters. Only some applications and webpages have no heart for small screens.
- The small disk size: Quite a lot of programs fit on 4 GB of disk space. Additionally I use tmpfs a lot. And music and video files are either on a external 500 GB Western Digital 2.5" “My Passport” disk (which I need quite seldomly) or much more come via sshfs and IPv6 from my home server anyway. :-)
- The small keyboard: I just don’t have any problems with the size or layout (right shift right of the cursor up key, etc.) of the keyboard. Well, maybe except that any standard sized keyboard feels extremely large after having used the EeePC exclusively for some weeks. ;-)
- The to 630 MHz underclocked 900 MHz Intel Celeron: It’s enough for most of the things I do with the EeePC. Also the original 512 MB RAM are somehow ok, but for using tmpfs, but no swap space at all, 1 GB or 2 GB are surely the better choice.
- A battery runtime of 2.5h to 3h is fine for me.
What’s not so nice
- The “n” key needs to be pressed slighty stronger than other keys, otherwise no “n” appears. So if one of my texts in average misses more “n” than other letters, I typed it on the EeePC. ;-)
- Home, End, Page-Up, and Page-Down need the Fn key. This means that these keys can only be used with two hands (or one very big hand and I have quite small hands). This is usually no problem and you get used to it. It’s just annoying if you hold the EeePC with one hand and try to type with the other.
- What looks like a single mouse button is a seesaw and therefore
two mouse buttons below one button. This makes it quite hard to press
both at the same time, e.g. for emulating a middle mouse button press.
It usually works in about half of all cases I tried it. My solution
was to bind some key combination to emulate a middle mouse button in
my window manager, ratpoison:
bind y ratclick 2
And that mouse button bar already fell off two times. - The battery reports only in 10% steps, and reporting in percentage instead of mAh is an ACPI standard violation because reporting in percentage is only allowed for non-rechargable batteries. It also doesn’t report any charging and discharging rates. But in the meanwhile nearly all battery meter can cope with these hardware bugs. This was quite a problem in the early days.
- Now, after approximately 1.5 years, the battery slowly fritzes: When charging there are often only seconds between 10% and 40%. Rigorously using up all power of the battery helped a little bit. Looks like some kind of memory effect althought the battery is labeled Li-Ion and not Ni-MH and Li-Ion batteries are said to have no memory effect.
- The SD card reader only works fine if you once completed the setup of the original firmware or set the corresponding BIOS switch appropriately. No idea why.
Similar models
Technically, most of this also counts for the EeePC 900SD (not 901) which only differs in screen, resolution and disk size as well as CPU, but not on the the case. So same size, same robustness, same battery, same mainboard, bigger screen, resolution, disk and faster CPU. (The 901 has a different CPU, a different battery, and a different, glossy and partially chromed case.) See Wikipedia for the technical specifications of all EeePC models.
ASUS’ only big FAILure
Stopping to sell most EeePCs with Linux and cowardly teaming up with Microsoft after having shown big courage to come out with a Linux only netbook. Well, you probably already know, but it’s better without Windows…
So basically you no more get these really neat netbooks from ASUS anymore and you get nearly no netbooks with Linux from ASUS in the stores anymore. It’s a shame.
Would I buy it again?
Sure.
Well, maybe I would also buy the 900SD, 900AX (replacing the harddisk with an SSD) or 702 (8G) instead of the 701, but basically they’re very similar. See Wikipedia for the differences between these EeePC models. And of course I still prefer the versions without Windows.
But despite the low price, the EeePC 701 is surprisingly robust and
still works as on the first day (ok, except battery, the mouse button
bar and the “n” key ;-), so I recently bought a second power supply
(only white ones were available *grrrr*
)
and ordered a bigger third party battery plus an adapter to load the
battery directly from the (second) power supply without EeePC
inbetween.
What desktop do I use on the EeePC?
None.
I use ratpoison as window manager, uxterm, urxvt, and yeahconsole as terminal emulators (running zsh with grml based .zshrc even as root’s login shell :-), wicd-curses as network manager and xmobar (previously dzen2) with i3status as text-only panel. Installed editors are GNU Emacs 23, GNU Zile and nvi. (No vim. :-)
And of course a netbook wouldn’t be a netbook if it wouldn’t have a
lot of network applications installed. For me the most important ones
are: ssh, scp, autossh, sshfs, miredo, conkeror, git,
hg, and rsync.
Tagged as: 701, 900A, 900SD 900AX, 901, ASUS, autossh, Badezimmerkachel, black, Conkeror, curses, Debian, EeePC, Emacs, FAIL, git, grml, Hardware, hg, i3status, IPv6, Lenny, Linux, miredo, nemo, Netbook, nvi, ratpoison, review, rsync, Sid, SSH, sshfs, teredo, tmpfs, urxvt, uxterm, wicd, Windows, xmobar, yeahconsole, zile, zsh
// show without comments // write a comment