Gary,

See this for more info:
http://forum.java.sun.com/thread.jspa?forumID=31&threadID=421782

Excerpt is here:
=================================
Now, if you look on a nice, full man page of tcp, like

http://www.die.net/doc/linux/man/man7/tcp.7.html

You will see

tcp_syn_retries
The maximum number of times initial SYNs for an active TCP connection
attempt will be retransmitted. This value should not be higher than
255. The default value is 5, which corresponds to approximately 180
seconds.


Back on the second xterm, try:

% cat /proc/sys/net/ipv4/tcp_syn_retries
5
%

I bet you got five also. You could turn it down to two (decreases time
to around 20 seconds).

You could try this as root:

# sysctl -w net.ipv4.tcp_syn_retries=2
#

or even add this command to your /etc/rc.d/rc.local file
========================

thanks,
dims

On 1/10/06, Walvin, Gary <[EMAIL PROTECTED]> wrote:
>
>
> Hi folks,
>
> I'm getting a bit desperate here.
>
> Using Java 1.5 and Axis 1.3.
>
> If my Axis based client program tries to connect to a webservice at an
> address it cannot resolve, e.g. 1.1.1.1, it takes just over 3 minutes to
> come back with the error "No route to host". Socket timeouts work fine, but
> I cannot get connection timeouts to work.
>
> After much searching of the web, lots of inconsistent answers and
> suggestions to use setTimeout (this is for the socket as I understand it)
> can someone please tell me if the CONNECT_TIMEOUT property actually works?
> Waiting 3 minutes before my program gets a response is not really practical.
> Going async is not an option either.
>
> Here's the line where I'm setting the value:
>
> ((org.apache.axis.client.Stub)m_Soap)._setProperty(org.apache.axis.client.Call.CONNECTION_TIMEOUT_PROPERTY,
> 4000);
>
> Any help much appreciated…
>
> Cheers
>
> Gary
>
>
>
> ________________________________
>
>
>
>
>  Egg is a trading name of the Egg group of companies which includes: Egg
> plc (reg no
> 2448340), Egg Financial Intermediation Ltd
> (reg no 3828289), and Egg Banking plc (reg
> no 2999842). Egg Banking plc and Egg
> Financial Intermediation Ltd are authorised
> and regulated by the Financial Services
> Authority (FSA) and are entered in the FSA
> register under numbers 205621 and 309551
> respectively. These members of the Egg group
> are registered in England and Wales.
> Registered office: 1 Waterhouse Square, 138-
> 142 Holborn, London EC1N 2NA.
>
>
> This e-mail is confidential and for use by
> the addressee only. If you are not the
> intended recipient of this e-mail and have
> received it in error, please return the
> message to the sender by replying to it and
> then delete it from your mailbox. Internet e-
> mails are not necessarily secure. The Egg
> group of companies do not accept
> responsibility for changes made to this
> message after it was sent.
>
>
> Whilst all reasonable care has been taken to
> avoid the transmission of viruses, it is the
> responsibility of the recipient to ensure
> that the onward transmission, opening or use
> of this message and any attachments will not
> adversely affect its systems or data. No
> responsibility is accepted by the Egg group
> of companies in this regard and the
> recipient should carry out such virus and
> other checks as it considers appropriate.
>
> This communication does not create or modify
> any contract.


--
Davanum Srinivas : http://wso2.com/blogs/

Reply via email to