You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Maxim Malygin <ma...@gmail.com> on 2018/09/13 09:40:28 UTC

Invoking instance of Ignite service which is deployed together with a cache data

Hi Guys,

I have a service (Ignite Service Grid) which deploys on each node in
cluster (one instance per node). The service has a method which reads data
from a partitioned cache by a key which is passed as parameter of the
method. I'd like to invoke an instance of the service which is deployed on
the same node the key points to. In other words I need to invoke service
which is deployed on the same node where a cache data is stored. Is it
possible?

Thanks,
Maxim

Re: Can't connect VisualVM to Ignite 2.4, 2.6 process on windows

Posted by Alew <al...@gmail.com>.
Hi!

Actually there was no OOME before VisualVM connect attempt. There is a 
point in time after Ignite start after that it is not possible to conect 
VisualVM to Ignite.
I can connect them successfully on different computer.
I think this is an environment specific bug, somehow related to 
windows+hyper-v+amd cpu

On 14/09/2018 11:54, Ilya Kasnacheev wrote:
> Hello!
>
> I don't think you can connect VisualVM to JVM in OutOfMemory state. 
> You can try to use jmap to take heap dump, failing that, try to 
> increase heap size and/or connect before it goes into OOM.
>
> Regards,
> -- 
> Ilya Kasnacheev
>
>
> пт, 14 сент. 2018 г. в 0:43, Alew <alewmt@gmail.com 
> <ma...@gmail.com>>:
>
>     Hi!
>
>     I was suggested to use VisualVM as a debugging tool but can't
>     connect it
>     to ignite process.
>     I start bin/ignite.bat script and point visualvm to ignite process.
>     After that I get default os window "java platform se binary has
>     stopped
>     working"
>     Cmd console contains
>
>     [00:40:19,549][SEVERE][tcp-disco-ip-finder-cleaner-#8][TcpDiscoverySpi]
>
>     Runtime error caught during grid runnable execution: IgniteSpiThread
>     [name=tcp-disco-ip-finder-cleaner-#8]
>     java.lang.OutOfMemoryError: unable to create new native thread
>              at java.lang.Thread.start0(Native Method)
>              at java.lang.Thread.start(Thread.java:717)
>              at
>     org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:499)
>              at
>     org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:452)
>              at
>     org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1828)
>              at
>     org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.cleanIpFinder(ServerImpl.java:1938)
>              at
>     org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.body(ServerImpl.java:1913)
>              at
>     org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
>     Exception in thread "tcp-disco-ip-finder-cleaner-#8"
>     java.lang.OutOfMemoryError: unable to create new native thread
>              at java.lang.Thread.start0(Native Method)
>              at java.lang.Thread.start(Thread.java:717)
>              at
>     org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:499)
>              at
>     org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:452)
>              at
>     org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1828)
>              at
>     org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.cleanIpFinder(ServerImpl.java:1938)
>              at
>     org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.body(ServerImpl.java:1913)
>     Press any key to continue . . .
>
>     I connect VisualVM to other apps with success.
>
>     Thanks.
>


Re: Can't connect VisualVM to Ignite 2.4, 2.6 process on windows

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

I don't think you can connect VisualVM to JVM in OutOfMemory state. You can
try to use jmap to take heap dump, failing that, try to increase heap size
and/or connect before it goes into OOM.

Regards,
-- 
Ilya Kasnacheev


пт, 14 сент. 2018 г. в 0:43, Alew <al...@gmail.com>:

> Hi!
>
> I was suggested to use VisualVM as a debugging tool but can't connect it
> to ignite process.
> I start bin/ignite.bat script and point visualvm to ignite process.
> After that I get default os window "java platform se binary has stopped
> working"
> Cmd console contains
>
> [00:40:19,549][SEVERE][tcp-disco-ip-finder-cleaner-#8][TcpDiscoverySpi]
> Runtime error caught during grid runnable execution: IgniteSpiThread
> [name=tcp-disco-ip-finder-cleaner-#8]
> java.lang.OutOfMemoryError: unable to create new native thread
>          at java.lang.Thread.start0(Native Method)
>          at java.lang.Thread.start(Thread.java:717)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:499)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:452)
>          at
>
> org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1828)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.cleanIpFinder(ServerImpl.java:1938)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.body(ServerImpl.java:1913)
>          at
> org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
> Exception in thread "tcp-disco-ip-finder-cleaner-#8"
> java.lang.OutOfMemoryError: unable to create new native thread
>          at java.lang.Thread.start0(Native Method)
>          at java.lang.Thread.start(Thread.java:717)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:499)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:452)
>          at
>
> org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1828)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.cleanIpFinder(ServerImpl.java:1938)
>          at
>
> org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.body(ServerImpl.java:1913)
> Press any key to continue . . .
>
> I connect VisualVM to other apps with success.
>
> Thanks.
>

Can't connect VisualVM to Ignite 2.4, 2.6 process on windows

Posted by Alew <al...@gmail.com>.
Hi!

I was suggested to use VisualVM as a debugging tool but can't connect it 
to ignite process.
I start bin/ignite.bat script and point visualvm to ignite process.
After that I get default os window "java platform se binary has stopped 
working"
Cmd console contains

[00:40:19,549][SEVERE][tcp-disco-ip-finder-cleaner-#8][TcpDiscoverySpi] 
Runtime error caught during grid runnable execution: IgniteSpiThread 
[name=tcp-disco-ip-finder-cleaner-#8]
java.lang.OutOfMemoryError: unable to create new native thread
         at java.lang.Thread.start0(Native Method)
         at java.lang.Thread.start(Thread.java:717)
         at 
org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:499)
         at 
org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:452)
         at 
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1828)
         at 
org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.cleanIpFinder(ServerImpl.java:1938)
         at 
org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.body(ServerImpl.java:1913)
         at 
org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
Exception in thread "tcp-disco-ip-finder-cleaner-#8" 
java.lang.OutOfMemoryError: unable to create new native thread
         at java.lang.Thread.start0(Native Method)
         at java.lang.Thread.start(Thread.java:717)
         at 
org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.requestAddresses(TcpDiscoveryMulticastIpFinder.java:499)
         at 
org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder.getRegisteredAddresses(TcpDiscoveryMulticastIpFinder.java:452)
         at 
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1828)
         at 
org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.cleanIpFinder(ServerImpl.java:1938)
         at 
org.apache.ignite.spi.discovery.tcp.ServerImpl$IpFinderCleaner.body(ServerImpl.java:1913)
Press any key to continue . . .

I connect VisualVM to other apps with success.

Thanks.

Re: .NET. Is where a way to get JVM metrics from dotnet?

Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi,

Yes, regular java tools like jvisualvm work just fine with JVM started by
Ignite.NET.

On Thu, Sep 13, 2018 at 7:29 PM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> My recommendation is to take thread dump using jstack and heap dump using
> jmap.
>
> I hope that they will happily operate on JVM-containing process.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 13 сент. 2018 г. в 19:25, Alew <al...@gmail.com>:
>
>> Hi!
>>
>> I get OOMEs and my current hypothesis is that there are too many threads
>> in the Java part in the _thread_in_native state.
>> To make a repro I need to get JVM metrics from dotnet. So I want to know
>> how to do it.
>>
>> Thanks.
>>
>

Re: .NET. Is where a way to get JVM metrics from dotnet?

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

My recommendation is to take thread dump using jstack and heap dump using
jmap.

I hope that they will happily operate on JVM-containing process.

Regards,
-- 
Ilya Kasnacheev


чт, 13 сент. 2018 г. в 19:25, Alew <al...@gmail.com>:

> Hi!
>
> I get OOMEs and my current hypothesis is that there are too many threads
> in the Java part in the _thread_in_native state.
> To make a repro I need to get JVM metrics from dotnet. So I want to know
> how to do it.
>
> Thanks.
>

.NET. Is where a way to get JVM metrics from dotnet?

Posted by Alew <al...@gmail.com>.
Hi!

I get OOMEs and my current hypothesis is that there are too many threads 
in the Java part in the _thread_in_native state.
To make a repro I need to get JVM metrics from dotnet. So I want to know 
how to do it.

Thanks.

Re: Invoking instance of Ignite service which is deployed together with a cache data

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

My recommendation will be, roughly,
ignite.compute().affinityRun(cacheNames, key, () ->
ignite.services().service(serviceName).whateverInvocation());

Hope this helps,
-- 
Ilya Kasnacheev


чт, 13 сент. 2018 г. в 12:40, Maxim Malygin <ma...@gmail.com>:

> Hi Guys,
>
> I have a service (Ignite Service Grid) which deploys on each node in
> cluster (one instance per node). The service has a method which reads data
> from a partitioned cache by a key which is passed as parameter of the
> method. I'd like to invoke an instance of the service which is deployed on
> the same node the key points to. In other words I need to invoke service
> which is deployed on the same node where a cache data is stored. Is it
> possible?
>
> Thanks,
> Maxim
>