You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Clay Teahouse <cl...@gmail.com> on 2020/06/02 10:37:00 UTC

connection refused

I'd appreciate your help with this issue.
I have a server and a client node, the latter running in tomcat. I get
connection refused if I try to connect to the server node from the client,
although the server shows the client has joined the cluster. I don't have a
problem running a service on the server's service grid from the client node.
I don't have any issue connecting from any client anywhere, if the client
is not running in tomcat.
what could be the problem?

Re: connection refused

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

This is HTTP connection. Ignite does not use HTTP between servers and
clients (thin and thick). The only relevant place where HTTP is used with
Ignite is REST API.

Can you show the method in the trace?

    at com.zetcode.restex.JerseyClient2.main (JerseyClient2.java:25)

Regards,
-- 
Ilya Kasnacheev


вт, 2 июн. 2020 г. в 22:19, Clay Teahouse <cl...@gmail.com>:

> Thanks Wesley, Alex. Attached is a snapshot of the client log. I don't see
> anything on the ignite server side.
> I am/was trying to do get data from a replicated cache.
>
> On Tue, Jun 2, 2020 at 10:36 AM Alexandr Shapkin <le...@gmail.com>
> wrote:
>
>> Hi,
>>
>>
>>
>> As Wesley mentioned, It’s quite difficult to say something specific about
>> without the logs.
>>
>>
>>
>> As for the additional questions, can you explain, what Ignite API is
>> being used? Is it a Compute API call or
>>
>> a regular cache GETs?
>>
>>
>>
>> It’s totally fine to spawn several user threads and access the server
>> simultaneously.
>>
>> Regarding the node connectivity, by default there is a 1 connection per
>> node, you can control it
>>
>> using the TcpCommunicationSpi#setConnectionsPerNode [1]
>>
>>
>>
>> You can check the pool and adjust the sizes using the following docs [2].
>>
>> If you perform much compute API calls, you might be interested in
>> increasing the server public pool size,
>>
>> striped pool for cache accesses and so on.
>>
>>
>>
>> In any case, it’s better to check your system resources utilization
>> (CPU/memory/etc) if it’s about 100% on a client
>>
>> and 20% on a server, you might want to add several more clients to a
>> cluster.
>>
>>
>>
>> [1] -
>> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html#setConnectionsPerNode-int-
>>
>>
>>
>> [2] - https://apacheignite.readme.io/docs/thread-pools
>>
>>
>>
>>
>>
>> *From: *Clay Teahouse <cl...@gmail.com>
>> *Sent: *Tuesday, June 2, 2020 5:20 PM
>> *To: *user@ignite.apache.org
>> *Subject: *Re: connection refused
>>
>>
>>
>> It turned out if I inject a pause of 4-5 seconds, then the client
>> connection goes through.
>>
>> Why the service grid requests go through  immediately but the regular
>> cache access requires a pause from the time an ignite instance is acquired?
>> Subsequent calls are fast. The caches are replicated.
>>
>> Another question, probably trivial:
>>
>> Can you instantiate multiple concurrent connections from a client to the
>> compute nodes? Is the number of connections limited by the number of
>> threads? Or do I need to create separate client instances for each request?
>>
>>
>>
>>
>>
>> On Tue, Jun 2, 2020 at 5:46 AM Wesley Peng <we...@gmail.com>
>> wrote:
>>
>> Does either client or server have any logs?
>>
>>
>>
>> Thanks
>>
>>
>>
>> On Tue, Jun 2, 2020 at 6:37 PM Clay Teahouse <cl...@gmail.com>
>> wrote:
>>
>> I'd appreciate your help with this issue.
>>
>> I have a server and a client node, the latter running in tomcat. I get
>> connection refused if I try to connect to the server node from the client,
>> although the server shows the client has joined the cluster. I don't have a
>> problem running a service on the server's service grid from the client node.
>>
>> I don't have any issue connecting from any client anywhere, if the client
>> is not running in tomcat.
>>
>> what could be the problem?
>>
>>
>>
>>
>>
>

Re: connection refused

Posted by Clay Teahouse <cl...@gmail.com>.
Thanks Wesley, Alex. Attached is a snapshot of the client log. I don't see
anything on the ignite server side.
I am/was trying to do get data from a replicated cache.

On Tue, Jun 2, 2020 at 10:36 AM Alexandr Shapkin <le...@gmail.com> wrote:

> Hi,
>
>
>
> As Wesley mentioned, It’s quite difficult to say something specific about
> without the logs.
>
>
>
> As for the additional questions, can you explain, what Ignite API is being
> used? Is it a Compute API call or
>
> a regular cache GETs?
>
>
>
> It’s totally fine to spawn several user threads and access the server
> simultaneously.
>
> Regarding the node connectivity, by default there is a 1 connection per
> node, you can control it
>
> using the TcpCommunicationSpi#setConnectionsPerNode [1]
>
>
>
> You can check the pool and adjust the sizes using the following docs [2].
>
> If you perform much compute API calls, you might be interested in
> increasing the server public pool size,
>
> striped pool for cache accesses and so on.
>
>
>
> In any case, it’s better to check your system resources utilization
> (CPU/memory/etc) if it’s about 100% on a client
>
> and 20% on a server, you might want to add several more clients to a
> cluster.
>
>
>
> [1] -
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html#setConnectionsPerNode-int-
>
>
>
> [2] - https://apacheignite.readme.io/docs/thread-pools
>
>
>
>
>
> *From: *Clay Teahouse <cl...@gmail.com>
> *Sent: *Tuesday, June 2, 2020 5:20 PM
> *To: *user@ignite.apache.org
> *Subject: *Re: connection refused
>
>
>
> It turned out if I inject a pause of 4-5 seconds, then the client
> connection goes through.
>
> Why the service grid requests go through  immediately but the regular
> cache access requires a pause from the time an ignite instance is acquired?
> Subsequent calls are fast. The caches are replicated.
>
> Another question, probably trivial:
>
> Can you instantiate multiple concurrent connections from a client to the
> compute nodes? Is the number of connections limited by the number of
> threads? Or do I need to create separate client instances for each request?
>
>
>
>
>
> On Tue, Jun 2, 2020 at 5:46 AM Wesley Peng <we...@gmail.com> wrote:
>
> Does either client or server have any logs?
>
>
>
> Thanks
>
>
>
> On Tue, Jun 2, 2020 at 6:37 PM Clay Teahouse <cl...@gmail.com>
> wrote:
>
> I'd appreciate your help with this issue.
>
> I have a server and a client node, the latter running in tomcat. I get
> connection refused if I try to connect to the server node from the client,
> although the server shows the client has joined the cluster. I don't have a
> problem running a service on the server's service grid from the client node.
>
> I don't have any issue connecting from any client anywhere, if the client
> is not running in tomcat.
>
> what could be the problem?
>
>
>
>
>

RE: connection refused

Posted by Alexandr Shapkin <le...@gmail.com>.
Hi,



As Wesley mentioned, It’s quite difficult to say something specific about
without the logs.



As for the additional questions, can you explain, what Ignite API is being
used? Is it a Compute API call or

a regular cache GETs?



It’s totally fine to spawn several user threads and access the server
simultaneously.

Regarding the node connectivity, by default there is a 1 connection per node,
you can control it

using the TcpCommunicationSpi#setConnectionsPerNode [1]



You can check the pool and adjust the sizes using the following docs [2].

If you perform much compute API calls, you might be interested in increasing
the server public pool size,

striped pool for cache accesses and so on.



In any case, it’s better to check your system resources utilization
(CPU/memory/etc) if it’s about 100% on a client

and 20% on a server, you might want to add several more clients to a cluster.



[1] -
<https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html#setConnectionsPerNode-
int->



[2] - [https://apacheignite.readme.io/docs/thread-
pools](https://apacheignite.readme.io/docs/thread-pools)





 **From:**[Clay Teahouse](mailto:clayteahouse@gmail.com)  
 **Sent:** Tuesday, June 2, 2020 5:20 PM  
 **To:**[user@ignite.apache.org](mailto:user@ignite.apache.org)  
 **Subject:** Re: connection refused



It turned out if I inject a pause of 4-5 seconds, then the client connection
goes through.

Why the service grid requests go through  immediately but the regular cache
access requires a pause from the time an ignite instance is acquired?
Subsequent calls are fast. The caches are replicated.

Another question, probably trivial:

Can you instantiate multiple concurrent connections from a client to the
compute nodes? Is the number of connections limited by the number of threads?
Or do I need to create separate client instances for each request?





On Tue, Jun 2, 2020 at 5:46 AM Wesley Peng
<[westley.peng@gmail.com](mailto:westley.peng@gmail.com)> wrote:

> Does either client or server have any logs?

>

>  
>

> Thanks

>

>  
>

> On Tue, Jun 2, 2020 at 6:37 PM Clay Teahouse
<[clayteahouse@gmail.com](mailto:clayteahouse@gmail.com)> wrote:

>

>> I'd appreciate your help with this issue.

>>

>> I have a server and a client node, the latter running in tomcat. I get
connection refused if I try to connect to the server node from the client,
although the server shows the client has joined the cluster. I don't have a
problem running a service on the server's service grid from the client node.

>>

>> I don't have any issue connecting from any client anywhere, if the client
is not running in tomcat.

>>

>> what could be the problem?






Re: connection refused

Posted by Clay Teahouse <cl...@gmail.com>.
It turned out if I inject a pause of 4-5 seconds, then the client
connection goes through.
Why the service grid requests go through  immediately but the regular cache
access requires a pause from the time an ignite instance is acquired?
Subsequent calls are fast. The caches are replicated.
Another question, probably trivial:
Can you instantiate multiple concurrent connections from a client to the
compute nodes? Is the number of connections limited by the number of
threads? Or do I need to create separate client instances for each request?


On Tue, Jun 2, 2020 at 5:46 AM Wesley Peng <we...@gmail.com> wrote:

> Does either client or server have any logs?
>
> Thanks
>
> On Tue, Jun 2, 2020 at 6:37 PM Clay Teahouse <cl...@gmail.com>
> wrote:
>
>> I'd appreciate your help with this issue.
>> I have a server and a client node, the latter running in tomcat. I get
>> connection refused if I try to connect to the server node from the client,
>> although the server shows the client has joined the cluster. I don't have a
>> problem running a service on the server's service grid from the client node.
>> I don't have any issue connecting from any client anywhere, if the client
>> is not running in tomcat.
>> what could be the problem?
>>
>>

Re: connection refused

Posted by Wesley Peng <we...@gmail.com>.
Does either client or server have any logs?

Thanks

On Tue, Jun 2, 2020 at 6:37 PM Clay Teahouse <cl...@gmail.com> wrote:

> I'd appreciate your help with this issue.
> I have a server and a client node, the latter running in tomcat. I get
> connection refused if I try to connect to the server node from the client,
> although the server shows the client has joined the cluster. I don't have a
> problem running a service on the server's service grid from the client node.
> I don't have any issue connecting from any client anywhere, if the client
> is not running in tomcat.
> what could be the problem?
>
>