Jason Baker | 9 Nov 2009 16:14
Favicon

Can't get the disconnection tests to run

Hey guys,


I've been trying to split out a branch that contains the oracle backend that's up-to-date from trunk.  For whatever reason, I can't get the disconnection tests to work.  I've been running the tests two ways:  

 1. Using an Oracle TNS name (which looks up the hostname/port in a file).  In other words, a URI like this:

    oracle://username:password <at> tns_name?tns=True

 2. Specifying the port, hostname, and service identifier in the URI.  The URI looks like this:

    oracle://username:password <at> hostname:port/SID

Using both methods, I can get both the database tests and store tests to work.  However, I can't get the disconnection tests to pass.  

If I use #1, then the test just fails; a DisconnectError doesn't get raised.  It doesn't even appear that is_disconnect_error is ever getting called.  If I use #2, the test just hangs.  After doing some debugging, I've determined that it is getting hung up at this line of code in the proxy:

    rlist, wlist, xlist = select.select(readers, [], [], TIMEOUT)

...which is strange because as far as I know, this shouldn't block.

It makes sense that #1 would fail as the proxy server likely doesn't have anything to connect to.  However, I can't figure out why it's getting hung up.  Any ideas as far as where to begin?  Could something be configured incorrectly?  Does this sound like a non-storm issue (in other words, an Oracle issue)?
<div>
<p>Hey guys,
</p>
<div><br></div>
<div>I've been trying to split out a branch that contains the oracle backend that's up-to-date from trunk. &nbsp;For whatever reason, I can't get the disconnection tests to work. &nbsp;I've been running the tests two ways: &nbsp;</div>
<div><br></div>
<div>&nbsp;1. Using an Oracle TNS name (which looks up the hostname/port in a file). &nbsp;In other words, a URI like this:</div>
<div><br></div>
<div>&nbsp;&nbsp; &nbsp;oracle://username:password <at> tns_name?tns=True</div>
<div><br></div>
<div>&nbsp;2. Specifying the port, hostname, and service identifier in the URI. &nbsp;The URI looks like this:</div>
<div><br></div>
<div>&nbsp;&nbsp; &nbsp;oracle://username:password <at> hostname:port/SID</div>
<div><br></div>
<div>Using both methods, I can get both the database tests and store tests to work. &nbsp;However, I can't get the disconnection tests to pass. &nbsp;</div>
<div><br></div>
<div>If I use #1, then the test just fails; a DisconnectError doesn't get raised. &nbsp;It doesn't even appear that is_disconnect_error is ever getting called. &nbsp;If I use #2, the test just hangs. &nbsp;After doing some debugging, I've determined that it is getting hung up at this line of code in the proxy:</div>
<div><br></div>
<div>&nbsp;&nbsp; &nbsp;rlist, wlist, xlist = select.select(readers, [], [], TIMEOUT)</div>
<div><br></div>
<div>...which is strange because as far as I know, this shouldn't block.</div>
<div><br></div>
<div>It makes sense that #1 would fail as the proxy server likely doesn't have anything to connect to. &nbsp;However, I can't figure out why it's getting hung up. &nbsp;Any ideas as far as where to begin? &nbsp;Could something be configured incorrectly? &nbsp;Does this sound like a non-storm issue (in other words, an Oracle issue)?</div>
</div>
James Henstridge | 24 Nov 2009 09:14
Picon
Gravatar

Re: Can't get the disconnection tests to run

On Mon, Nov 9, 2009 at 11:14 PM, Jason Baker <jbaker@...> wrote:
> Hey guys,
> I've been trying to split out a branch that contains the oracle backend
> that's up-to-date from trunk.  For whatever reason, I can't get the
> disconnection tests to work.  I've been running the tests two ways:
>  1. Using an Oracle TNS name (which looks up the hostname/port in a file).
>  In other words, a URI like this:
>     oracle://username:password <at> tns_name?tns=True
>  2. Specifying the port, hostname, and service identifier in the URI.  The
> URI looks like this:
>     oracle://username:password <at> hostname:port/SID
> Using both methods, I can get both the database tests and store tests to
> work.  However, I can't get the disconnection tests to pass.
> If I use #1, then the test just fails; a DisconnectError doesn't get raised.
>  It doesn't even appear that is_disconnect_error is ever getting called.  If
> I use #2, the test just hangs.  After doing some debugging, I've determined
> that it is getting hung up at this line of code in the proxy:
>     rlist, wlist, xlist = select.select(readers, [], [], TIMEOUT)
> ...which is strange because as far as I know, this shouldn't block.
> It makes sense that #1 would fail as the proxy server likely doesn't have
> anything to connect to.  However, I can't figure out why it's getting hung
> up.  Any ideas as far as where to begin?  Could something be configured
> incorrectly?  Does this sound like a non-storm issue (in other words, an
> Oracle issue)?

Sorry for taking a while to get back to you about this.

The tests in question should definitely be run with a URI containing a
hostname and optionally a port rather than any symbolic name.  Those
tests work on the assumption that (a) they can pull a hostname/port
out of the given URI and create a TCP connection to it, (b) they can
substitute in a new hostname/port into the URL and the database client
library will connect to that port and (c) the database client can
successfully communicate with the database when we're forwarding data
back and forward manually.

So the TNS name based URI definitely won't work unless you have some
way to map it to the correct hostname/port (you'd need to override
DatabaseDisconnectionTest.get_uri() in that case).

Next thing: are you sure that you are seeing a hang on that select
call?  That call should never last longer than 0.1 seconds, but I'd
expect that thread to spend most of its time in select calls (separate
ones).

James.

--

-- 
storm mailing list
storm@...
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm


Gmane