Subject Re: [Firebird-Java] Re: GDS Exception. 335544721. Unable to complete network request to host
Author Mark Rotteveel
On 27-3-2013 10:46, psureshkumar14@... wrote:
> First of all thanks for your reply Mark and all others. It is much Appreciated.
>>> The cause of the error is an IOException, but the exact cause is an
> unknown right now.
> Could you please explain(It will really help me to find the root cause), how did you told the cause of the error is IOException. Do you have any documents/forum links?

All place in the Jaybird code where the exception with this message (aka
error isc_network_error / 335544721) is thrown, is in a catch-block that
catches an IOException.

For example the error in your stacktrace originates from:

For Jaybird 2.1.6 this is:
// Next line 722:
try {
if (debug)
log.debug("op_transaction ");

db.out.writeTyped(ISCConstants.isc_tpb_version3, tpbImpl);
// db.out.writeSet(ISCConstants.isc_tpb_version3, tpb);
// db.out.writeBuffer(tpb, tpb_length);
if (debug)
// out.flush();
receiveResponse(db, -1);
} catch (IOException ex) {
throw new GDSException(ISCConstants.isc_network_error);
// Previous line 738

The statement new GDSException(ISCConstants.isc_network_error) creates
an exception with the message "Unable to complete network request to
host ""."

In other cases I would suggest to switch to Jaybird 2.2.2 and see if
that fixes it, but Hugo has the same exception and he has already
switched to 2.2.2.

>>> Jaybird 2.2.3 will include the exception cause when
> this error occurs.
> Does Jaybird 2.2.3 had any fixes to this issue?

I don't expect Jaybird 2.2.3 to fix this. The only thing I did was
adding the IOException to the stacktrace. I hope this will allow me to
pinpoint the problem. I did fix a synchronization bug that might be a
cause when interleaving requests to the connection from multiple threads
at the same time. But that won't apply here as you aren't sharing a
connection with multiple threads.

> Do you have any workaround for this issue? since i tried my best. Nothing Helps.

I don't have a workaround as I don't know what is causing it. If you can
provide code that reproduces the error easily, that would be very
helpful in finding the cause.

If that isn't possible, at least provide some details:
* Connection properties
* What the code that triggers this exception does (or the actual code)
* Frequency this error occurs
* Usage (eg nr of concurrent connections in use etc)
* Any errors in the firebird.log of the server around the time this
exception occurs

I do notice that in your trace, the error is triggered from
And in Hugo's:

I will look into that part of the code to see if I can find any
potential causes, but without a - preferably simple - reproducible
example that is like trying to find a needle in a haystack. And if I
find something suspicious and fix that I won't be able to verify that it
actually fixes this issue as long as I can't reproduce it.

Mark Rotteveel