Tomcat Cannot assign requested address – made me crazy

Today I migrated a Tomcat Server to a new host. Everything was in place but it won’t start showing me the following error:

Tomcat Cannot assign requested address

I’m happy ‘Nir Levy‘ had nearly the same problem 4 years ago. Here he describes what went wrong with his /etc/hosts configuration.
My problem was that I did not update the host name in the configuration for my module
After that everything was fine 🙂
I *heart* blogs !


found this while reading about html5, it’s just great

From: Michael Penman
Date: Thu, 21 Jun 2007 07:31:58 -0500
Message-Id: <>


——- Forwarded message ——-

Subject: WHATWG to start work on “Bible5”
Date: Wed, 20 Jun 2007 22:48:38 +0200

WHATWG to start work on “Bible5”

Silicon Valley – June 2008

After their successful work on HTML5, CSS5, XML5, SVG5, and Web5, the
WHATWG has announced that it has started work on a new version of the
Bible, to be called “Bible5”.

“Initially, one of the most obvious changes will be a change to the ten
commandments”, said Ian Hickson, the group’s leader and idealog. “For
instance we shall be changing ‘Thou shalt not kill’ to ‘Thou SHOULD not
kill’ with the necessary reference to RFC 2119. Clearly after a couple of
millenia experience with this spec, people have not been doing what the
spec requires, and so we are merely updating it, modernizing it you might
say, to reflect actual usage. I mean, what use is it having admonitions if
most people are not going to follow them?” he asked, adding “That was a
rhetorical question. I mean, what use is a spec that forbids things? It
just makes it harder for people to be compliant.” “That was also
rhetorical” he hastened to add.

Alan van Finckelstein, one of the people who will be initially working on
the spec, expanded: “One of the problems with the Bible is its
incompleteness” she said. “Although it mentions a few sins that are
forbidden, and a few that are apparently OK — incest in the case of Job’s
daughters being one that immediately springs to mind — it leaves hundreds
if not thousands of sins completely unspecified. We are currently using
Google to search for and identify all currently known and practised sins,
so we can include them in the permitted list.”


“One of the differences with the WHAT WG doing this work instead of the
closed and secretive Christians, is that we have a completely open
process” Hickson added. “Anyone can, and indeed does, join in. We are
currently asking the public to submit use cases of sins that they have
committed in the past, or would like to commit in the future, so that we
can add them to the spec.”

“Speed is another advantage” chimed in Alan. “The Christians took 325
years to produce their spec, before declaring a Rec at the Council of
Nicaea. Talk about slow! We think we can produce a new version in about
two weeks” she said.

“Of course, that will only be a working draft!” pointed out Hickson. “But
we hope to go to CR within a couple of weeks after that. We are preparing
the test suite at the moment. The spec will not go to Rec until we have
recorded evidence that every single sin has been committed at least twice.
Our current timeline shows that we anticipate staying in the CR phase for
about 325 years. We may have to go back to Working Draft after that

“It need hardly be mentioned,” laughed Finckelstein “that the Bible never
actually went through CR, which is just typical.” She went on “If it had,
it would never have reached Recommendation stage. It is riddled with
inconsistencies and errors, or things that have just not been defined. To
take an example, when Moses comes down the mountain with the ten
commandments and sees his people sinning, he loses his temper and smashes
the marble tablets — apparently smashing up God’s property was not on the
list of things thou shalt not do — and then initiates a killing spree of
three thousand of his followers. So much for ‘Thou shalt not kill’!”.

“Anyway,” concluded Hickson, “the big advantage of Bible5 will be that the
number of sinners and criminals will be reduced at a stroke. Just imagine,
the prisons will be emptied, and for the first time in history we will
have a completely law abiding society!”

WHAT’s next? Finckelstein: “Electrical wiring and plugs”, Hickson: “The
rules of the road; airline safety; oh there’s so much we can improve”.


the sudden death of a hdd

Now I’m sure, it’s been over a week and finally there is no possability to restore anything from the hard drive.
After paying around 160€ for a new smaller main disk the AASP told me that he was not able to save any data and that the hdd even won’t show up in the disk utility.

So what’s the problem with Western Digital HDD’s ? This isn’t the first time I saw an WD disk stop working immediatly without any warnings. If it would be the hard drive of my macbook then ok, this one I carry around a lot. But my iMac is standing at the same position for over 1 1/2 years and wasn’t moved a single time.

this is a dark secret to me ?

what I’ve learned from this ……

BACKUP, daily BACKUP and another daily BACKUP

Imac horror crash

I don’t know what’s going on. Last week my old Powerbook G4 suddenly stoped working because of some hdd error.
Today I told my 1 year old 24” iMac to shutdown and went away. When I returned it was still trying to shutdown but I couldn’t do anything except for resetting. After a reboot the horror was perfect because of this huge ? Symbol on the screen indicating that no hdd was found.
I was near crying
After running hardware test it told me there is an 4HDD/11/40000004 sata(0,0) error. ;(
Disk Utility told me that it couldn’t repair because of wrong disk permission and repair disk permission told me it couldn’t finish because of some unknown error ;(
I’ll now try to solve this with diskwarrior, tomorrow morning I’m going to buy some FireWire cable to try to rescue some of my data via target mode.
Wish me some luck, there’s too much work on it…
why is this happening, is there some kind if hardware destroying virus I’m infected with? A single person just can’t have so much bad luck

obfuscated statistic script

if you read “sql, statistics, bash and some gnulplot” here is a obfuscated looking version of this script  😉

{ s=$2; a=0; while read L; do x=$(awk '{print $1}' \
<(echo $L)); [ $x -gt $s ] 2>/dev/null && [ $x -le \
$(( $s+$3 )) ] 2>/dev/null && a=$(( $a+1 )); [ $x -\
gt $(( $s + $(( 2*$3 )) )) ] 2>/dev/null && t=$(( $\
s+(2*$3) )) && diff=$(( $x-$t ))&& m=$(( 1+($diff/$\
3) )) && echo -e $s"\t"$a && a=1 && s=$(( $s+$3 )) \
&& for i in $(seq 1 $m); do [ $x -gt $s ] 2>/dev/nu\
ll && [ $x -le $(( $s+$3 )) ] 2>/dev/null && a=$(( \
$a+1 )); echo -e $s"\t0" && s=$(( $s+$3 )) && a=1; \
done; [ $x -gt $(( $s+$3 )) ] 2>/dev/null && echo -\
e $s"\t"$a && a=0 && s=$(( $s+$3 )) && [ $x -gt $s \
] 2>/dev/null && [ $x -le $(( $s+$3 )) ] && a=$(( $\
a+1 )); done < $1; echo -e $s"\t"$a; }

java hashCode inconsistent ?

While trying to make some kind of header check to see if someone modified the header of my property files I observed something I don’t understand.
I found out that the standard java Method ‘.hashCode’ that every Object provides behave some kind of stange.

Here is my Code

1. StringBuilder sb = new StringBuilder();
   try {
       int i = 0;
2.     for (String s : file2Text.getFileText("./test.txt", "UTF-8")\
                      .split(System.getProperty("line.separator"))) {
3.       if (i++ < 10) {
4.          sb.append(s);
         } else {
} catch (FileNotAccessibleException ex) {
5. System.out.println(String.valueOf(sb.hashCode()));

So I create a StringBuilder (1) and append (4) the first 10 lines (3) from
file ‘./test.txt’ (2). After that if simply print out the hash Code of the
String Builder (5). Note that the file I read in will stay the same.
I run it and it prints out

fine, so far.

Now I transfer my program to a Linux (2.6.18-6-amd64 #1 SMP  2008 x86_64 GNU/Linux) box.
Copy the  file test.txt and rerun my program.

Hmm, well thats not what I expected cause

Maybe something related to the system architecture because locally I’m working with Darwin
(9.6.0 Darwin Kernel Version 9.6.0: root:xnu-1228.9.59~1/RELEASE_I386 i386).

So I already thought that it wouldn’t be possible to make this kind of property header check.
While playing around I then rerun the my code with the same text file on the amd machine.
And suddenly my hash code changes to:


Ok again

1408212765, and again, 1408212765 and again 7281581206 and again 1408212765.


Why does my hash code changes? I read from the same file on the same system changing nothing between the runs.
Shouldn’t a hash value stay the same ?


because of too less time at the moment I’m going to investigate some time whenever there is time to have a closer look at this

apache performance/DoS bash test

just had to download a bunch of files from a webpage. So I wrote a little script which does this for me:


for i in $(lynx -dump -listonly -auth=USER:PASS-ag “http://…….” | grep “http”); do
x=$(echo $i | grep “^http”);
if [ ${#x} -gt 0 ]; then
    wget ${i/http:\/\//http:\/\/USER:PASS@} -O ${i:60:8}
fi; done

maybe not the best but it works.
Using my new favorite I replace the fourth line with

    echo “wget ${i/http:\/\//http:\/\/USER:PASS@} -O ${i:60:8} &” | /bin/bash
resulting in a high speed download but after aprox. 150 files download just stopped
? whats happening, sometinhg wrong in my script, where is the error …..

how to kill your bash

I have a wlan router in my LAN where I switched of the WLAN functionality because I have a faster one. Today I wanted to get access to the admin interface of the router. The problem was I forgot the ip adress of the router.
So I’m trying to write a little script which pings all hosts in my ip range and prints out the ip if the host exists.
I came up with this:

    > for i in $(seq 1 255); do 
    > ping -c 1 -q -t 1 192.168.0.$i | grep -A1 -B1 ” 0%” | head -n1
    > done

Continue reading “how to kill your bash”