Tag Archives: networking

Apache Patch: Pass environment variables to backends connected via mod_proxy_ajp

One popular method to connect Tomcat or JBoss to the Apache web server is using mod_proxy_ajp. This of course works very well except for the case where you want to pass some environment variables to the backends. This is especially true for those who want to implement a 404 error handler using Java or other languages backed by Java. A common request is to be able to pass the values of the REQUEST_… variables defined by Apache to the error handler. While the AJP13 protocol would actually allow for that to happen, mod_proxy_ajp doesn’t offer that functionality. Luckily it’s quite easy to patch the functionality in. All you need is the Apache source code. Download and unpack, then open the file modules/proxy/ajp_header.c in your favorite text editor. Look for this code snippet:
Continue reading

Code of the day

#if __APPLE__ && __MAC_OS_X_VERSION_10_5
int inxorcise(int nochdir __attribute__((unused)),
              int noclose __attribute__((unused))) {
    fprintf(stderr, "Apple does not want programs to use
        daemon(3) and suggests using launchd(1).  We don't
        agree, but their dad is bigger than our dad.\n"

Continue reading

Varnish 2.0.5 released

As mentioned here, Varnish 2.0.5 has been released. Changes include performance improvements on Linux and reduced memory consumption when processing ESI. Going to test it on this site in a few …

Continue reading

Give more threads to Varnish

When running my preferred proxy cache Varnish on Linux I realized that I couldn’t start enough threads on heavily accessed systems. As I found out, reducing the stack size is the key to get to the number I need. Oh well, if everything would be easy, I wouldn’t get paid I guess ;)
Continue reading

iSCSI target 1.4.18 for ReadyNAS Duo/NV/NV+

Today I released the iSCSI Target Addon 1.4.18 for the Sparc based ReadyNAS series. There’s not only the dramatic change in the version number. In addition a lot of changes happened behind the scenes:

Continue reading

Sonos System Revived

Since I had some spare time today, I decided to try Volker’s tips to revive my halfways broken Sonos setup. My problem was that one player wouldn’t show up at all while a second one would drop from the network after five to 15 minutes. While I was on it i decided to clean out the ZP100 because it tended to get a bit too warm for my liking. Actually there was nothing to clean out so I guess I have to live with it.

After that was done I found that I had to upgrade both of my switches – the main GS716T as well the GS108T in the office – to new firmware releases to be able to set the SPT priority. A major obstacle there was the fact that to update the switch you need to use Internet Explorer so I had to first install XP in a virtual machine before I could actually upgrade the switches. Not nice from Netgear. Since this isn’t documented anywhere it took me a while to figure that one out.


I then disconnected all Zone Players from the network and from their power source. Then I reconnected the ZP100 in my office. Once that one showed up in the Sonos Controller I reconnected the ZP80s in the living room and in my room. Until now no more dropouts or missing players. I’m a happy camper again ;)


Move it, move it (a.k.a. “Screw it up the IBM way”)

I work with web sites for a living. I give them a place to live, I trash them when they’re no longer needed and I also move them. And believe me, moving a site is the trickiest of the jobs. But in all of my professional life, I’ve never ever seen a blunder like this (output shortened for brevity):

crow:~$ dig developer.lotus.com
; < <>> DiG 9.6.0-APPLE-P2 < <>> developer.lotus.com
;developer.lotus.com.		IN	A

developer.lotus.com.	127	IN	CNAME		0	IN	A

Really. Did they outsource the last thinking person in their networking department? Ok, maybe they fixed it and the change just hasn’t trickled down. So let’s try a different approach (again, shortened:)

Continue reading

Make your ReadyNAS the NTP time server of your network

Since it wasn’t that much work I decided to honor the request and build the server component of the NTP protocol suite for the ReadyNAS Duo/NV/NV+/1100/X6.
There are two archives available:

After installation the server will start immediately. However, it will take some time for the server to actually sync time and date with the official time sources. So it takes about 15 to 20 minutes until any client on your network can actually sync its time with the time source on the ReadyNAS.
Have fun with the tool and remember: Works for me, ymmv.


Interesting searches: readynas uninstall togglessh

For reasons unknown to me, I get a lot of hits from searches for “readynas uninstall togglessh”. Obviously a lot of people who tried the ToggleSSH addon for their ReadyNAS found that it didn’t suit their needs and now want to uninstall it. Ok, so I’m going to tell you how to fix your problems ;)

Continue reading

Make your ReadyNAS your scanning hub

Finally being bothered enough by always having to connect my USB scanner to yet another computer, I decided to bring the SANE backends to the ReadyNAS. As a result, I proudly presend sane-backends_1.0.20-readynas-0.1.0. Using this addon will add support for a vast variety of USB scanners to your ReadyNAS.
To use the scanner attached to your ReadyNAS, you’ll also need a compatible SANE frontend. Those are available for Linux and Windows (XSane) as well as for Mac OS/X (TWAIN SANE, even already with a version for Snow Leopard).

Some screenshots (taken on Linux):

Continue reading

Resolved: “ld: fatal: file values-Xa.o: open failed: No such file or directory” when compiling on (Open)Solaris

Ah well. Compiling software on Solaris could be really easy if it weren’t for the small problems all the time. Today I was faced with

ld: fatal: file values-Xa.o: open failed: No such file or directory

when trying to compile Subversion 1.6.5 on OpenSolaris.


pkg install SUNWarc


MySQL Tuning: The PHP Auto-Reconnect Patch

Now this would be really funny if it weren’t so sad in so many aspects: I know of more than one company running MySQL. Ok, no news there. But the MySQL servers of said companies are dropping connections. Not twice a week or once a day but two or three times every bloody second. Investigation of the cause is underway but obviously that doesn’t help to fix the problem at hand.
Since the major platform in said companies is PHP, there’s another problem: Tests have shown that if a connection failed a subsequent connection request will go through just fine. While not ideal, the best solution for the moment would therefor be to enable the auto-reconnect feature built into every MySQL client. But for PHP, there is no option to do just that.

That’s because even while PHP is using the


function – which is needed to enable auto-reconnect – internally, nobody cared to make it available as part of PHP’s language. Maybe it would be easy to do just that, but I found it easier to patch PHP directly to enable auto-reconnect by default. You want to know how? Read on.

Continue reading

Remove outdated languages from Ubuntu’s Firefox

Always on the bleeding edge I like to use beta versions of upcoming Ubuntu releases. This sometimes poses a little problem: More often than not, there come outdated language definitions with Firefox, causing some minor annoyances.
The biggest annoyance of which is that you just can’t seem to delete those offending addons:


The solution, albeit simple, is harder to find:

Continue reading

Small Updates to WebSVN for ReadyNAS and ReadyNAS Pro

I just released a small update to WebSVN for ReadyNAS / WebSVN for ReadyNAS Pro which by now is available for both, the Sparc- and the Intel-based systems (as if you hadn’t guessed that already ;)). With version 0.9.3 you will now be able to run WebSVN even if you haven’t created an SVN repository already. Before 0.9.3 this would result in a somewhat meaningless error message about a missing configuration directive which just wasn’t true.
Also new in this version is the ability to add BDB-type repositories. While this is the “old” repository style I’m told that using BDB as storage engine will give you a performance boost on larger repositories. So I decided to add that function as well.

Host your SVN repositories on your ReadyNAS

I just finished creating two Addons for the ReadyNAS Duo, NV, NV+, 1100 and X6 that allow you to host SVN repositories. The first obviously is Subversion itself. This addon includes all the subversion command line tools and also adds support for accessing the repositories on your ReadyNAS through the browser interface.

The second addon is WebSVN. In addition to browsing the repositories in a much nicer interface than SVN itself provides, this modified version also allows the creation of new repositories for authenticated users. To use WebSVN, PHP support has to be installed on the ReadyNAS which can be achieved by using the PHP_1.1.bin from Readynas.com.

As always: Works for me, ymmv. If these addons break your ReadyNAS you own the parts.

Ah, and before you ask: Yes, versions for the Intel based ReadyNAS products are to come shortly. Don’t hold your breath, though.


How to build cheap cloud storage


At Backblaze, we provide unlimited storage to our customers for only $5 per month, so we had to figure out how to store hundreds of petabytes of customer data in a reliable, scalable way—and keep our costs low. After looking at several overpriced commercial solutions, we decided to build our own custom Backblaze Storage Pods: 67 terabyte 4U servers for $7,867. In this post, we’ll share how to make one of these storage pods, and you’re welcome to use this design.

Wow. If I had the money to spare, I’d definitely go and try to build one myself.

[ More » ]


Real Internet Gaming

An attack by a Chinese online game provider meant to cripple the servers of its rivals ballooned to cause an Internet outage in much of the country in May.

[ More &#187 ]

iSCSI-Target 0.4.17svn220 fixes memory leaks

I just upgraded the iSCSI support for the older ReadyNAS line to version 0.4.17svn 220. Most notably this version includes a fix for some memory leaks in the previous versions.

For more information see the details or if you aren’t that patient go and get the file ;)

No IonCube Loader for PHP 5.3.0 – for now ;)

This is what I received today after offering a Solaris build environment to the guys from IonCube so they could build a version of their loader for my preferred web server OS:

Continue reading

URL file access is disabled in server configuration

Once in a while you’ll see the error message “URL file access is disabled in server configuration” when opening an external URL using PHP. In general, this means that the HP setting


is set to false. Today I ran into this problem but

allow_url_fopen was set to <em>true</em>. As it turned out the culprit was

this time.


So either set in php.ini

allow_url_fopen = On
allow_url_include = On

or use this in your PHP code:

ini_set('allow_url_fopen', 'on');
ini_set('allow_url_include', 'on');

I should probably add that both settings default to ‘Off’ for a reason. Both are the major entry gates for malicious code when used without proper care.