asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abdullah alamoudi <>
Subject The solution to the sporadic connection refused exceptions
Date Sun, 23 Aug 2015 17:08:28 GMT
About 3-4 days ago, I was working on the addition of the filesystem based
feed adapter and it didn't take anytime to complete. However, when I wanted
to build and make sure all tests pass, I kept getting ConnectionRefused
errors which caused the installer tests to fail every now and then.

I knew the new change had nothing to do with this failure, yet, I couldn't
direct my attention away from this bug (It just bothered me so much and I
knew it needs to be resolved ASAP). After wasting countless hours, I was
finally able to figure out what was happening :-)

In the startup routine, we start three Jetty web servers (Web interface
server, JSON API server, and Feed server). Sometime ago, we used to end the
startup call before making sure the server.isStarted() method returns true
on all servers. At that time, I introduced the waitUntilServerStarts method
to make sure we don't return before the servers are ready. Turned out, that
was an incorrect way to handle this (We can blame stackoverflow for this
one!) and it is not enough that the server isStarted() returns true. The
correct way to do this is to call the server.join() method after the


This was equally satisfying as it was frustrating and you are welcome for
the future time I saved each of you :)
Amoudi, Abdullah.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message